[−][src]Crate light_curve_feature
Light curve feature
light-curve-feature
is a part of light-curve
family that
implements extraction of numerous light curve features used in astrophysics.
use light_curve_feature::*; // Let's find amplitude and reduced Chi-squared of the light curve let fe = feat_extr!(Amplitude::default(), ReducedChi2::default()); // Define light curve let time = [0.0, 1.0, 2.0, 3.0, 4.0]; let magn = [-1.0, 2.0, 1.0, 3.0, 4.5]; let magn_err_squared = [0.2, 0.1, 0.5, 0.1, 0.2]; let ts = TimeSeries::new(&time[..], &magn[..], Some(&magn_err_squared[..])); // Get results and print let result = fe.eval(ts); let names = fe.get_names(); println!("{:?}", names.iter().zip(result.iter()).collect::<Vec<_>>());
Re-exports
pub use periodogram::recurrent_sin_cos::RecurrentSinCos; |
pub use time_series::TimeSeries; |
Modules
antifeatures | |
periodogram | |
statistics | |
time_series |
Macros
feat_extr | Constructs a |
Structs
Amplitude | Half amplitude of magnitude |
AndersonDarlingNormal | 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 commutative distribution function of the standard normal 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. |
AverageNyquistFreq | $\Delta t = \mathrm{duration} / (N - 1)$ is the mean time interval between observations |
BeyondNStd | Fraction of observations beyond $n\,\sigma_m$ from the mean magnitude $\langle m \rangle$ |
Bins | Bins — sampled time series |
Cusum | Cusum — a range of cumulative sums |
Eta | Von Neummann $\eta$ |
EtaE | $\eta^e$ — modernisation of Eta for unevenly time series |
FeatureExtractor | The engine that extracts features one by one |
InterPercentileRange | Inter-percentile range |
Kurtosis | Kurtosis of magnitude $G_2$ |
LinearFit | The slope, its error and reduced $\chi^2$ of the light curve in the linear fit |
LinearTrend | The slope and noise of the light curve without observation errors in the linear fit |
MagnitudePercentageRatio | Magnitude percentage ratio |
MaximumSlope | Maximum slope between two sub-sequential observations |
Mean | Mean magnitude |
Median | Median magnitude |
MedianAbsoluteDeviation | Median of the absolute value of the difference between magnitude and its median |
MedianBufferRangePercentage | Fraction of observations inside $\mathrm{Median}(m) \pm q \times \mathrm{Median}(m)$ interval |
MedianNyquistFreq | $\Delta t$ is the median time interval between observations |
PercentAmplitude | Maximum deviation of magnitude from its median |
PercentDifferenceMagnitudePercentile | Ratio of $p$th inter-percentile range to the median |
Periodogram | A number of features based on Lomb–Scargle periodogram |
PeriodogramPowerDirect | Direct periodogram executor |
PeriodogramPowerFft | "Fast" (FFT-based) periodogram executor |
QuantileNyquistFreq | $\Delta t$ is the $q$th quantile of time intervals between subsequent observations |
ReducedChi2 | Reduced $\chi^2$ of magnitude measurements |
Skew | Skewness of magnitude $G_1$ |
StandardDeviation | Standard deviation of magnitude $\sigma_m$ |
StetsonK | Stetson $K$ coefficient described light curve shape |
WeightedMean | Weighted mean magnitude |
Traits
FeatureEvaluator | The trait each feature should implement |
Float | |
NyquistFreq | Derive Nyquist frequency from time series |
PeriodogramPower | Periodogram execution algorithm |
Functions
fit_straight_line |
Type Definitions
VecFE |