<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Explore sdf output
sdf generates a large amount of information during fitting. Most of this is saved in a database that isn't visible on the web, and also in pickle files that can be found for each model under the "..." link.
A simpler output is the json files under the "model" link, there is less detail here, but they are sufficient for plotting.
To just explore the output you can probably avoid installing the sdf package.
Step1:  json output
To explore json output we don't need any special packages. Either download directly with requests, or open with the json module.
Step2:  The information contained in the json is largely related to the observational data, e.g. photometry and models in the observed bands.
There are also spectra for each model component.
pickle output
To explore the pickle data we need the pickle package. There is a tonne of information saved here, including fluxes for the models in all bands known to sdf.
<ASSISTANT_TASK:>
Python Code:
import requests
import pickle
Explanation: Explore sdf output
sdf generates a large amount of information during fitting. Most of this is saved in a database that isn't visible on the web, and also in pickle files that can be found for each model under the "..." link.
A simpler output is the json files under the "model" link, there is less detail here, but they are sufficient for plotting.
To just explore the output you can probably avoid installing the sdf package.
End of explanation
r = requests.get('http://drgmk.com/sdb/seds/masters/'
                 'sdb-v2-132436.10-513016.1/public/sdb-v2-132436.10-513016.1-mnest/phoenix_m+modbb_disk_r_.json')
d = r.json()
for k in d.keys():
    print(k, type(d[k]))
Explanation: json output
To explore json output we don't need any special packages. Either download directly with requests, or open with the json module.
End of explanation
s = requests.get('http://drgmk.com/sdb/seds/masters/'
                 'sdb-v2-132436.10-513016.1/public/sdb-v2-132436.10-513016.1-mnest/phoenix_m+modbb_disk_r_.pkl')
r = pickle.loads(s.content)
# print the model component fluxes for the MIRI bands
print(f'filter: {r.model_comps}, total')
for i,f in enumerate(r.all_filters):
    if 'NIRCAM' in f:
        print(f, r.all_comp_phot[:,i], r.all_phot[i])
Explanation: The information contained in the json is largely related to the observational data, e.g. photometry and models in the observed bands.
There are also spectra for each model component.
pickle output
To explore the pickle data we need the pickle package. There is a tonne of information saved here, including fluxes for the models in all bands known to sdf.
End of explanation
<END_TASK>