clean_lc¶
- tessilator.lc_analysis.clean_lc(t, f, err, MAD_fac=2.0, time_fac=10.0, min_num_per_group=50)[source]¶
Remove data points from the lightcurve that are likely to be spurious.
Many lightcurves have a 1 or 2 day gap. To avoid systematic offsets and ensure the data is efficiently normalized, the lightcurve is split into “strings” of contiguous data. Neighbouring data points must have been observed within 10 times the median absolute deviation of the time difference between each observation.
The start and end point of each data section must have a flux value within a given number of MAD from the median flux in the sector. This is done because often after large time gaps the temperature of the sensors changes, and including these components is likely to just result in a signal from instrumental noise.
The function returns the start and end points for each data section in the sector, which must contain a chosen number of data points. This is to ensure there are enough datapoints to construct a periodogram analysis.
- Parameters:
- t
Iterable The set of time coordinates (in days)
- f
Iterable The set of normalised flux coordinates
- MAD_fac
float, optional, default=2. The threshold number of MAD values to allow.
- time_fac
float, optional, default=10. The maximum time gap allowed between neighbouring datapoints.
- min_num_per_group
int, optional, default=50 The minimum number of datapoints allowed in a contiguous set.
- t
- Returns: