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 - property flux_lambda¶
 - property flux_nu¶
 - hdf_properties = ['_frequency', 'luminosity', 'delta_frequency', 'wavelength', 'luminosity_density_lambda']¶
 - plot(ax=None, mode='wavelength', **kwargs)[source]¶
- Plot the Spectrum - Parameters
- axmatplotlib.axes._subplots.AxesSubplot or None, optional
- Axis on which to create plot. Default value is None which will create plot on a new figure’s axis. 
- mode{‘wavelength’, ‘frequency’}, optional
- Quantity to plot spectrum against, either ‘wavelength’ or ‘frequency’. Default value is ‘wavelength’. 
- **kwargsdict, optional
- matplotlib.lines.Line2Dproperties to style the plot: refer to matplotlib documentation for a list of all possible arguments.