- class sncosmo.TimeSeriesSource(phase, wave, flux, zero_before=False, time_spline_degree=3, name=None, version=None)¶
A single-component spectral time series model.
The spectral flux density of this model is given by\[F(t, \lambda) = A \times M(t, \lambda)\]
where _M_ is the flux defined on a grid in phase and wavelength and _A_ (amplitude) is the single free parameter of the model. The amplitude _A_ is a simple unitless scaling factor applied to whatever flux values are used to initialize the
TimeSeriesSource. Therefore, the _A_ parameter has no intrinsic meaning. It can only be interpreted in conjunction with the model values. Thus, it is meaningless to compare the _A_ parameter between two different
TimeSeriesSourceinstances with different model data.
Phases in days.
Wavelengths in Angstroms.
Model spectral flux density in erg / s / cm^2 / Angstrom. Must have shape
- zero_beforebool, optional
If True, flux at phases before minimum phase will be zeroed. The default is False, in which case the flux at such phases will be equal to the flux at the minimum phase (
flux[0, :]in the input array).
- time_spline_degreeint, optional
Degree of the spline used for interpolation in the time (phase) direction. By default this is set to 3 (i.e. cubic spline). For models that are defined with sparse time grids this can lead to large interpolation uncertainties and negative fluxes. If this is a problem, set time_spline_degree to 1 to use linear interpolation instead.
- namestr, optional
Name of the model. Default is
- versionstr, optional
Version of the model. Default is
- __init__(phase, wave, flux, zero_before=False, time_spline_degree=3, name=None, version=None)¶
__init__(phase, wave, flux[, zero_before, ...])
bandflux(band, phase[, zp, zpsys])
Flux through the given bandpass(es) at the given phase(s).
bandmag(band, magsys, phase)
Magnitude at the given phase(s) through the given bandpass(es), and for the given magnitude system(s).
The spectral flux density at the given phase and wavelength values.
Get parameter of the model by name.
peakmag(band, magsys[, sampling])
Peak apparent magnitude in rest-frame bandpass.
Determine phase of maximum flux for the given band/wavelength.
Set parameters of the model by name.
set_peakmag(m, band, magsys[, sampling])
Set peak apparent magnitude in rest-frame bandpass.
Set parameters of the model from a dictionary.
List of parameter names.
Parameter value array