light_curve provides 40+ hand-crafted feature extractors for astrophysical light curves.
All share a common interface: callable objects with .names and .descriptions attributes.
import light_curve as lc
import numpy as np
t = np . array ([ 0.0 , 1.2 , 3.5 , 7.1 , 9.0 ])
m = np . array ([ 15.1 , 15.3 , 14.9 , 15.0 , 15.2 ])
err = np . array ([ 0.05 , 0.05 , 0.05 , 0.05 , 0.05 ])
ext = lc . Extractor ( lc . Amplitude (), lc . BeyondNStd ( nstd = 1 ), lc . LinearFit ())
result = ext ( t , m , err )
print ( dict ( zip ( ext . names , result )))
Use Extractor to combine multiple features into a single callable,
or call each class directly for a single feature.
The .many() method processes a list of light curves in batch with reduced Python–Rust overhead.
See the API reference for full signatures, parameters, and equations.
Feature table
Statistical
Variability & trend
Feature
Description
Outputs
Eta
Von Neumann \(\eta\)
1
EtaE
\(\eta^e\) , adapted for unevenly sampled time series
1
LinearFit
Slope, its error, and reduced \(\chi^2\) of the weighted linear fit
3
LinearTrend
Slope, its error, and noise level of the unweighted linear fit
3
MaximumSlope
Maximum slope between consecutive observations
1
Time sampling
Periodogram
Feature
Description
Outputs
Periodogram
Lomb–Scargle periodogram: period and power of the strongest peaks
≥2
Parametric fits (transients, flux only)
Feature
Description
Outputs
BazinFit
Bazin function — 5-parameter rising/falling exponential fit for core-collapse SNe
6
LinexpFit
Linexp function — linear-times-exponential fit for core-collapse SNe
5
VillarFit
Villar function — 7-parameter Gaussian+plateau fit for SN classification
8
Detection-based (experimental)
Multiband (experimental)
Feature
Description
Outputs
ColorOfMedian
Difference between median magnitudes of two bands
1
RainbowFit
Multiband blackbody fit (Russeil+23) — bolometric flux + temperature evolution
8
Feature
Description
Extractor
Combine multiple feature extractors into a single callable
Bins
Bin a time series, then apply any set of features to each bin