Barak 0.3.2 documentation

barak.sed.SED

«  barak.sed.Passband.plot   ::   Contents   ::   barak.sed.SED.calc_colour  »

barak.sed.SED

class barak.sed.SED(filename=None, wa=[], fl=[], z=0.0, label=None)[source]

A Spectral Energy Distribution (SED).

Instantiate with either a filename or a list of wavelengths and fluxes. Wavelengths must be in Angstroms, fluxes in erg/s/cm^2/Ang.

To convert from f_nu to f_lambda in erg/s/cm^2/Ang, substitute using:

nu = c / lambda
f_lambda = c / lambda^2 * f_nu 

Available SED template filenames are in TEMPLATES.

__init__(filename=None, wa=[], fl=[], z=0.0, label=None)[source]

Methods

__init__([filename, wa, fl, z, label])
calc_colour(band1, band2[, system]) Calculates the colour band1 - band2.
calc_flux(band) Calculate the mean flux for a passband, weighted by the response and wavelength in the given passband.
calc_mag(band[, system]) Calculates magnitude in the given passband.
copy() Copies the SED, returning a new SED object.
integrate([wmin, wmax]) Calculates flux (erg/s/cm^2) in SED within given wavelength
normalise_to_mag(ABmag, band) Normalises the SED to match the flux equivalent to the
plot([log, ymax])
redshift_to(z[, cosmo]) Redshifts the SED to redshift z.

«  barak.sed.Passband.plot   ::   Contents   ::   barak.sed.SED.calc_colour  »