lightkurve.correctors.corrector.Corrector#

class lightkurve.correctors.corrector.Corrector(original_lc: lightkurve.lightcurve.LightCurve)[source]#

Abstract base class documenting the required structure of classes designed to remove systematic noise from light curves.

Attributes
original_lcLightCurve

The uncorrected light curve. Must be passed into (or computed by) the constructor method.

corrected_lcLightCurve

Corrected light curve. Must be updated upon each call to the correct() method.

cadence_masknp.array of dtype=bool

Boolean array with the same length as original_lc. True indicates that a cadence should be used to fit the noise model. By setting certain cadences to False, users can exclude those cadences from informing the noise model, which will help prevent the overfitting of those signals (e.g. exoplanet transits). By default, the cadence mask is True across all cadences.

Methods

__init__()

Accepts all the data required to execute the correction. The constructor must set the original_lc attribute.

correct() -> LightCurve

Executes the correction, optionally accepting meaningful parameters that can be used to modify the way the correction is applied. This method must set or update the corrected_lc attribute on each run.

diagnose() -> matplotlib.axes.Axes

Creates plots to elucidate the user’s most recent call to correct().

__init__(original_lc: lightkurve.lightcurve.LightCurve) None[source]#

Constructor method.

The constructor shall:

  • accept all data required to run the correction (e.g. light curves, target pixel files, engineering data).

  • instantiate the original_lc property.

Methods

__init__(original_lc)

Constructor method.

compute_overfit_metric(**kwargs)

Measures the degree of over-fitting in the correction.

compute_underfit_metric(**kwargs)

Measures the degree of under-fitting the correction.

correct([cadence_mask, optimize])

Returns a LightCurve from which systematic noise has been removed.

diagnose()

Returns plots which elucidate the most recent call to correct().

Attributes

cadence_mask

corrected_lc

original_lc