search_periodicity

ell1fit.spin_periodicity.search_periodicity(t, y, var, min_period, max_period, oversample=5, n_shuffle=1000, fap_level=0.01, n_inject=100, detection_fraction=0.9, rng=None)[source]

Periodogram of y(t) between two periods, calibrated by shuffling.

Parameters:
tarray-like

Times, in days.

y, vararray-like

Values and variances (var=None for equal weights).

min_period, max_periodfloat

Search range, in days.

oversampleint

Frequency steps per 1 / baseline.

n_shuffleint

Shuffles for the false-alarm probability and the detection threshold.

fap_levelfloat

False-alarm probability defining a detection, for the detectable amplitude.

n_injectint

Injections per trial amplitude; 0 skips the detectable amplitude (NaN).

detection_fractionfloat

Fraction of injections that must be detected at the reported amplitude.

Returns:
dict

JSON-ready summary; also the arrays periods_days, power and window and best_coeffs (c0, a, b), for plotting.