uvex_transients.models.core.base#

Base class for time- and frequency-dependent spectral models.

A SpectralModel describes how a source’s spectral luminosity, \(L_\nu(\nu, t)\), evolves with observer-frame frequency \(\nu\) and time since explosion \(t\). From that single quantity, this base class derives everything else a user typically needs to turn a physical model into something observable: a bolometric light curve, a normalized spectral shape, a redshifted and distance-diluted flux, a throughput-weighted band flux, AB magnitudes, and a SourceSpectrum ready to feed into a detector simulation.

To define a new model, subclass SpectralModel and implement _eval(), the natural-log spectral luminosity in cgs units.

Every other quantity (fluxes, magnitudes, band-integrated fluxes, bolometric luminosity) is derived automatically. All of these public methods come in a consistent family of four, distinguished by suffix:

Suffix

Inputs / outputs

Example

_log_cgs

unit-free numbers, natural log

SpectralModel.eval_log_cgs()

_log

physical Quantity, natural log

SpectralModel.eval_log()

_cgs

unit-free numbers, linear scale

SpectralModel.eval_cgs()

(none)

physical Quantity, linear scale

SpectralModel.eval()

Lightcurve and Spectrum are the time-only and frequency-only halves of the same idea: a Lightcurve is just \(L_\mathrm{bol}(t)\), and a Spectrum is just a shape \(S(\nu)\) (not necessarily normalized to 1). ComposedSpectralModel combines one of each into a full SpectralModel, with \(L_\nu(\nu, t) = L_\mathrm{bol}(t) \cdot S(\nu) / \int S(\nu')\,d\nu'\).

Classes

ComposedSpectralModel(**overrides)

A SpectralModel built by pairing a Lightcurve with a Spectrum.

Lightcurve(**overrides)

Abstract base class for time-dependent bolometric luminosity models.

SpectralModel(**overrides)

Abstract base class for time-dependent spectral energy distribution models.

Spectrum(**overrides)

Abstract base class for frequency-dependent spectral shape models.