Skip to content

Linear and parabola features

light_curve.LinearFit

Bases: _FeatureEvaluator

Slope, its error and reduced \(\chi^2\) of the light curve in the linear fit

Least squares fit of the linear stochastic model with Gaussian noise described by observation errors \(\{\delta_i\}\):

\[ m_i = c + \mathrm{slope} t_i + \delta_i \varepsilon_i \]

where \(c\) is a constant, \(\{\varepsilon_i\}\) are standard distributed random variables.

Feature values are \(\mathrm{slope}\), \(\sigma_\mathrm{slope}\) and \(\frac{\sum{((m_i - c - \mathrm{slope} t_i) / \delta_i)^2}}{N - 2}\).

  • Depends on: time, magnitude, magnitude error
  • Minimum number of observations: 3
  • Number of features: 3

Parameters:

Name Type Description Default
transform str or bool or None

Transformer to apply to the feature values. If str, must be one of:

  • 'default' - use default transformer for the feature, same as giving True. The default for this feature is 'identity'
  • 'arcsinh' - Hyperbolic arcsine feature transformer
  • 'clipped_lg' - Decimal logarithm of a value clipped to a minimum value
  • 'identity' - Identity feature transformer
  • 'lg' - Decimal logarithm feature transformer
  • 'ln1p' - ln(1+x) feature transformer
  • 'sqrt' - Square root feature transformer

If bool, True uses the default transformer, False disables it. If None, no transformation is applied (default)

None
bands list of str or None

Passband names for multiband mode. If provided, the feature is evaluated independently per passband and the outputs are concatenated in passband order. If None (default), single-band mode is used.

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

bands numpy.ndarray of str or None

Passband names for multiband mode, or None for single-band mode

Methods:

Name Description
__call__

Extract features and return them as a numpy array

many

Extract features from multiple light curves in parallel


light_curve.LinearTrend

Bases: _FeatureEvaluator

The slope, its error and noise level of the light curve in the linear fit

Least squares fit of the linear stochastic model with constant Gaussian noise \(\Sigma\) assuming observation errors to be zero:

\[ m_i = c + \mathrm{slope} t_i + \Sigma \varepsilon_i, \]

where \(c\) is a constant, \(\{\varepsilon_i\}\) are standard distributed random variables. \(\mathrm{slope}\), \(\sigma_\mathrm{slope}\) and \(\Sigma\) are returned.

  • Depends on: time, magnitude
  • Minimum number of observations: 3
  • Number of features: 3

Parameters:

Name Type Description Default
transform str or bool or None

Transformer to apply to the feature values. If str, must be one of:

  • 'default' - use default transformer for the feature, same as giving True. The default for this feature is 'identity'
  • 'arcsinh' - Hyperbolic arcsine feature transformer
  • 'clipped_lg' - Decimal logarithm of a value clipped to a minimum value
  • 'identity' - Identity feature transformer
  • 'lg' - Decimal logarithm feature transformer
  • 'ln1p' - ln(1+x) feature transformer
  • 'sqrt' - Square root feature transformer

If bool, True uses the default transformer, False disables it. If None, no transformation is applied (default)

None
bands list of str or None

Passband names for multiband mode. If provided, the feature is evaluated independently per passband and the outputs are concatenated in passband order. If None (default), single-band mode is used.

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

bands numpy.ndarray of str or None

Passband names for multiband mode, or None for single-band mode

Methods:

Name Description
__call__

Extract features and return them as a numpy array

many

Extract features from multiple light curves in parallel


light_curve.ParabolaFit

Bases: _FeatureEvaluator

Curvature, extremum value, and reduced \(\chi^2\) of the parabolic fit

Weighted least squares fit of the quadratic model with Gaussian noise described by observation errors \(\{\delta_i\}\):

\[ m_i = m_0 + g \, (t_i - t_0)^2 + \delta_i \varepsilon_i, \]

where \(g\) is the curvature, \(t_0\) is the position of the extremum, \(m_0\) is the value at the extremum, and \(\{\varepsilon_i\}\) are standard distributed random variables.

The model is fitted as \(m_i = a \, t_i^2 + b \, t_i + c\), and the feature values are recovered as \(g = a\), \(m_0 = c - \frac{b^2}{4a}\), and \(\frac{\sum{((m_i - a t_i^2 - b t_i - c) / \delta_i)^2}}{N - 3}\). The extremum position \(t_0 = -\frac{b}{2a}\) is not returned: it is an absolute time, which is a poor classification feature and diverges as \(g \to 0\).

Degenerate fits are rejected with an error: constant (plateau) light curves fail the variability check, while exactly straight light curves have zero curvature, so the extremum moves to infinity and \(m_0\) is undefined. Note that for a nearly straight light curve the fit is still accepted and \(m_0\) can be arbitrarily large.

  • Depends on: time, magnitude, magnitude error
  • Minimum number of observations: 4
  • Number of features: 3

Parameters:

Name Type Description Default
transform str or bool or None

Transformer to apply to the feature values. If str, must be one of:

  • 'default' - use default transformer for the feature, same as giving True. The default for this feature is 'identity'
  • 'arcsinh' - Hyperbolic arcsine feature transformer
  • 'clipped_lg' - Decimal logarithm of a value clipped to a minimum value
  • 'identity' - Identity feature transformer
  • 'lg' - Decimal logarithm feature transformer
  • 'ln1p' - ln(1+x) feature transformer
  • 'sqrt' - Square root feature transformer

If bool, True uses the default transformer, False disables it. If None, no transformation is applied (default)

None
bands list of str or None

Passband names for multiband mode. If provided, the feature is evaluated independently per passband and the outputs are concatenated in passband order. If None (default), single-band mode is used.

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

bands numpy.ndarray of str or None

Passband names for multiband mode, or None for single-band mode

Methods:

Name Description
__call__

Extract features and return them as a numpy array

many

Extract features from multiple light curves in parallel