TessPLDCorrector

class lightkurve.correctors.TessPLDCorrector(tpf, aperture_mask=None)

Bases: lightkurve.correctors.regressioncorrector.RegressionCorrector

Correct TESS light curves by detrending against local pixel time series.

Special case of RegressionCorrector where the DesignMatrix is composed of background-corrected pixel time series.

The design matrix also contains columns representing a spline in time design to capture the intrinsic, long-term variability of the target.

Parameters
tpfTargetPixelFile

The target pixel from which a light curve and background model will be extracted.

Examples

>>> corrector = TessPLDCorrector(tpf)  
>>> lc = corrector.correct()  

Attributes Summary

X

Shorthand for self.design_matrix_collection.

Methods Summary

correct(self[, pixel_components, …])

Returns a systematics-corrected light curve.

diagnose(self)

Returns diagnostic plots to assess the most recent call to correct().

diagnose_priors(self)

Returns a diagnostic plot visualizing how the best-fit coefficients compare against the priors.

Attributes Documentation

X

Shorthand for self.design_matrix_collection.

Methods Documentation

correct(self, pixel_components=3, spline_n_knots=100, spline_degree=3, background_mask=None, restore_trend=True, **kwargs)

Returns a systematics-corrected light curve.

Parameters
pixel_componentsint

Number of principal components derived from the background pixel time series to utilize.

background_maskarray-like or None

A boolean array flagging the background pixels such that True means that the pixel will be used to generate the background systematics model. If None, all pixels which are fainter than 1-sigma above the median flux will be used.

restore_trendbool

Whether to restore the long term spline trend to the light curve.

diagnose(self)

Returns diagnostic plots to assess the most recent call to correct().

If correct() has not yet been called, a ValueError will be raised.

Returns
Axes

The matplotlib axes object.

diagnose_priors(self)

Returns a diagnostic plot visualizing how the best-fit coefficients compare against the priors.

The method will show the results obtained during the most recent call to correct(). If correct() has not yet been called, a ValueError will be raised.

Returns
Axes

The matplotlib axes object.