pandeia_io.extract_sed
pandeia_io.extract_sed(scene, wl_range=None)
Extract the flux spectrum array from a given scene dict.
Parameters
scene |
|
A pandeia scene dict |
required |
Returns
wl |
1D float array |
Scene’s wavelength array (um). |
flux |
1D float array |
Scene’s flux spectrum (mJy). |
Examples
>>> import gen_tso.pandeia_io as jwst
>>> import matplotlib.pyplot as plt
>>> sed_type = 'phoenix'
>>> sed_model = 'k5v'
>>> norm_band = '2mass,ks'
>>> norm_magnitude = 8.637
>>> scene1 = jwst.make_scene(sed_type, sed_model, norm_band, norm_magnitude)
>>> wl1, phoenix = jwst.extract_sed(scene1)
>>> sed_type = 'k93models'
>>> sed_model = 'k7v'
>>> scene2 = jwst.make_scene(sed_type, sed_model, norm_band, norm_magnitude)
>>> wl2, kurucz = jwst.extract_sed(scene2)
>>> sed_type = 'blackbody'
>>> sed_model = 4250.0
>>> scene3 = jwst.make_scene(sed_type, sed_model, norm_band, norm_magnitude)
>>> wl3, bb = jwst.extract_sed(scene3)
>>> plt.figure(0)
>>> plt.clf()
>>> plt.plot(wl1, phoenix, c='b')
>>> plt.plot(wl2, kurucz, c='darkorange')
>>> plt.plot(wl3, bb, c='xkcd:green')
>>> plt.xlim(0.5, 12)
Back to top