tardis.montecarlo.spectrum module

class tardis.montecarlo.spectrum.TARDISSpectrum(_frequency, luminosity)[source]

Bases: tardis.io.util.HDFWriterMixin

_frequency: astropy.units.Quantity with unit ‘Hz’ or a length

These are bin edges of frequency or wavelenght bins for the spectrum.

luminosity: astropy.units.Quantity with unit Energy per second

The luminosity in each bin of the spectrum.

After manually adding a distance attribute, the properties ‘flux_nu’ and ‘flux_lambda’ become available

f_nu_to_f_lambda(f_nu)[source]
property flux_lambda
property flux_nu
hdf_properties = ['_frequency', 'luminosity', 'delta_frequency', 'wavelength', 'luminosity_density_lambda']
static luminosity_to_flux(luminosity, distance)[source]
plot(ax=None, mode='wavelength', **kwargs)[source]
to_ascii(fname, mode='luminosity_density')[source]