Skip to content

Base Feature Evaluator

light_curve.light_curve_ext._FeatureEvaluator

Base class for all feature extractors.

Call signature: extractor(t, m, sigma=None, band=None, *, fill_value=None, sorted=None, check=True, cast=False)

names property

Feature names

descriptions property

Feature descriptions

__call__ method descriptor

Call self as a function.

many method descriptor

Extract features from multiple light curves in parallel

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:

Name Type Description Default
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. For multiband features: a list of four-tuples (t, m, sigma, band) where band is an array of passband labels.

required
arrow_fields dict

Required when lcs is an Arrow array. Maps roles to struct field names or zero-based indices, e.g. {"t": "time", "m": "flux", "sigma": "fluxerr", "band": "passband"}. Keys "t" and "m" are required; "sigma" and "band" are optional. "band" is required for multiband features and must refer to a Utf8 or LargeUtf8 column. Ignored for non-Arrow input.

None
fill_value float or None

Fill invalid values by this or raise an exception if None

None
sorted bool or None

Specifies if input array are sorted by time moments, see __call__ documentation for details

None
check bool

Check all input arrays for NaNs, t and m for infinite values

True
n_jobs int

Number of tasks to run in parallel. -1 means run as many jobs as CPU count. See rayon rust crate documentation for details

-1

to_json method descriptor

Serialize feature evaluator to json string


light_curve.feature_from_json

Deserialize a JSON string into a Feature object.