smooth_test¶
- tessilator.lc_analysis.smooth_test(time, flux, n_avg=10)[source]¶
Determine how to detrend a lightcurve, based on a smoothness algorithm
The idea of this function is to catch lightcurves that appear to have periods longer than ~15 days, and are notably smooth. The function calculates a sine fit to the (linearly) detrended lightcurve, then smoothes it using a running mean. Finally, there are three criteria to decide how the lightcurve should be detrended. A boolean flag is returned, where False=individual groups and True=the whole lightcurve.
- Parameters:
- time
Iter A set of time coordinates
- flux
Iter A set of flux coordinates
- n_avg
float, optional, default=10 The number of datapoints to be used for the running mean calculation.
- time
- Returns:
- smooth_flag
bool A boolean flag to (partially) determine how the lightcurve should be detrended (False=individual groups, True=the whole lightcurve)
- smooth_flag