Reference / API¶
Model & Components¶
|
An observer-frame model, composed of a Source and zero or more effects. |
Source component of Model
|
An abstract base class for transient models. |
|
A single-component spectral time series model. |
|
A single-component spectral time series model, that "stretches" in time. |
|
A spectral time series model based on the MLCS2k2 model light curves, using the Hsiao template at each phase, mangled to match the model photometry. |
|
The SALT2 Type Ia supernova spectral timeseries model. |
|
The SALT3 Type Ia supernova spectral timeseries model. |
|
The SNEMO Type Ia supernova spectral timeseries model |
|
The SUGAR Type Ia supernova spectral time series template. |
Effect components of Model: interstellar dust extinction
Abstract base class for propagation effects. |
|
Cardelli, Clayton, Mathis (1989) extinction model dust. |
|
|
O'Donnell (1994) extinction model dust. |
|
Fitzpatrick (1999) extinction model dust with fixed R_V. |
Bandpass & Magnitude Systems¶
|
Transmission as a function of spectral wavelength. |
|
Bandpass defined by multiple transmissions in series. |
|
Bandpass generator defined as a function of focal plane position. |
|
An abstract base class for magnitude systems. |
|
Magnitude system where a source with F_nu = 3631 Jansky at all frequencies has magnitude 0 in all bands. |
|
A magnitude system defined by a fundamental spectrophotometric standard. |
|
A magnitude system defined in a specific set of bands. |
I/O¶
Functions for reading and writing photometric data, gridded data, extinction maps, and more.
|
Read light curve data for a single supernova. |
|
Write light curve data. |
|
Read bandpass from two-column ASCII file containing wavelength and transmission in each line. |
Load an example photometric data table. |
|
Load example spectrum data. |
|
|
Read an SNANA-format ascii file. |
|
Read the SNANA FITS format: two FITS files jointly representing metadata and photometry for a set of SNe. |
|
Read an SNANA 'simlib' (simulation library) ascii file. |
|
Read 2-d grid data from a text file. |
|
Read a multi-dimensional grid of data from a FITS file, where the grid coordinates are encoded in the FITS-WCS header keywords. |
|
Write 2-d grid data to a text file. |
|
Write a 2-d grid of data to a FITS file |
Spectra¶
|
An observed spectrum of an object. |
Fitting Photometric Data¶
Estimate model parameters from photometric data
|
Fit model parameters to data by minimizing chi^2. |
|
Run an MCMC chain to get model parameter samples. |
|
Run nested sampling algorithm to estimate model parameters and evidence. |
Convenience functions
|
Convenience function for indexing photometric data with covariance. |
|
Calculate chisq statistic for the model, given the data. |
|
Turn a result from fit_lc into a simple dictionary of key, value pairs. |
Plotting¶
Convenience functions for quick standard plots (requires matplotlib)
|
Plot light curve data or model light curves. |
Simulation¶
|
Generate a distribution of redshifts. |
|
Realize data for a set of SNe given a set of observations. |
Registry¶
Register and retrieve custom built-in sources, bandpasses, and magnitude systems
|
Register a class instance. |
|
Register a data reading function. |
|
Retrieve a Source from the registry by name. |
|
Get a Bandpass from the registry by name. |
|
Get a MagSystem from the registry by name. |
Class Inheritance Diagrams¶
