Skip to content

Statistical features

light_curve.Amplitude

Bases: light_curve.light_curve_ext._FeatureEvaluator

Half amplitude of magnitude

\[ \mathrm{amplitude} \equiv \frac{\left( \max{(m)} - \min{(m)} \right)}{2} \]
  • Depends on: magnitude
  • Minimum number of observations: 1
  • Number of features: 1

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, it 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, must be True to use default transformer or False to disable. If None, no transformation is applied

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

Methods:

Name Description
__call__

Extract features and return them as a numpy array

Parameters

t : numpy.ndarray of np.float32 or np.float64 dtype Time moments m : numpy.ndarray Signal in magnitude or fluxes. Refer to the feature description to decide which would work better in your case sigma : numpy.ndarray, optional Observation error, if None it is assumed to be unity fill_value : float or None, optional Value to fill invalid feature values, for example if count of observations is not enough to find a proper value. None causes exception for invalid features sorted : bool or None, optional Specifies if input array are sorted by time moments. True is for certainly sorted, False is for unsorted. If None is specified than sorting is checked and an exception is raised for unsorted t check : bool, optional Check all input arrays for NaNs, t and m for infinite values cast : bool, optional Allows non-numpy input and casting of arrays to a common dtype. If False, inputs must be np.ndarray instances with matched dtypes. Casting provides more flexibility with input types at the cost of performance. Returns


ndarray of np.float32 or np.float64 Extracted feature array

many

Parallel light curve feature extraction

It is a parallel executed equivalent of

def many(self, lcs, , fill_value=None, sorted=None, check=True): ... return np.stack( ... [ ... self( ... lc, ... fill_value=fill_value, ... sorted=sorted, ... check=check, ... cast=False, ... ) ... for lc in lcs ... ] ... )

Parameters

lcs : list of (t, m, sigma) or Arrow array Either a list of light curves packed into three-tuples (all numpy.ndarray of the same dtype), or an Arrow array/chunked array of type List<Struct<...>> where the selected fields share the same float dtype (float32 or float64). Arrow input is auto-detected via the arrow_c_array / arrow_c_stream protocol and enables zero-copy data access from pyarrow, polars, and other Arrow-compatible libraries. arrow_fields : list of (str or int) Required when lcs is an Arrow array. Field names or indices specifying which struct fields to use as t, m, and optionally sigma. Must contain 2 elements [t, m] or 3 elements [t, m, sigma]. Each element may be a field name (str) or a zero-based positional index (int); all elements must be of the same type. Ignored for non-Arrow input. fill_value : float or None, optional Fill invalid values by this or raise an exception if None sorted : bool or None, optional Specifies if input array are sorted by time moments, see call documentation for details check : bool, optional Check all input arrays for NaNs, t and m for infinite values n_jobs : int Number of tasks to run in paralell. Default is -1 which means run as many jobs as CPU count. See rayon rust crate documentation for details

default_transform = 'identity' class-attribute

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

supported_transforms = ['arcsinh', 'clipped_lg', 'identity', 'lg', 'ln1p', 'sqrt'] class-attribute

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.


light_curve.AndersonDarlingNormal

Bases: light_curve.light_curve_ext._FeatureEvaluator

Unbiased Anderson–Darling normality test statistic

$$ A^2 \equiv \left(1 + \frac4{N} - \frac{25}{N^2}\right) \left(-N - \frac1{N} \sum_{i=0}^{N-1} {(2i + 1)\ln\Phi_i + (2(N - i) - 1)\ln(1 - \Phi_i)}\right), $$ where \(\Phi_i \equiv \Phi((m_i - \langle m \rangle) / \sigma_m)\) is the standard cumulative distribution, \(N\) is the number of observations, \(\langle m \rangle\) is the mean magnitude and \(\sigma_m = \sqrt{\sum_i (m_i - \langle m \rangle)^2 / (N-1)}\) is the magnitude standard deviation.

  • Depends on: magnitude
  • Minimum number of observations: 4
  • Number of features: 1

Wikipedia

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, it same as giving True. The default for this feature is 'lg' - '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, must be True to use default transformer or False to disable. If None, no transformation is applied

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

Methods:

Name Description
__call__

Extract features and return them as a numpy array

Parameters

t : numpy.ndarray of np.float32 or np.float64 dtype Time moments m : numpy.ndarray Signal in magnitude or fluxes. Refer to the feature description to decide which would work better in your case sigma : numpy.ndarray, optional Observation error, if None it is assumed to be unity fill_value : float or None, optional Value to fill invalid feature values, for example if count of observations is not enough to find a proper value. None causes exception for invalid features sorted : bool or None, optional Specifies if input array are sorted by time moments. True is for certainly sorted, False is for unsorted. If None is specified than sorting is checked and an exception is raised for unsorted t check : bool, optional Check all input arrays for NaNs, t and m for infinite values cast : bool, optional Allows non-numpy input and casting of arrays to a common dtype. If False, inputs must be np.ndarray instances with matched dtypes. Casting provides more flexibility with input types at the cost of performance. Returns


ndarray of np.float32 or np.float64 Extracted feature array

many

Parallel light curve feature extraction

It is a parallel executed equivalent of

def many(self, lcs, , fill_value=None, sorted=None, check=True): ... return np.stack( ... [ ... self( ... lc, ... fill_value=fill_value, ... sorted=sorted, ... check=check, ... cast=False, ... ) ... for lc in lcs ... ] ... )

Parameters

lcs : list of (t, m, sigma) or Arrow array Either a list of light curves packed into three-tuples (all numpy.ndarray of the same dtype), or an Arrow array/chunked array of type List<Struct<...>> where the selected fields share the same float dtype (float32 or float64). Arrow input is auto-detected via the arrow_c_array / arrow_c_stream protocol and enables zero-copy data access from pyarrow, polars, and other Arrow-compatible libraries. arrow_fields : list of (str or int) Required when lcs is an Arrow array. Field names or indices specifying which struct fields to use as t, m, and optionally sigma. Must contain 2 elements [t, m] or 3 elements [t, m, sigma]. Each element may be a field name (str) or a zero-based positional index (int); all elements must be of the same type. Ignored for non-Arrow input. fill_value : float or None, optional Fill invalid values by this or raise an exception if None sorted : bool or None, optional Specifies if input array are sorted by time moments, see call documentation for details check : bool, optional Check all input arrays for NaNs, t and m for infinite values n_jobs : int Number of tasks to run in paralell. Default is -1 which means run as many jobs as CPU count. See rayon rust crate documentation for details

default_transform = 'lg' class-attribute

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

supported_transforms = ['arcsinh', 'clipped_lg', 'identity', 'lg', 'ln1p', 'sqrt'] class-attribute

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.


light_curve.BeyondNStd

Bases: light_curve.light_curve_ext._FeatureEvaluator

Fraction of observations beyond \(n\,\sigma\_m\) from the mean magnitude \(\langle m \rangle\)

$$ \mathrm{beyond}~n\,\sigma_m \equiv \frac{\sum_i I_{|m - \langle m \rangle| > n\,\sigma_m}(m_i)}{N}, $$ where \(I\) is the indicator function, \(N\) is the number of observations, \(\langle m \rangle\) is the mean magnitude and \(\sigma_m = \sqrt{\sum_i (m_i - \langle m \rangle)^2 / (N-1)}\) is the magnitude standard deviation.

  • Depends on: magnitude
  • Minimum number of observations: 2
  • Number of features: 1

D’Isanto et al. 2016 DOI:10.1093/mnras/stw157

Parameters:

Name Type Description Default
nstd positive float

N, default is 1.0

required
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, it 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, must be True to use default transformer or False to disable. If None, no transformation is applied

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

Methods:

Name Description
__call__

Extract features and return them as a numpy array

Parameters

t : numpy.ndarray of np.float32 or np.float64 dtype Time moments m : numpy.ndarray Signal in magnitude or fluxes. Refer to the feature description to decide which would work better in your case sigma : numpy.ndarray, optional Observation error, if None it is assumed to be unity fill_value : float or None, optional Value to fill invalid feature values, for example if count of observations is not enough to find a proper value. None causes exception for invalid features sorted : bool or None, optional Specifies if input array are sorted by time moments. True is for certainly sorted, False is for unsorted. If None is specified than sorting is checked and an exception is raised for unsorted t check : bool, optional Check all input arrays for NaNs, t and m for infinite values cast : bool, optional Allows non-numpy input and casting of arrays to a common dtype. If False, inputs must be np.ndarray instances with matched dtypes. Casting provides more flexibility with input types at the cost of performance. Returns


ndarray of np.float32 or np.float64 Extracted feature array

many

Parallel light curve feature extraction

It is a parallel executed equivalent of

def many(self, lcs, , fill_value=None, sorted=None, check=True): ... return np.stack( ... [ ... self( ... lc, ... fill_value=fill_value, ... sorted=sorted, ... check=check, ... cast=False, ... ) ... for lc in lcs ... ] ... )

Parameters

lcs : list of (t, m, sigma) or Arrow array Either a list of light curves packed into three-tuples (all numpy.ndarray of the same dtype), or an Arrow array/chunked array of type List<Struct<...>> where the selected fields share the same float dtype (float32 or float64). Arrow input is auto-detected via the arrow_c_array / arrow_c_stream protocol and enables zero-copy data access from pyarrow, polars, and other Arrow-compatible libraries. arrow_fields : list of (str or int) Required when lcs is an Arrow array. Field names or indices specifying which struct fields to use as t, m, and optionally sigma. Must contain 2 elements [t, m] or 3 elements [t, m, sigma]. Each element may be a field name (str) or a zero-based positional index (int); all elements must be of the same type. Ignored for non-Arrow input. fill_value : float or None, optional Fill invalid values by this or raise an exception if None sorted : bool or None, optional Specifies if input array are sorted by time moments, see call documentation for details check : bool, optional Check all input arrays for NaNs, t and m for infinite values n_jobs : int Number of tasks to run in paralell. Default is -1 which means run as many jobs as CPU count. See rayon rust crate documentation for details

default_transform = 'identity' class-attribute

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

supported_transforms = ['arcsinh', 'clipped_lg', 'identity', 'lg', 'ln1p', 'sqrt'] class-attribute

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.


light_curve.Cusum

Bases: light_curve.light_curve_ext._FeatureEvaluator

Cusum — a range of cumulative sums

$$ \mathrm{cusum} \equiv \max(S) - \min(S), $$ where $$ S_j \equiv \frac1{N\sigma_m} \sum_{i=0}^j{\left(m_i - \langle m \rangle\right)}, $$ \(N\) is the number of observations, \(\langle m \rangle\) is the mean magnitude and \(\sigma_m = \sqrt{\sum_i (m_i - \langle m \rangle)^2 / (N-1)}\) is the magnitude standard deviation.

  • Depends on: magnitude
  • Minimum number of observations: 2
  • Number of features: 1

Kim et al. 2014, DOI:10.1051/0004-6361/201323252

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, it 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, must be True to use default transformer or False to disable. If None, no transformation is applied

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

Methods:

Name Description
__call__

Extract features and return them as a numpy array

Parameters

t : numpy.ndarray of np.float32 or np.float64 dtype Time moments m : numpy.ndarray Signal in magnitude or fluxes. Refer to the feature description to decide which would work better in your case sigma : numpy.ndarray, optional Observation error, if None it is assumed to be unity fill_value : float or None, optional Value to fill invalid feature values, for example if count of observations is not enough to find a proper value. None causes exception for invalid features sorted : bool or None, optional Specifies if input array are sorted by time moments. True is for certainly sorted, False is for unsorted. If None is specified than sorting is checked and an exception is raised for unsorted t check : bool, optional Check all input arrays for NaNs, t and m for infinite values cast : bool, optional Allows non-numpy input and casting of arrays to a common dtype. If False, inputs must be np.ndarray instances with matched dtypes. Casting provides more flexibility with input types at the cost of performance. Returns


ndarray of np.float32 or np.float64 Extracted feature array

many

Parallel light curve feature extraction

It is a parallel executed equivalent of

def many(self, lcs, , fill_value=None, sorted=None, check=True): ... return np.stack( ... [ ... self( ... lc, ... fill_value=fill_value, ... sorted=sorted, ... check=check, ... cast=False, ... ) ... for lc in lcs ... ] ... )

Parameters

lcs : list of (t, m, sigma) or Arrow array Either a list of light curves packed into three-tuples (all numpy.ndarray of the same dtype), or an Arrow array/chunked array of type List<Struct<...>> where the selected fields share the same float dtype (float32 or float64). Arrow input is auto-detected via the arrow_c_array / arrow_c_stream protocol and enables zero-copy data access from pyarrow, polars, and other Arrow-compatible libraries. arrow_fields : list of (str or int) Required when lcs is an Arrow array. Field names or indices specifying which struct fields to use as t, m, and optionally sigma. Must contain 2 elements [t, m] or 3 elements [t, m, sigma]. Each element may be a field name (str) or a zero-based positional index (int); all elements must be of the same type. Ignored for non-Arrow input. fill_value : float or None, optional Fill invalid values by this or raise an exception if None sorted : bool or None, optional Specifies if input array are sorted by time moments, see call documentation for details check : bool, optional Check all input arrays for NaNs, t and m for infinite values n_jobs : int Number of tasks to run in paralell. Default is -1 which means run as many jobs as CPU count. See rayon rust crate documentation for details

default_transform = 'identity' class-attribute

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

supported_transforms = ['arcsinh', 'clipped_lg', 'identity', 'lg', 'ln1p', 'sqrt'] class-attribute

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.


light_curve.ExcessVariance

Bases: light_curve.light_curve_ext._FeatureEvaluator

Measure of the variability amplitude

$$ \frac{\sigma_m^2 - \langle \delta^2 \rangle}{\langle m \rangle^2}, $$ where \(\langle \delta^2 \rangle\) is the mean of squared error, \(\sigma_m\) is the magnitude standard deviation. Note that this definition differs from Sánchez et al. 2017

  • Depends on: magnitude, error
  • Minimum number of observations: 2
  • Number of features: 1

Sánchez et al. 2017 DOI:10.3847/1538-4357/aa9188

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, it 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, must be True to use default transformer or False to disable. If None, no transformation is applied

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

Methods:

Name Description
__call__

Extract features and return them as a numpy array

Parameters

t : numpy.ndarray of np.float32 or np.float64 dtype Time moments m : numpy.ndarray Signal in magnitude or fluxes. Refer to the feature description to decide which would work better in your case sigma : numpy.ndarray, optional Observation error, if None it is assumed to be unity fill_value : float or None, optional Value to fill invalid feature values, for example if count of observations is not enough to find a proper value. None causes exception for invalid features sorted : bool or None, optional Specifies if input array are sorted by time moments. True is for certainly sorted, False is for unsorted. If None is specified than sorting is checked and an exception is raised for unsorted t check : bool, optional Check all input arrays for NaNs, t and m for infinite values cast : bool, optional Allows non-numpy input and casting of arrays to a common dtype. If False, inputs must be np.ndarray instances with matched dtypes. Casting provides more flexibility with input types at the cost of performance. Returns


ndarray of np.float32 or np.float64 Extracted feature array

many

Parallel light curve feature extraction

It is a parallel executed equivalent of

def many(self, lcs, , fill_value=None, sorted=None, check=True): ... return np.stack( ... [ ... self( ... lc, ... fill_value=fill_value, ... sorted=sorted, ... check=check, ... cast=False, ... ) ... for lc in lcs ... ] ... )

Parameters

lcs : list of (t, m, sigma) or Arrow array Either a list of light curves packed into three-tuples (all numpy.ndarray of the same dtype), or an Arrow array/chunked array of type List<Struct<...>> where the selected fields share the same float dtype (float32 or float64). Arrow input is auto-detected via the arrow_c_array / arrow_c_stream protocol and enables zero-copy data access from pyarrow, polars, and other Arrow-compatible libraries. arrow_fields : list of (str or int) Required when lcs is an Arrow array. Field names or indices specifying which struct fields to use as t, m, and optionally sigma. Must contain 2 elements [t, m] or 3 elements [t, m, sigma]. Each element may be a field name (str) or a zero-based positional index (int); all elements must be of the same type. Ignored for non-Arrow input. fill_value : float or None, optional Fill invalid values by this or raise an exception if None sorted : bool or None, optional Specifies if input array are sorted by time moments, see call documentation for details check : bool, optional Check all input arrays for NaNs, t and m for infinite values n_jobs : int Number of tasks to run in paralell. Default is -1 which means run as many jobs as CPU count. See rayon rust crate documentation for details

default_transform = 'identity' class-attribute

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

supported_transforms = ['arcsinh', 'clipped_lg', 'identity', 'lg', 'ln1p', 'sqrt'] class-attribute

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.


light_curve.InterPercentileRange

Bases: light_curve.light_curve_ext._FeatureEvaluator

Inter-percentile range

$$ Q(1 - p) - Q(p), $$ where \(Q(p)\) is the \(p\)th quantile of the magnitude distribution.

Special cases are the interquartile range which is inter-percentile range for \(p = 0.25\) and the interdecile range which is inter-percentile range for \(p = 0.1\).

  • Depends on: magnitude
  • Minimum number of observations: 1
  • Number of features: 1

Parameters:

Name Type Description Default
quantile positive float

Range is (100% * quantile, 100% * (1 - quantile)). Default quantile is 0.25

required
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, it 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, must be True to use default transformer or False to disable. If None, no transformation is applied

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

Methods:

Name Description
__call__

Extract features and return them as a numpy array

Parameters

t : numpy.ndarray of np.float32 or np.float64 dtype Time moments m : numpy.ndarray Signal in magnitude or fluxes. Refer to the feature description to decide which would work better in your case sigma : numpy.ndarray, optional Observation error, if None it is assumed to be unity fill_value : float or None, optional Value to fill invalid feature values, for example if count of observations is not enough to find a proper value. None causes exception for invalid features sorted : bool or None, optional Specifies if input array are sorted by time moments. True is for certainly sorted, False is for unsorted. If None is specified than sorting is checked and an exception is raised for unsorted t check : bool, optional Check all input arrays for NaNs, t and m for infinite values cast : bool, optional Allows non-numpy input and casting of arrays to a common dtype. If False, inputs must be np.ndarray instances with matched dtypes. Casting provides more flexibility with input types at the cost of performance. Returns


ndarray of np.float32 or np.float64 Extracted feature array

many

Parallel light curve feature extraction

It is a parallel executed equivalent of

def many(self, lcs, , fill_value=None, sorted=None, check=True): ... return np.stack( ... [ ... self( ... lc, ... fill_value=fill_value, ... sorted=sorted, ... check=check, ... cast=False, ... ) ... for lc in lcs ... ] ... )

Parameters

lcs : list of (t, m, sigma) or Arrow array Either a list of light curves packed into three-tuples (all numpy.ndarray of the same dtype), or an Arrow array/chunked array of type List<Struct<...>> where the selected fields share the same float dtype (float32 or float64). Arrow input is auto-detected via the arrow_c_array / arrow_c_stream protocol and enables zero-copy data access from pyarrow, polars, and other Arrow-compatible libraries. arrow_fields : list of (str or int) Required when lcs is an Arrow array. Field names or indices specifying which struct fields to use as t, m, and optionally sigma. Must contain 2 elements [t, m] or 3 elements [t, m, sigma]. Each element may be a field name (str) or a zero-based positional index (int); all elements must be of the same type. Ignored for non-Arrow input. fill_value : float or None, optional Fill invalid values by this or raise an exception if None sorted : bool or None, optional Specifies if input array are sorted by time moments, see call documentation for details check : bool, optional Check all input arrays for NaNs, t and m for infinite values n_jobs : int Number of tasks to run in paralell. Default is -1 which means run as many jobs as CPU count. See rayon rust crate documentation for details

default_transform = 'identity' class-attribute

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

supported_transforms = ['arcsinh', 'clipped_lg', 'identity', 'lg', 'ln1p', 'sqrt'] class-attribute

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.


light_curve.Kurtosis

Bases: light_curve.light_curve_ext._FeatureEvaluator

Excess kurtosis of magnitude

$$ G_2 \equiv \frac{N\,(N + 1)}{(N - 1)(N - 2)(N - 3)} \frac{\sum_i(m_i - \langle m \rangle)^4}{\sigma_m^4} - 3\frac{(N - 1)^2}{(N - 2)(N - 3)}, $$ where \(N\) is the number of observations, \(\langle m \rangle\) is the mean magnitude, \(\sigma_m = \sqrt{\sum_i (m_i - \langle m \rangle)^2 / (N-1)}\) is the magnitude standard deviation.

  • Depends on: magnitude
  • Minimum number of observations: 4
  • Number of features: 1

Wikipedia

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, it same as giving True. The default for this feature is 'arcsinh' - '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, must be True to use default transformer or False to disable. If None, no transformation is applied

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

Methods:

Name Description
__call__

Extract features and return them as a numpy array

Parameters

t : numpy.ndarray of np.float32 or np.float64 dtype Time moments m : numpy.ndarray Signal in magnitude or fluxes. Refer to the feature description to decide which would work better in your case sigma : numpy.ndarray, optional Observation error, if None it is assumed to be unity fill_value : float or None, optional Value to fill invalid feature values, for example if count of observations is not enough to find a proper value. None causes exception for invalid features sorted : bool or None, optional Specifies if input array are sorted by time moments. True is for certainly sorted, False is for unsorted. If None is specified than sorting is checked and an exception is raised for unsorted t check : bool, optional Check all input arrays for NaNs, t and m for infinite values cast : bool, optional Allows non-numpy input and casting of arrays to a common dtype. If False, inputs must be np.ndarray instances with matched dtypes. Casting provides more flexibility with input types at the cost of performance. Returns


ndarray of np.float32 or np.float64 Extracted feature array

many

Parallel light curve feature extraction

It is a parallel executed equivalent of

def many(self, lcs, , fill_value=None, sorted=None, check=True): ... return np.stack( ... [ ... self( ... lc, ... fill_value=fill_value, ... sorted=sorted, ... check=check, ... cast=False, ... ) ... for lc in lcs ... ] ... )

Parameters

lcs : list of (t, m, sigma) or Arrow array Either a list of light curves packed into three-tuples (all numpy.ndarray of the same dtype), or an Arrow array/chunked array of type List<Struct<...>> where the selected fields share the same float dtype (float32 or float64). Arrow input is auto-detected via the arrow_c_array / arrow_c_stream protocol and enables zero-copy data access from pyarrow, polars, and other Arrow-compatible libraries. arrow_fields : list of (str or int) Required when lcs is an Arrow array. Field names or indices specifying which struct fields to use as t, m, and optionally sigma. Must contain 2 elements [t, m] or 3 elements [t, m, sigma]. Each element may be a field name (str) or a zero-based positional index (int); all elements must be of the same type. Ignored for non-Arrow input. fill_value : float or None, optional Fill invalid values by this or raise an exception if None sorted : bool or None, optional Specifies if input array are sorted by time moments, see call documentation for details check : bool, optional Check all input arrays for NaNs, t and m for infinite values n_jobs : int Number of tasks to run in paralell. Default is -1 which means run as many jobs as CPU count. See rayon rust crate documentation for details

default_transform = 'arcsinh' class-attribute

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

supported_transforms = ['arcsinh', 'clipped_lg', 'identity', 'lg', 'ln1p', 'sqrt'] class-attribute

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.


light_curve.MagnitudePercentageRatio

Bases: light_curve.light_curve_ext._FeatureEvaluator

Magnitude percentage ratio

$$ \mathrm{magnitude~}q\mathrm{~to~}n\mathrm{~ratio} \equiv \frac{Q(1-n) - Q(n)}{Q(1-d) - Q(d)}, $$ where \(n\) and \(d\) denotes user defined percentage, \(Q\) is the quantile function of magnitude distribution.

  • Depends on: magnitude
  • Minimum number of observations: 1
  • Number of features: 1

D’Isanto et al. 2016 DOI:10.1093/mnras/stw157

Parameters:

Name Type Description Default
quantile_numerator

Numerator is inter-percentile range (100% * q, 100% (1 - q)). Default value is 0.40

required
quantile_denominator

Denominator is inter-percentile range (100% * q, 100% (1 - q)). Default value is 0.05

required
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, it 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, must be True to use default transformer or False to disable. If None, no transformation is applied

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

Methods:

Name Description
__call__

Extract features and return them as a numpy array

Parameters

t : numpy.ndarray of np.float32 or np.float64 dtype Time moments m : numpy.ndarray Signal in magnitude or fluxes. Refer to the feature description to decide which would work better in your case sigma : numpy.ndarray, optional Observation error, if None it is assumed to be unity fill_value : float or None, optional Value to fill invalid feature values, for example if count of observations is not enough to find a proper value. None causes exception for invalid features sorted : bool or None, optional Specifies if input array are sorted by time moments. True is for certainly sorted, False is for unsorted. If None is specified than sorting is checked and an exception is raised for unsorted t check : bool, optional Check all input arrays for NaNs, t and m for infinite values cast : bool, optional Allows non-numpy input and casting of arrays to a common dtype. If False, inputs must be np.ndarray instances with matched dtypes. Casting provides more flexibility with input types at the cost of performance. Returns


ndarray of np.float32 or np.float64 Extracted feature array

many

Parallel light curve feature extraction

It is a parallel executed equivalent of

def many(self, lcs, , fill_value=None, sorted=None, check=True): ... return np.stack( ... [ ... self( ... lc, ... fill_value=fill_value, ... sorted=sorted, ... check=check, ... cast=False, ... ) ... for lc in lcs ... ] ... )

Parameters

lcs : list of (t, m, sigma) or Arrow array Either a list of light curves packed into three-tuples (all numpy.ndarray of the same dtype), or an Arrow array/chunked array of type List<Struct<...>> where the selected fields share the same float dtype (float32 or float64). Arrow input is auto-detected via the arrow_c_array / arrow_c_stream protocol and enables zero-copy data access from pyarrow, polars, and other Arrow-compatible libraries. arrow_fields : list of (str or int) Required when lcs is an Arrow array. Field names or indices specifying which struct fields to use as t, m, and optionally sigma. Must contain 2 elements [t, m] or 3 elements [t, m, sigma]. Each element may be a field name (str) or a zero-based positional index (int); all elements must be of the same type. Ignored for non-Arrow input. fill_value : float or None, optional Fill invalid values by this or raise an exception if None sorted : bool or None, optional Specifies if input array are sorted by time moments, see call documentation for details check : bool, optional Check all input arrays for NaNs, t and m for infinite values n_jobs : int Number of tasks to run in paralell. Default is -1 which means run as many jobs as CPU count. See rayon rust crate documentation for details

default_transform = 'identity' class-attribute

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

supported_transforms = ['arcsinh', 'clipped_lg', 'identity', 'lg', 'ln1p', 'sqrt'] class-attribute

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.


light_curve.Mean

Bases: light_curve.light_curve_ext._FeatureEvaluator

Mean magnitude

$$ \langle m \rangle \equiv \frac1{N} \sum_i m_i. $$ This is non-weighted mean, see WeightedMean for weighted mean.

  • Depends on: magnitude
  • Minimum number of observations: 1
  • Number of features: 1

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, it 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, must be True to use default transformer or False to disable. If None, no transformation is applied

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

Methods:

Name Description
__call__

Extract features and return them as a numpy array

Parameters

t : numpy.ndarray of np.float32 or np.float64 dtype Time moments m : numpy.ndarray Signal in magnitude or fluxes. Refer to the feature description to decide which would work better in your case sigma : numpy.ndarray, optional Observation error, if None it is assumed to be unity fill_value : float or None, optional Value to fill invalid feature values, for example if count of observations is not enough to find a proper value. None causes exception for invalid features sorted : bool or None, optional Specifies if input array are sorted by time moments. True is for certainly sorted, False is for unsorted. If None is specified than sorting is checked and an exception is raised for unsorted t check : bool, optional Check all input arrays for NaNs, t and m for infinite values cast : bool, optional Allows non-numpy input and casting of arrays to a common dtype. If False, inputs must be np.ndarray instances with matched dtypes. Casting provides more flexibility with input types at the cost of performance. Returns


ndarray of np.float32 or np.float64 Extracted feature array

many

Parallel light curve feature extraction

It is a parallel executed equivalent of

def many(self, lcs, , fill_value=None, sorted=None, check=True): ... return np.stack( ... [ ... self( ... lc, ... fill_value=fill_value, ... sorted=sorted, ... check=check, ... cast=False, ... ) ... for lc in lcs ... ] ... )

Parameters

lcs : list of (t, m, sigma) or Arrow array Either a list of light curves packed into three-tuples (all numpy.ndarray of the same dtype), or an Arrow array/chunked array of type List<Struct<...>> where the selected fields share the same float dtype (float32 or float64). Arrow input is auto-detected via the arrow_c_array / arrow_c_stream protocol and enables zero-copy data access from pyarrow, polars, and other Arrow-compatible libraries. arrow_fields : list of (str or int) Required when lcs is an Arrow array. Field names or indices specifying which struct fields to use as t, m, and optionally sigma. Must contain 2 elements [t, m] or 3 elements [t, m, sigma]. Each element may be a field name (str) or a zero-based positional index (int); all elements must be of the same type. Ignored for non-Arrow input. fill_value : float or None, optional Fill invalid values by this or raise an exception if None sorted : bool or None, optional Specifies if input array are sorted by time moments, see call documentation for details check : bool, optional Check all input arrays for NaNs, t and m for infinite values n_jobs : int Number of tasks to run in paralell. Default is -1 which means run as many jobs as CPU count. See rayon rust crate documentation for details

default_transform = 'identity' class-attribute

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

supported_transforms = ['arcsinh', 'clipped_lg', 'identity', 'lg', 'ln1p', 'sqrt'] class-attribute

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.


light_curve.MeanVariance

Bases: light_curve.light_curve_ext._FeatureEvaluator

Standard deviation to mean ratio

\[ \frac{\sigma_m}{\langle m \rangle} \]
  • Depends on: magnitude
  • Minimum number of observations: 2
  • Number of features: 1

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, it 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, must be True to use default transformer or False to disable. If None, no transformation is applied

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

Methods:

Name Description
__call__

Extract features and return them as a numpy array

Parameters

t : numpy.ndarray of np.float32 or np.float64 dtype Time moments m : numpy.ndarray Signal in magnitude or fluxes. Refer to the feature description to decide which would work better in your case sigma : numpy.ndarray, optional Observation error, if None it is assumed to be unity fill_value : float or None, optional Value to fill invalid feature values, for example if count of observations is not enough to find a proper value. None causes exception for invalid features sorted : bool or None, optional Specifies if input array are sorted by time moments. True is for certainly sorted, False is for unsorted. If None is specified than sorting is checked and an exception is raised for unsorted t check : bool, optional Check all input arrays for NaNs, t and m for infinite values cast : bool, optional Allows non-numpy input and casting of arrays to a common dtype. If False, inputs must be np.ndarray instances with matched dtypes. Casting provides more flexibility with input types at the cost of performance. Returns


ndarray of np.float32 or np.float64 Extracted feature array

many

Parallel light curve feature extraction

It is a parallel executed equivalent of

def many(self, lcs, , fill_value=None, sorted=None, check=True): ... return np.stack( ... [ ... self( ... lc, ... fill_value=fill_value, ... sorted=sorted, ... check=check, ... cast=False, ... ) ... for lc in lcs ... ] ... )

Parameters

lcs : list of (t, m, sigma) or Arrow array Either a list of light curves packed into three-tuples (all numpy.ndarray of the same dtype), or an Arrow array/chunked array of type List<Struct<...>> where the selected fields share the same float dtype (float32 or float64). Arrow input is auto-detected via the arrow_c_array / arrow_c_stream protocol and enables zero-copy data access from pyarrow, polars, and other Arrow-compatible libraries. arrow_fields : list of (str or int) Required when lcs is an Arrow array. Field names or indices specifying which struct fields to use as t, m, and optionally sigma. Must contain 2 elements [t, m] or 3 elements [t, m, sigma]. Each element may be a field name (str) or a zero-based positional index (int); all elements must be of the same type. Ignored for non-Arrow input. fill_value : float or None, optional Fill invalid values by this or raise an exception if None sorted : bool or None, optional Specifies if input array are sorted by time moments, see call documentation for details check : bool, optional Check all input arrays for NaNs, t and m for infinite values n_jobs : int Number of tasks to run in paralell. Default is -1 which means run as many jobs as CPU count. See rayon rust crate documentation for details

default_transform = 'identity' class-attribute

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

supported_transforms = ['arcsinh', 'clipped_lg', 'identity', 'lg', 'ln1p', 'sqrt'] class-attribute

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.


light_curve.Median

Bases: light_curve.light_curve_ext._FeatureEvaluator

Median magnitude

\[ \mathrm{Median}(m_i) \]
  • Depends on: magnitude
  • Minimum number of observations: 1
  • Number of features: 1

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, it 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, must be True to use default transformer or False to disable. If None, no transformation is applied

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

Methods:

Name Description
__call__

Extract features and return them as a numpy array

Parameters

t : numpy.ndarray of np.float32 or np.float64 dtype Time moments m : numpy.ndarray Signal in magnitude or fluxes. Refer to the feature description to decide which would work better in your case sigma : numpy.ndarray, optional Observation error, if None it is assumed to be unity fill_value : float or None, optional Value to fill invalid feature values, for example if count of observations is not enough to find a proper value. None causes exception for invalid features sorted : bool or None, optional Specifies if input array are sorted by time moments. True is for certainly sorted, False is for unsorted. If None is specified than sorting is checked and an exception is raised for unsorted t check : bool, optional Check all input arrays for NaNs, t and m for infinite values cast : bool, optional Allows non-numpy input and casting of arrays to a common dtype. If False, inputs must be np.ndarray instances with matched dtypes. Casting provides more flexibility with input types at the cost of performance. Returns


ndarray of np.float32 or np.float64 Extracted feature array

many

Parallel light curve feature extraction

It is a parallel executed equivalent of

def many(self, lcs, , fill_value=None, sorted=None, check=True): ... return np.stack( ... [ ... self( ... lc, ... fill_value=fill_value, ... sorted=sorted, ... check=check, ... cast=False, ... ) ... for lc in lcs ... ] ... )

Parameters

lcs : list of (t, m, sigma) or Arrow array Either a list of light curves packed into three-tuples (all numpy.ndarray of the same dtype), or an Arrow array/chunked array of type List<Struct<...>> where the selected fields share the same float dtype (float32 or float64). Arrow input is auto-detected via the arrow_c_array / arrow_c_stream protocol and enables zero-copy data access from pyarrow, polars, and other Arrow-compatible libraries. arrow_fields : list of (str or int) Required when lcs is an Arrow array. Field names or indices specifying which struct fields to use as t, m, and optionally sigma. Must contain 2 elements [t, m] or 3 elements [t, m, sigma]. Each element may be a field name (str) or a zero-based positional index (int); all elements must be of the same type. Ignored for non-Arrow input. fill_value : float or None, optional Fill invalid values by this or raise an exception if None sorted : bool or None, optional Specifies if input array are sorted by time moments, see call documentation for details check : bool, optional Check all input arrays for NaNs, t and m for infinite values n_jobs : int Number of tasks to run in paralell. Default is -1 which means run as many jobs as CPU count. See rayon rust crate documentation for details

default_transform = 'identity' class-attribute

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

supported_transforms = ['arcsinh', 'clipped_lg', 'identity', 'lg', 'ln1p', 'sqrt'] class-attribute

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.


light_curve.MedianAbsoluteDeviation

Bases: light_curve.light_curve_ext._FeatureEvaluator

Median of the absolute value of the difference between magnitude and its median

\[ \mathrm{median~absolute~deviation} \equiv \mathrm{Median}\left(|m_i - \mathrm{Median}(m)|\right). \]
  • Depends on: magnitude
  • Minimum number of observations: 1
  • Number of features: 1

D’Isanto et al. 2016 DOI:10.1093/mnras/stw157

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, it 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, must be True to use default transformer or False to disable. If None, no transformation is applied

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

Methods:

Name Description
__call__

Extract features and return them as a numpy array

Parameters

t : numpy.ndarray of np.float32 or np.float64 dtype Time moments m : numpy.ndarray Signal in magnitude or fluxes. Refer to the feature description to decide which would work better in your case sigma : numpy.ndarray, optional Observation error, if None it is assumed to be unity fill_value : float or None, optional Value to fill invalid feature values, for example if count of observations is not enough to find a proper value. None causes exception for invalid features sorted : bool or None, optional Specifies if input array are sorted by time moments. True is for certainly sorted, False is for unsorted. If None is specified than sorting is checked and an exception is raised for unsorted t check : bool, optional Check all input arrays for NaNs, t and m for infinite values cast : bool, optional Allows non-numpy input and casting of arrays to a common dtype. If False, inputs must be np.ndarray instances with matched dtypes. Casting provides more flexibility with input types at the cost of performance. Returns


ndarray of np.float32 or np.float64 Extracted feature array

many

Parallel light curve feature extraction

It is a parallel executed equivalent of

def many(self, lcs, , fill_value=None, sorted=None, check=True): ... return np.stack( ... [ ... self( ... lc, ... fill_value=fill_value, ... sorted=sorted, ... check=check, ... cast=False, ... ) ... for lc in lcs ... ] ... )

Parameters

lcs : list of (t, m, sigma) or Arrow array Either a list of light curves packed into three-tuples (all numpy.ndarray of the same dtype), or an Arrow array/chunked array of type List<Struct<...>> where the selected fields share the same float dtype (float32 or float64). Arrow input is auto-detected via the arrow_c_array / arrow_c_stream protocol and enables zero-copy data access from pyarrow, polars, and other Arrow-compatible libraries. arrow_fields : list of (str or int) Required when lcs is an Arrow array. Field names or indices specifying which struct fields to use as t, m, and optionally sigma. Must contain 2 elements [t, m] or 3 elements [t, m, sigma]. Each element may be a field name (str) or a zero-based positional index (int); all elements must be of the same type. Ignored for non-Arrow input. fill_value : float or None, optional Fill invalid values by this or raise an exception if None sorted : bool or None, optional Specifies if input array are sorted by time moments, see call documentation for details check : bool, optional Check all input arrays for NaNs, t and m for infinite values n_jobs : int Number of tasks to run in paralell. Default is -1 which means run as many jobs as CPU count. See rayon rust crate documentation for details

default_transform = 'identity' class-attribute

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

supported_transforms = ['arcsinh', 'clipped_lg', 'identity', 'lg', 'ln1p', 'sqrt'] class-attribute

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.


light_curve.MedianBufferRangePercentage

Bases: light_curve.light_curve_ext._FeatureEvaluator

Fraction of observations inside \(\mathrm{Median}(m) \pm q \times (\max(m) - \min(m)) / 2\) interval

  • Depends on: magnitude
  • Minimum number of observations: 1
  • Number of features: 1

D’Isanto et al. 2016 DOI:10.1093/mnras/stw157

Parameters:

Name Type Description Default
quantile positive float

Relative range size, default is 0.10

required
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, it 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, must be True to use default transformer or False to disable. If None, no transformation is applied

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

Methods:

Name Description
__call__

Extract features and return them as a numpy array

Parameters

t : numpy.ndarray of np.float32 or np.float64 dtype Time moments m : numpy.ndarray Signal in magnitude or fluxes. Refer to the feature description to decide which would work better in your case sigma : numpy.ndarray, optional Observation error, if None it is assumed to be unity fill_value : float or None, optional Value to fill invalid feature values, for example if count of observations is not enough to find a proper value. None causes exception for invalid features sorted : bool or None, optional Specifies if input array are sorted by time moments. True is for certainly sorted, False is for unsorted. If None is specified than sorting is checked and an exception is raised for unsorted t check : bool, optional Check all input arrays for NaNs, t and m for infinite values cast : bool, optional Allows non-numpy input and casting of arrays to a common dtype. If False, inputs must be np.ndarray instances with matched dtypes. Casting provides more flexibility with input types at the cost of performance. Returns


ndarray of np.float32 or np.float64 Extracted feature array

many

Parallel light curve feature extraction

It is a parallel executed equivalent of

def many(self, lcs, , fill_value=None, sorted=None, check=True): ... return np.stack( ... [ ... self( ... lc, ... fill_value=fill_value, ... sorted=sorted, ... check=check, ... cast=False, ... ) ... for lc in lcs ... ] ... )

Parameters

lcs : list of (t, m, sigma) or Arrow array Either a list of light curves packed into three-tuples (all numpy.ndarray of the same dtype), or an Arrow array/chunked array of type List<Struct<...>> where the selected fields share the same float dtype (float32 or float64). Arrow input is auto-detected via the arrow_c_array / arrow_c_stream protocol and enables zero-copy data access from pyarrow, polars, and other Arrow-compatible libraries. arrow_fields : list of (str or int) Required when lcs is an Arrow array. Field names or indices specifying which struct fields to use as t, m, and optionally sigma. Must contain 2 elements [t, m] or 3 elements [t, m, sigma]. Each element may be a field name (str) or a zero-based positional index (int); all elements must be of the same type. Ignored for non-Arrow input. fill_value : float or None, optional Fill invalid values by this or raise an exception if None sorted : bool or None, optional Specifies if input array are sorted by time moments, see call documentation for details check : bool, optional Check all input arrays for NaNs, t and m for infinite values n_jobs : int Number of tasks to run in paralell. Default is -1 which means run as many jobs as CPU count. See rayon rust crate documentation for details

default_transform = 'identity' class-attribute

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

supported_transforms = ['arcsinh', 'clipped_lg', 'identity', 'lg', 'ln1p', 'sqrt'] class-attribute

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.


light_curve.ObservationCount

Bases: light_curve.light_curve_ext._FeatureEvaluator

Number of observations

\[ N \]

Note: cadence-dependent feature.

  • Depends on: nothing
  • Minimum number of observations: 0
  • Number of features: 1

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, it 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, must be True to use default transformer or False to disable. If None, no transformation is applied

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

Methods:

Name Description
__call__

Extract features and return them as a numpy array

Parameters

t : numpy.ndarray of np.float32 or np.float64 dtype Time moments m : numpy.ndarray Signal in magnitude or fluxes. Refer to the feature description to decide which would work better in your case sigma : numpy.ndarray, optional Observation error, if None it is assumed to be unity fill_value : float or None, optional Value to fill invalid feature values, for example if count of observations is not enough to find a proper value. None causes exception for invalid features sorted : bool or None, optional Specifies if input array are sorted by time moments. True is for certainly sorted, False is for unsorted. If None is specified than sorting is checked and an exception is raised for unsorted t check : bool, optional Check all input arrays for NaNs, t and m for infinite values cast : bool, optional Allows non-numpy input and casting of arrays to a common dtype. If False, inputs must be np.ndarray instances with matched dtypes. Casting provides more flexibility with input types at the cost of performance. Returns


ndarray of np.float32 or np.float64 Extracted feature array

many

Parallel light curve feature extraction

It is a parallel executed equivalent of

def many(self, lcs, , fill_value=None, sorted=None, check=True): ... return np.stack( ... [ ... self( ... lc, ... fill_value=fill_value, ... sorted=sorted, ... check=check, ... cast=False, ... ) ... for lc in lcs ... ] ... )

Parameters

lcs : list of (t, m, sigma) or Arrow array Either a list of light curves packed into three-tuples (all numpy.ndarray of the same dtype), or an Arrow array/chunked array of type List<Struct<...>> where the selected fields share the same float dtype (float32 or float64). Arrow input is auto-detected via the arrow_c_array / arrow_c_stream protocol and enables zero-copy data access from pyarrow, polars, and other Arrow-compatible libraries. arrow_fields : list of (str or int) Required when lcs is an Arrow array. Field names or indices specifying which struct fields to use as t, m, and optionally sigma. Must contain 2 elements [t, m] or 3 elements [t, m, sigma]. Each element may be a field name (str) or a zero-based positional index (int); all elements must be of the same type. Ignored for non-Arrow input. fill_value : float or None, optional Fill invalid values by this or raise an exception if None sorted : bool or None, optional Specifies if input array are sorted by time moments, see call documentation for details check : bool, optional Check all input arrays for NaNs, t and m for infinite values n_jobs : int Number of tasks to run in paralell. Default is -1 which means run as many jobs as CPU count. See rayon rust crate documentation for details

default_transform = 'identity' class-attribute

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

supported_transforms = ['arcsinh', 'clipped_lg', 'identity', 'lg', 'ln1p', 'sqrt'] class-attribute

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.


light_curve.OtsuSplit

Bases: light_curve.light_curve_ext._FeatureEvaluator

Otsu threshholding algorithm

Difference of subset means, standard deviation of the lower subset, standard deviation of the upper subset and lower-to-all observation count ratio for two subsets of magnitudes obtained by Otsu's method split. Otsu's method is used to perform automatic thresholding. The algorithm returns a single threshold that separate values into two classes. This threshold is determined by minimizing intra-class intensity variance, or equivalently, by maximizing inter-class variance. The algorithm returns the minimum threshold which corresponds to the absolute maximum of the inter-class variance.

  • Depends on: magnitude
  • Minimum number of observations: 2
  • Number of features: 4

Otsu, Nobuyuki 1979. DOI:10.1109/tsmc.1979.4310076

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

Methods:

Name Description
__call__

Extract features and return them as a numpy array

Parameters

t : numpy.ndarray of np.float32 or np.float64 dtype Time moments m : numpy.ndarray Signal in magnitude or fluxes. Refer to the feature description to decide which would work better in your case sigma : numpy.ndarray, optional Observation error, if None it is assumed to be unity fill_value : float or None, optional Value to fill invalid feature values, for example if count of observations is not enough to find a proper value. None causes exception for invalid features sorted : bool or None, optional Specifies if input array are sorted by time moments. True is for certainly sorted, False is for unsorted. If None is specified than sorting is checked and an exception is raised for unsorted t check : bool, optional Check all input arrays for NaNs, t and m for infinite values cast : bool, optional Allows non-numpy input and casting of arrays to a common dtype. If False, inputs must be np.ndarray instances with matched dtypes. Casting provides more flexibility with input types at the cost of performance. Returns


ndarray of np.float32 or np.float64 Extracted feature array

many

Parallel light curve feature extraction

It is a parallel executed equivalent of

def many(self, lcs, , fill_value=None, sorted=None, check=True): ... return np.stack( ... [ ... self( ... lc, ... fill_value=fill_value, ... sorted=sorted, ... check=check, ... cast=False, ... ) ... for lc in lcs ... ] ... )

Parameters

lcs : list of (t, m, sigma) or Arrow array Either a list of light curves packed into three-tuples (all numpy.ndarray of the same dtype), or an Arrow array/chunked array of type List<Struct<...>> where the selected fields share the same float dtype (float32 or float64). Arrow input is auto-detected via the arrow_c_array / arrow_c_stream protocol and enables zero-copy data access from pyarrow, polars, and other Arrow-compatible libraries. arrow_fields : list of (str or int) Required when lcs is an Arrow array. Field names or indices specifying which struct fields to use as t, m, and optionally sigma. Must contain 2 elements [t, m] or 3 elements [t, m, sigma]. Each element may be a field name (str) or a zero-based positional index (int); all elements must be of the same type. Ignored for non-Arrow input. fill_value : float or None, optional Fill invalid values by this or raise an exception if None sorted : bool or None, optional Specifies if input array are sorted by time moments, see call documentation for details check : bool, optional Check all input arrays for NaNs, t and m for infinite values n_jobs : int Number of tasks to run in paralell. Default is -1 which means run as many jobs as CPU count. See rayon rust crate documentation for details


light_curve.PercentAmplitude

Bases: light_curve.light_curve_ext._FeatureEvaluator

Maximum deviation of magnitude from its median

\[ \mathrm{percent~amplitude} \equiv \max_i\left|m_i - \mathrm{Median}(m)\right| = \max(\max(m) - \mathrm{Median}(m), \mathrm{Median}(m) - \min(m)). \]
  • Depends on: magnitude
  • Minimum number of observations: 1
  • Number of features: 1

D’Isanto et al. 2016 DOI:10.1093/mnras/stw157

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, it 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, must be True to use default transformer or False to disable. If None, no transformation is applied

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

Methods:

Name Description
__call__

Extract features and return them as a numpy array

Parameters

t : numpy.ndarray of np.float32 or np.float64 dtype Time moments m : numpy.ndarray Signal in magnitude or fluxes. Refer to the feature description to decide which would work better in your case sigma : numpy.ndarray, optional Observation error, if None it is assumed to be unity fill_value : float or None, optional Value to fill invalid feature values, for example if count of observations is not enough to find a proper value. None causes exception for invalid features sorted : bool or None, optional Specifies if input array are sorted by time moments. True is for certainly sorted, False is for unsorted. If None is specified than sorting is checked and an exception is raised for unsorted t check : bool, optional Check all input arrays for NaNs, t and m for infinite values cast : bool, optional Allows non-numpy input and casting of arrays to a common dtype. If False, inputs must be np.ndarray instances with matched dtypes. Casting provides more flexibility with input types at the cost of performance. Returns


ndarray of np.float32 or np.float64 Extracted feature array

many

Parallel light curve feature extraction

It is a parallel executed equivalent of

def many(self, lcs, , fill_value=None, sorted=None, check=True): ... return np.stack( ... [ ... self( ... lc, ... fill_value=fill_value, ... sorted=sorted, ... check=check, ... cast=False, ... ) ... for lc in lcs ... ] ... )

Parameters

lcs : list of (t, m, sigma) or Arrow array Either a list of light curves packed into three-tuples (all numpy.ndarray of the same dtype), or an Arrow array/chunked array of type List<Struct<...>> where the selected fields share the same float dtype (float32 or float64). Arrow input is auto-detected via the arrow_c_array / arrow_c_stream protocol and enables zero-copy data access from pyarrow, polars, and other Arrow-compatible libraries. arrow_fields : list of (str or int) Required when lcs is an Arrow array. Field names or indices specifying which struct fields to use as t, m, and optionally sigma. Must contain 2 elements [t, m] or 3 elements [t, m, sigma]. Each element may be a field name (str) or a zero-based positional index (int); all elements must be of the same type. Ignored for non-Arrow input. fill_value : float or None, optional Fill invalid values by this or raise an exception if None sorted : bool or None, optional Specifies if input array are sorted by time moments, see call documentation for details check : bool, optional Check all input arrays for NaNs, t and m for infinite values n_jobs : int Number of tasks to run in paralell. Default is -1 which means run as many jobs as CPU count. See rayon rust crate documentation for details

default_transform = 'identity' class-attribute

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

supported_transforms = ['arcsinh', 'clipped_lg', 'identity', 'lg', 'ln1p', 'sqrt'] class-attribute

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.


light_curve.PercentDifferenceMagnitudePercentile

Bases: light_curve.light_curve_ext._FeatureEvaluator

Ratio of \(p\)th inter-percentile range to the median

\[ p\mathrm{~percent~difference~magnitude~percentile} \equiv \frac{Q(1-p) - Q(p)}{\mathrm{Median}(m)}. \]
  • Depends on: magnitude
  • Minimum number of observations: 1
  • Number of features: 1

D’Isanto et al. 2016 DOI:10.1093/mnras/stw157

Parameters:

Name Type Description Default
quantile positive float

Relative range size, default is 0.05

required
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, it same as giving True. The default for this feature is 'clipped_lg' - '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, must be True to use default transformer or False to disable. If None, no transformation is applied

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

Methods:

Name Description
__call__

Extract features and return them as a numpy array

Parameters

t : numpy.ndarray of np.float32 or np.float64 dtype Time moments m : numpy.ndarray Signal in magnitude or fluxes. Refer to the feature description to decide which would work better in your case sigma : numpy.ndarray, optional Observation error, if None it is assumed to be unity fill_value : float or None, optional Value to fill invalid feature values, for example if count of observations is not enough to find a proper value. None causes exception for invalid features sorted : bool or None, optional Specifies if input array are sorted by time moments. True is for certainly sorted, False is for unsorted. If None is specified than sorting is checked and an exception is raised for unsorted t check : bool, optional Check all input arrays for NaNs, t and m for infinite values cast : bool, optional Allows non-numpy input and casting of arrays to a common dtype. If False, inputs must be np.ndarray instances with matched dtypes. Casting provides more flexibility with input types at the cost of performance. Returns


ndarray of np.float32 or np.float64 Extracted feature array

many

Parallel light curve feature extraction

It is a parallel executed equivalent of

def many(self, lcs, , fill_value=None, sorted=None, check=True): ... return np.stack( ... [ ... self( ... lc, ... fill_value=fill_value, ... sorted=sorted, ... check=check, ... cast=False, ... ) ... for lc in lcs ... ] ... )

Parameters

lcs : list of (t, m, sigma) or Arrow array Either a list of light curves packed into three-tuples (all numpy.ndarray of the same dtype), or an Arrow array/chunked array of type List<Struct<...>> where the selected fields share the same float dtype (float32 or float64). Arrow input is auto-detected via the arrow_c_array / arrow_c_stream protocol and enables zero-copy data access from pyarrow, polars, and other Arrow-compatible libraries. arrow_fields : list of (str or int) Required when lcs is an Arrow array. Field names or indices specifying which struct fields to use as t, m, and optionally sigma. Must contain 2 elements [t, m] or 3 elements [t, m, sigma]. Each element may be a field name (str) or a zero-based positional index (int); all elements must be of the same type. Ignored for non-Arrow input. fill_value : float or None, optional Fill invalid values by this or raise an exception if None sorted : bool or None, optional Specifies if input array are sorted by time moments, see call documentation for details check : bool, optional Check all input arrays for NaNs, t and m for infinite values n_jobs : int Number of tasks to run in paralell. Default is -1 which means run as many jobs as CPU count. See rayon rust crate documentation for details

default_transform = 'clipped_lg' class-attribute

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

supported_transforms = ['arcsinh', 'clipped_lg', 'identity', 'lg', 'ln1p', 'sqrt'] class-attribute

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.


light_curve.ReducedChi2

Bases: light_curve.light_curve_ext._FeatureEvaluator

Reduced \(\chi^2\) of magnitude measurements

$$ \mathrm{reduced~}\chi^2 \equiv \frac1{N-1} \sum_i\left(\frac{m_i - \bar{m}}{\delta_i}\right)^2, $$ where \(N\) is the number of observations, and \(\bar{m}\) is the weighted mean magnitude.

  • Depends on: magnitude, magnitude error
  • Minimum number of observations: 2
  • Number of features: 1

This is a good measure of variability which takes into account observations uncertainties.

Wikipedia

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, it same as giving True. The default for this feature is 'ln1p' - '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, must be True to use default transformer or False to disable. If None, no transformation is applied

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

Methods:

Name Description
__call__

Extract features and return them as a numpy array

Parameters

t : numpy.ndarray of np.float32 or np.float64 dtype Time moments m : numpy.ndarray Signal in magnitude or fluxes. Refer to the feature description to decide which would work better in your case sigma : numpy.ndarray, optional Observation error, if None it is assumed to be unity fill_value : float or None, optional Value to fill invalid feature values, for example if count of observations is not enough to find a proper value. None causes exception for invalid features sorted : bool or None, optional Specifies if input array are sorted by time moments. True is for certainly sorted, False is for unsorted. If None is specified than sorting is checked and an exception is raised for unsorted t check : bool, optional Check all input arrays for NaNs, t and m for infinite values cast : bool, optional Allows non-numpy input and casting of arrays to a common dtype. If False, inputs must be np.ndarray instances with matched dtypes. Casting provides more flexibility with input types at the cost of performance. Returns


ndarray of np.float32 or np.float64 Extracted feature array

many

Parallel light curve feature extraction

It is a parallel executed equivalent of

def many(self, lcs, , fill_value=None, sorted=None, check=True): ... return np.stack( ... [ ... self( ... lc, ... fill_value=fill_value, ... sorted=sorted, ... check=check, ... cast=False, ... ) ... for lc in lcs ... ] ... )

Parameters

lcs : list of (t, m, sigma) or Arrow array Either a list of light curves packed into three-tuples (all numpy.ndarray of the same dtype), or an Arrow array/chunked array of type List<Struct<...>> where the selected fields share the same float dtype (float32 or float64). Arrow input is auto-detected via the arrow_c_array / arrow_c_stream protocol and enables zero-copy data access from pyarrow, polars, and other Arrow-compatible libraries. arrow_fields : list of (str or int) Required when lcs is an Arrow array. Field names or indices specifying which struct fields to use as t, m, and optionally sigma. Must contain 2 elements [t, m] or 3 elements [t, m, sigma]. Each element may be a field name (str) or a zero-based positional index (int); all elements must be of the same type. Ignored for non-Arrow input. fill_value : float or None, optional Fill invalid values by this or raise an exception if None sorted : bool or None, optional Specifies if input array are sorted by time moments, see call documentation for details check : bool, optional Check all input arrays for NaNs, t and m for infinite values n_jobs : int Number of tasks to run in paralell. Default is -1 which means run as many jobs as CPU count. See rayon rust crate documentation for details

default_transform = 'ln1p' class-attribute

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

supported_transforms = ['arcsinh', 'clipped_lg', 'identity', 'lg', 'ln1p', 'sqrt'] class-attribute

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.


light_curve.Roms

Bases: light_curve.light_curve_ext._FeatureEvaluator

Robust median statistic

$$
\frac1{N-1} \sum_{i=0}^{N-1} \frac{|m_i - \mathrm{median}(m_i)|}{\sigma_i}
$$
For non-variable data, it should be less than one.

- Depends on: **magnitude**, **errors**
- Minimum number of observations: **2**
- Number of features: **1**

Enoch, Brown, Burgasser 2003. [DOI:10.1086/376598](https://www.doi.org/10.1086/376598)

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, it 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, must be True to use default transformer or False to disable. If None, no transformation is applied

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

Methods:

Name Description
__call__

Extract features and return them as a numpy array

Parameters

t : numpy.ndarray of np.float32 or np.float64 dtype Time moments m : numpy.ndarray Signal in magnitude or fluxes. Refer to the feature description to decide which would work better in your case sigma : numpy.ndarray, optional Observation error, if None it is assumed to be unity fill_value : float or None, optional Value to fill invalid feature values, for example if count of observations is not enough to find a proper value. None causes exception for invalid features sorted : bool or None, optional Specifies if input array are sorted by time moments. True is for certainly sorted, False is for unsorted. If None is specified than sorting is checked and an exception is raised for unsorted t check : bool, optional Check all input arrays for NaNs, t and m for infinite values cast : bool, optional Allows non-numpy input and casting of arrays to a common dtype. If False, inputs must be np.ndarray instances with matched dtypes. Casting provides more flexibility with input types at the cost of performance. Returns


ndarray of np.float32 or np.float64 Extracted feature array

many

Parallel light curve feature extraction

It is a parallel executed equivalent of

def many(self, lcs, , fill_value=None, sorted=None, check=True): ... return np.stack( ... [ ... self( ... lc, ... fill_value=fill_value, ... sorted=sorted, ... check=check, ... cast=False, ... ) ... for lc in lcs ... ] ... )

Parameters

lcs : list of (t, m, sigma) or Arrow array Either a list of light curves packed into three-tuples (all numpy.ndarray of the same dtype), or an Arrow array/chunked array of type List<Struct<...>> where the selected fields share the same float dtype (float32 or float64). Arrow input is auto-detected via the arrow_c_array / arrow_c_stream protocol and enables zero-copy data access from pyarrow, polars, and other Arrow-compatible libraries. arrow_fields : list of (str or int) Required when lcs is an Arrow array. Field names or indices specifying which struct fields to use as t, m, and optionally sigma. Must contain 2 elements [t, m] or 3 elements [t, m, sigma]. Each element may be a field name (str) or a zero-based positional index (int); all elements must be of the same type. Ignored for non-Arrow input. fill_value : float or None, optional Fill invalid values by this or raise an exception if None sorted : bool or None, optional Specifies if input array are sorted by time moments, see call documentation for details check : bool, optional Check all input arrays for NaNs, t and m for infinite values n_jobs : int Number of tasks to run in paralell. Default is -1 which means run as many jobs as CPU count. See rayon rust crate documentation for details

default_transform = 'identity' class-attribute

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

supported_transforms = ['arcsinh', 'clipped_lg', 'identity', 'lg', 'ln1p', 'sqrt'] class-attribute

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.


light_curve.Skew

Bases: light_curve.light_curve_ext._FeatureEvaluator

Skewness of magnitude \(G_1\)

$$ G_1 \equiv \frac{N}{(N - 1)(N - 2)} \frac{\sum_i(m_i - \langle m \rangle)^3}{\sigma_m^3}, $$ where \(N\) is the number of observations, \(\langle m \rangle\) is the mean magnitude, \(\sigma_m = \sqrt{\sum_i (m_i - \langle m \rangle)^2 / (N-1)}\) is the magnitude standard deviation.

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

Wikipedia

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, it same as giving True. The default for this feature is 'arcsinh' - '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, must be True to use default transformer or False to disable. If None, no transformation is applied

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

Methods:

Name Description
__call__

Extract features and return them as a numpy array

Parameters

t : numpy.ndarray of np.float32 or np.float64 dtype Time moments m : numpy.ndarray Signal in magnitude or fluxes. Refer to the feature description to decide which would work better in your case sigma : numpy.ndarray, optional Observation error, if None it is assumed to be unity fill_value : float or None, optional Value to fill invalid feature values, for example if count of observations is not enough to find a proper value. None causes exception for invalid features sorted : bool or None, optional Specifies if input array are sorted by time moments. True is for certainly sorted, False is for unsorted. If None is specified than sorting is checked and an exception is raised for unsorted t check : bool, optional Check all input arrays for NaNs, t and m for infinite values cast : bool, optional Allows non-numpy input and casting of arrays to a common dtype. If False, inputs must be np.ndarray instances with matched dtypes. Casting provides more flexibility with input types at the cost of performance. Returns


ndarray of np.float32 or np.float64 Extracted feature array

many

Parallel light curve feature extraction

It is a parallel executed equivalent of

def many(self, lcs, , fill_value=None, sorted=None, check=True): ... return np.stack( ... [ ... self( ... lc, ... fill_value=fill_value, ... sorted=sorted, ... check=check, ... cast=False, ... ) ... for lc in lcs ... ] ... )

Parameters

lcs : list of (t, m, sigma) or Arrow array Either a list of light curves packed into three-tuples (all numpy.ndarray of the same dtype), or an Arrow array/chunked array of type List<Struct<...>> where the selected fields share the same float dtype (float32 or float64). Arrow input is auto-detected via the arrow_c_array / arrow_c_stream protocol and enables zero-copy data access from pyarrow, polars, and other Arrow-compatible libraries. arrow_fields : list of (str or int) Required when lcs is an Arrow array. Field names or indices specifying which struct fields to use as t, m, and optionally sigma. Must contain 2 elements [t, m] or 3 elements [t, m, sigma]. Each element may be a field name (str) or a zero-based positional index (int); all elements must be of the same type. Ignored for non-Arrow input. fill_value : float or None, optional Fill invalid values by this or raise an exception if None sorted : bool or None, optional Specifies if input array are sorted by time moments, see call documentation for details check : bool, optional Check all input arrays for NaNs, t and m for infinite values n_jobs : int Number of tasks to run in paralell. Default is -1 which means run as many jobs as CPU count. See rayon rust crate documentation for details

default_transform = 'arcsinh' class-attribute

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

supported_transforms = ['arcsinh', 'clipped_lg', 'identity', 'lg', 'ln1p', 'sqrt'] class-attribute

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.


light_curve.StandardDeviation

Bases: light_curve.light_curve_ext._FeatureEvaluator

Standard deviation of magnitude \(\sigma_m\)

\[ \sigma_m \equiv \sqrt{\sum_i (m_i - \langle m \rangle)^2 / (N-1)}, \]

\(N\) is the number of observations and \(\langle m \rangle\) is the mean magnitude.

  • Depends on: magnitude
  • Minimum number of observations: 2
  • Number of features: 1

Wikipedia

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, it 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, must be True to use default transformer or False to disable. If None, no transformation is applied

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

Methods:

Name Description
__call__

Extract features and return them as a numpy array

Parameters

t : numpy.ndarray of np.float32 or np.float64 dtype Time moments m : numpy.ndarray Signal in magnitude or fluxes. Refer to the feature description to decide which would work better in your case sigma : numpy.ndarray, optional Observation error, if None it is assumed to be unity fill_value : float or None, optional Value to fill invalid feature values, for example if count of observations is not enough to find a proper value. None causes exception for invalid features sorted : bool or None, optional Specifies if input array are sorted by time moments. True is for certainly sorted, False is for unsorted. If None is specified than sorting is checked and an exception is raised for unsorted t check : bool, optional Check all input arrays for NaNs, t and m for infinite values cast : bool, optional Allows non-numpy input and casting of arrays to a common dtype. If False, inputs must be np.ndarray instances with matched dtypes. Casting provides more flexibility with input types at the cost of performance. Returns


ndarray of np.float32 or np.float64 Extracted feature array

many

Parallel light curve feature extraction

It is a parallel executed equivalent of

def many(self, lcs, , fill_value=None, sorted=None, check=True): ... return np.stack( ... [ ... self( ... lc, ... fill_value=fill_value, ... sorted=sorted, ... check=check, ... cast=False, ... ) ... for lc in lcs ... ] ... )

Parameters

lcs : list of (t, m, sigma) or Arrow array Either a list of light curves packed into three-tuples (all numpy.ndarray of the same dtype), or an Arrow array/chunked array of type List<Struct<...>> where the selected fields share the same float dtype (float32 or float64). Arrow input is auto-detected via the arrow_c_array / arrow_c_stream protocol and enables zero-copy data access from pyarrow, polars, and other Arrow-compatible libraries. arrow_fields : list of (str or int) Required when lcs is an Arrow array. Field names or indices specifying which struct fields to use as t, m, and optionally sigma. Must contain 2 elements [t, m] or 3 elements [t, m, sigma]. Each element may be a field name (str) or a zero-based positional index (int); all elements must be of the same type. Ignored for non-Arrow input. fill_value : float or None, optional Fill invalid values by this or raise an exception if None sorted : bool or None, optional Specifies if input array are sorted by time moments, see call documentation for details check : bool, optional Check all input arrays for NaNs, t and m for infinite values n_jobs : int Number of tasks to run in paralell. Default is -1 which means run as many jobs as CPU count. See rayon rust crate documentation for details

default_transform = 'identity' class-attribute

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

supported_transforms = ['arcsinh', 'clipped_lg', 'identity', 'lg', 'ln1p', 'sqrt'] class-attribute

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.


light_curve.StetsonK

Bases: light_curve.light_curve_ext._FeatureEvaluator

Stetson \(K\) coefficient described light curve shape

$$ \mathrm{Stetson}~K \equiv \frac{\sum_i\left|\frac{m_i - \bar{m}}{\delta_i}\right|}{\sqrt{N\,\chi^2}}, $$ where N is the number of observations, \(\bar{m}\) is the weighted mean magnitude and \(\chi^2 = \sum_i\left(\frac{m_i - \langle m \rangle}{\delta\_i}\right)^2\).

  • Depends on: magnitude, magnitude error
  • Minimum number of observations: 2
  • Number of features: 1

P. B. Stetson, 1996. DOI:10.1086/133808

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, it 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, must be True to use default transformer or False to disable. If None, no transformation is applied

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

Methods:

Name Description
__call__

Extract features and return them as a numpy array

Parameters

t : numpy.ndarray of np.float32 or np.float64 dtype Time moments m : numpy.ndarray Signal in magnitude or fluxes. Refer to the feature description to decide which would work better in your case sigma : numpy.ndarray, optional Observation error, if None it is assumed to be unity fill_value : float or None, optional Value to fill invalid feature values, for example if count of observations is not enough to find a proper value. None causes exception for invalid features sorted : bool or None, optional Specifies if input array are sorted by time moments. True is for certainly sorted, False is for unsorted. If None is specified than sorting is checked and an exception is raised for unsorted t check : bool, optional Check all input arrays for NaNs, t and m for infinite values cast : bool, optional Allows non-numpy input and casting of arrays to a common dtype. If False, inputs must be np.ndarray instances with matched dtypes. Casting provides more flexibility with input types at the cost of performance. Returns


ndarray of np.float32 or np.float64 Extracted feature array

many

Parallel light curve feature extraction

It is a parallel executed equivalent of

def many(self, lcs, , fill_value=None, sorted=None, check=True): ... return np.stack( ... [ ... self( ... lc, ... fill_value=fill_value, ... sorted=sorted, ... check=check, ... cast=False, ... ) ... for lc in lcs ... ] ... )

Parameters

lcs : list of (t, m, sigma) or Arrow array Either a list of light curves packed into three-tuples (all numpy.ndarray of the same dtype), or an Arrow array/chunked array of type List<Struct<...>> where the selected fields share the same float dtype (float32 or float64). Arrow input is auto-detected via the arrow_c_array / arrow_c_stream protocol and enables zero-copy data access from pyarrow, polars, and other Arrow-compatible libraries. arrow_fields : list of (str or int) Required when lcs is an Arrow array. Field names or indices specifying which struct fields to use as t, m, and optionally sigma. Must contain 2 elements [t, m] or 3 elements [t, m, sigma]. Each element may be a field name (str) or a zero-based positional index (int); all elements must be of the same type. Ignored for non-Arrow input. fill_value : float or None, optional Fill invalid values by this or raise an exception if None sorted : bool or None, optional Specifies if input array are sorted by time moments, see call documentation for details check : bool, optional Check all input arrays for NaNs, t and m for infinite values n_jobs : int Number of tasks to run in paralell. Default is -1 which means run as many jobs as CPU count. See rayon rust crate documentation for details

default_transform = 'identity' class-attribute

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

supported_transforms = ['arcsinh', 'clipped_lg', 'identity', 'lg', 'ln1p', 'sqrt'] class-attribute

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.


light_curve.WeightedMean

Bases: light_curve.light_curve_ext._FeatureEvaluator

Weighted mean magnitude

$$ \bar{m} \equiv \frac{\sum_i m_i / \delta_i^2}{\sum_i 1 / \delta_i^2}. $$ See Mean for non-weighted mean.

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

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, it 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, must be True to use default transformer or False to disable. If None, no transformation is applied

required

Attributes:

Name Type Description
names list of str

Feature names

descriptions list of str

Feature descriptions

Methods:

Name Description
__call__

Extract features and return them as a numpy array

Parameters

t : numpy.ndarray of np.float32 or np.float64 dtype Time moments m : numpy.ndarray Signal in magnitude or fluxes. Refer to the feature description to decide which would work better in your case sigma : numpy.ndarray, optional Observation error, if None it is assumed to be unity fill_value : float or None, optional Value to fill invalid feature values, for example if count of observations is not enough to find a proper value. None causes exception for invalid features sorted : bool or None, optional Specifies if input array are sorted by time moments. True is for certainly sorted, False is for unsorted. If None is specified than sorting is checked and an exception is raised for unsorted t check : bool, optional Check all input arrays for NaNs, t and m for infinite values cast : bool, optional Allows non-numpy input and casting of arrays to a common dtype. If False, inputs must be np.ndarray instances with matched dtypes. Casting provides more flexibility with input types at the cost of performance. Returns


ndarray of np.float32 or np.float64 Extracted feature array

many

Parallel light curve feature extraction

It is a parallel executed equivalent of

def many(self, lcs, , fill_value=None, sorted=None, check=True): ... return np.stack( ... [ ... self( ... lc, ... fill_value=fill_value, ... sorted=sorted, ... check=check, ... cast=False, ... ) ... for lc in lcs ... ] ... )

Parameters

lcs : list of (t, m, sigma) or Arrow array Either a list of light curves packed into three-tuples (all numpy.ndarray of the same dtype), or an Arrow array/chunked array of type List<Struct<...>> where the selected fields share the same float dtype (float32 or float64). Arrow input is auto-detected via the arrow_c_array / arrow_c_stream protocol and enables zero-copy data access from pyarrow, polars, and other Arrow-compatible libraries. arrow_fields : list of (str or int) Required when lcs is an Arrow array. Field names or indices specifying which struct fields to use as t, m, and optionally sigma. Must contain 2 elements [t, m] or 3 elements [t, m, sigma]. Each element may be a field name (str) or a zero-based positional index (int); all elements must be of the same type. Ignored for non-Arrow input. fill_value : float or None, optional Fill invalid values by this or raise an exception if None sorted : bool or None, optional Specifies if input array are sorted by time moments, see call documentation for details check : bool, optional Check all input arrays for NaNs, t and m for infinite values n_jobs : int Number of tasks to run in paralell. Default is -1 which means run as many jobs as CPU count. See rayon rust crate documentation for details

default_transform = 'identity' class-attribute

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.str() (if defined) or repr(object). encoding defaults to sys.getdefaultencoding(). errors defaults to 'strict'.

supported_transforms = ['arcsinh', 'clipped_lg', 'identity', 'lg', 'ln1p', 'sqrt'] class-attribute

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.