Skip to content
Utilities for astronomical spectral energy distributions
Branch: master
Clone or download
bd-j Merge pull request #15 from AlexaVillaume/add_gaia
adding revised DR2 gaia filters
Latest commit ac4d6a9 Jul 25, 2018



Modules for storing and operating on astronomical source spectral energy distributions.

Installation & setup:

git clone
cp /path/to/your/favorite/filters/*par sedpy/sedpy/data/filters/
cd sedpy
python 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


  • observate has 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 .
  • attenuation contains simple dust attenuation methods.
  • extinction contains classes for a detailed modeling of extinction curves, following the Fitzpatrick and Massa parameterizations.
  • photometer has some basic aperture photometry algorithms.
  • ds9region has some simple ds9 region classes.
  • modelgrid is a module with classes for the storage and interpolation of model SEDs. It is largely superceded by scipy.interpolate algorithms.
  • yanny (from Erin Sheldon) is for reading filter curves, included here for convenience.
You can’t perform that action at this time.