source.angular

source.angular#

This module defines AngularTimeSeriesSource, a sncosmo source class for spectral time series models.

class skysurvey.source.angular.AngularTimeSeriesSource(phase, wave, cos_theta, flux, zero_before=False, zero_after=False, name=None, version=None)[source]#

Bases: Source

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, \cos\theta)\]

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 TimeSeriesSource instances with different model data.

Parameters:
  • phase (numpy.ndarray) – Phases in days.

  • wave (numpy.ndarray) – Wavelengths in Angstroms.

  • flux (numpy.ndarray) – Model spectral flux density in arbitrary units. Must have shape (num_phases).

  • zero_before (bool, 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).

  • zero_after (bool, optional) – If True, flux at phases after 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 maximum phase (flux[-1, :] in the input array).

  • cos_theta (numpy.ndarray) – cosine of viewing angle

  • name (str, optional) – Name of the model. Default is None.

  • version (str, optional) – Version of the model. Default is None.