sncosmo.StretchSource

class sncosmo.StretchSource(phase, wave, flux, name=None, version=None)[source]

A single-component spectral time series model, that “stretches” in time.

The spectral flux density of this model is given by

\[F(t, \lambda) = A \times M(t / s, \lambda)\]

where _A_ is the amplitude and _s_ is the “stretch”.

Parameters
phasendarray

Phases in days.

wavendarray

Wavelengths in Angstroms.

fluxndarray

Model spectral flux density in erg / s / cm^2 / Angstrom. Must have shape (num_phases, num_disp).

__init__(phase, wave, flux, name=None, version=None)[source]

Methods

__init__(phase, wave, flux[, name, version])

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).

flux(phase, wave)

The spectral flux density at the given phase and wavelength values.

get(name)

Get parameter of the model by name.

maxphase()

maxwave()

minphase()

minwave()

peakmag(band, magsys[, sampling])

Peak apparent magnitude in rest-frame bandpass.

peakphase(band_or_wave[, sampling])

Determine phase of maximum flux for the given band/wavelength.

set(**param_dict)

Set parameters of the model by name.

set_peakmag(m, band, magsys[, sampling])

Set peak apparent magnitude in rest-frame bandpass.

update(param_dict)

Set parameters of the model from a dictionary.

Attributes

param_names

List of parameter names.

param_names_latex

parameters

Parameter value array