sncosmo.SUGARSource

class sncosmo.SUGARSource(modeldir=None, m0file='sugar_template_0.dat', alpha1file='sugar_template_1.dat', alpha2file='sugar_template_2.dat', alpha3file='sugar_template_3.dat', CCMfile='sugar_template_4.dat', name=None, version=None)[source]

The SUGAR Type Ia supernova spectral time series template.

The spectral energy distribution of this model is given by

\[F(t, \lambda) = q_0 10^{-0.4 (M_0(t, \lambda) + q_1 \alpha_1(t, \lambda) + q_2 \alpha_2(t, \lambda) + q_3 \alpha_3(t, \lambda) + A_v CCM(\lambda))} (10^{-3} c\lambda^{2})\]

where q_0, q_1, q_2, q_3, and A_v are the free parameters of the model,``alpha_0``, alpha_1, alpha_2`, alpha_3`, CCM` are the template vectors of the model. The q_0 is the equivalent parameter in flux of the Delta M_{gray} parameter define in Leget et al. 2020.

Parameters:
modeldirstr, optional

Directory path containing model component files. Default is None, which means that no directory is prepended to filenames when determining their path.

m0filestr or fileobj, optional
alpha1filestr or fileobj, optional
alpha2filestr or fileobj, optional
alpha3filestr or fileobj, optional
CCMfile: str or fileobj, optional

Filenames of various model components. Defaults are: * m0file = ‘sugar_template_0.dat’ (2-d grid) * alpha1file = ‘sugar_template_1.dat’ (2-d grid) * alpha2file = ‘sugar_template_2.dat’ (2-d grid) * alpha3file = ‘sugar_template_3.dat’ (2-d grid) * CCMfile = ‘sugar_template_4.dat’ (2-d grid)

Notes

The “2-d grid” files have the format <phase> <wavelength> <value> on each line.

__init__(modeldir=None, m0file='sugar_template_0.dat', alpha1file='sugar_template_1.dat', alpha2file='sugar_template_2.dat', alpha3file='sugar_template_3.dat', CCMfile='sugar_template_4.dat', name=None, version=None)[source]

Methods

__init__([modeldir, m0file, alpha1file, ...])

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