Modules for storing and operating on astronomical source spectral energy distributions.
Installation & setup:
git clone https://github.com/bd-j/sedpy cp /path/to/your/favorite/filters/*par sedpy/sedpy/data/filters/ cd sedpy python setup.py install
Then in python, e.g.,
from sedpy import observate # get magnitude from a spectrum: filt = observate.Filter("sdss_r0") mag = filt.ab_mag(angstroms, f_lambda_cgs) # or get several magnitudes at once filterlist = observate.load_filters(["galex_NUV", "sdss_r0"]) mags = observate.getSED(angstroms, f_lambda_cgs, filterlist=filters)
see the FAQ
observatehas methods for generating synthetic photometry through any filters, and classes for dealing with filters generally. There is some functionality for spectra (vaccum to air conversions). With a huge debt to Mike Blanton's kcorrect code .
attenuationcontains simple dust attenuation methods.
extinctioncontains classes for a detailed modeling of extinction curves, following the Fitzpatrick and Massa parameterizations.
photometerhas some basic aperture photometry algorithms.
ds9regionhas some simple ds9 region classes.
modelgridis a module with classes for the storage and interpolation of model SEDs. It is largely superceded by
yanny(from Erin Sheldon) is for reading filter curves, included here for convenience.