- sncosmo.realize_lcs(observations, model, params, thresh=None, trim_observations=False, scatter=True)¶
Realize data for a set of SNe given a set of observations.
Table of observations. Must contain the following column names:
The model to use in the simulation.
- paramslist (or generator) of dict
List of parameters to feed to the model for realizing each light curve.
- threshfloat, optional
If given, light curves are skipped (not returned) if none of the data points have signal-to-noise greater than
- trim_observationsbool, optional
If True, only observations with times between
model.maxtime()are included in result table for each SN. Default is False.
- scatterbool, optional
If True, the
fluxvalue of the realized data is calculated by adding a random number drawn from a Normal Distribution with a standard deviation equal to the
fluxerrorof the observation to the bandflux value of the observation calculated from model. Default is True.
- snelist of
Table of realized data for each item in
- snelist of
skynoiseis the image background contribution to the flux measurement error (in units corresponding to the specified zeropoint and zeropoint system). To get the error on a given measurement,
skynoiseis added in quadrature to the photon noise from the source.
It is left up to the user to calculate
skynoiseas they see fit as the details depend on how photometry is done and possibly how the PSF is is modeled. As a simple example, assuming a Gaussian PSF, and perfect PSF photometry,
4 * pi * sigma_PSF * sigma_pixelwhere
sigma_PSFis the standard deviation of the PSF in pixels and
sigma_pixelis the background noise in a single pixel in counts.