tardis.spectrum.base module

class tardis.spectrum.base.SpectrumSolver(*args, **kwargs)[source]

Bases: HDFWriterMixin

classmethod from_config(config)[source]
hdf_name = 'spectrum'
hdf_properties = ['montecarlo_virtual_luminosity', 'spectrum_real_packets', 'spectrum_virtual_packets', 'spectrum_real_packets_reabsorbed', 'spectrum_integrated']
property integrator
property montecarlo_emitted_luminosity
property montecarlo_reabsorbed_luminosity
property montecarlo_virtual_luminosity
setup_optional_spectra(transport_state, virtual_packet_luminosity=None, integrator=None)[source]

Set up the solver to handle virtual and integrated spectra

Parameters:
virtual_packet_luminositynp.ndarray, optional

Virtual packet luminosity, unnormalized, by default None

integratorFormalIntegrator, optional

Integrator to compute the integrated spectrum with, by default None

solve(transport_state)[source]

Solve the spectra

Parameters:
transport_state: MonteCarloTransportState

The transport state to be used to compute the spectra

Returns:
tuple(TARDISSpectrum)

Real, virtual and integrated spectra, if available

property spectrum_integrated
property spectrum_real_packets
property spectrum_real_packets_reabsorbed
property spectrum_virtual_packets