lightkurve.correctors.PLDCorrector#

class lightkurve.correctors.PLDCorrector(tpf, aperture_mask=None)[source]#

Implements the Pixel Level Decorrelation (PLD) systematics removal method.

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.

Pixel Level Decorrelation (PLD) was developed by [1] to remove systematic noise caused by spacecraft jitter for the Spitzer Space Telescope. It was adapted to K2 data by [2] and [3] for the EVEREST pipeline [4]. For a detailed description and implementation of PLD, please refer to these references. Lightkurve provides a reference implementation of PLD that is less sophisticated than EVEREST, but is suitable for quick-look analyses and detrending experiments. Our simple implementation of PLD is performed by first calculating the noise model for each cadence in time. This function goes up to arbitrary order, and is represented by

\[m_i = \sum_l a_l \frac{f_{il}}{\sum_k f_{ik}} + \sum_l \sum_m b_{lm} \frac{f_{il}f_{im}}{\left( \sum_k f_{ik} \right)^2} + ...\]
where
  • \(m_i\) is the noise model at time \(t_i\)

  • \(f_{il}\) is the flux in the \(l^\text{th}\) pixel at time \(t_i\)

  • \(a_l\) is the first-order PLD coefficient on the linear term

  • \(b_{lm}\) is the second-order PLD coefficient on the \(l^\text{th}\), \(m^\text{th}\) pixel pair

We perform Principal Component Analysis (PCA) to reduce the number of vectors in our final model to limit the set to best capture instrumental noise. With a PCA-reduced set of vectors, we can construct a design matrix containing fractional pixel fluxes. To solve for the PLD model, we need to minimize the difference squared

\[\chi^2 = \sum_i \frac{(y_i - m_i)^2}{\sigma_i^2},\]

where \(y_i\) is the observed flux value at time \(t_i\), by solving

\[\frac{\partial \chi^2}{\partial a_l} = 0.\]

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

References

1

Deming et al. (2015), ads:2015ApJ…805..132D. (arXiv:1411.7404)

2

Luger et al. (2016), ads:2016AJ….152..100L (arXiv:1607.00524)

3

Luger et al. (2018), ads:2018AJ….156…99L (arXiv:1702.05488)

4

EVEREST pipeline webpage, https://rodluger.github.io/everest

Examples

Download the pixel data for GJ 9827 and obtain a PLD-corrected light curve:

>>> import lightkurve as lk
>>> tpf = lk.search_targetpixelfile("GJ9827").download() 
>>> corrector = tpf.to_corrector('pld') 
>>> lc = corrector.correct() 
>>> lc.plot() 

However, the above example will over-fit the small transits! It is necessary to mask the transits using corrector.correct(cadence_mask=...).

__init__(tpf, aperture_mask=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__(tpf[, aperture_mask])

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([pld_order, pca_components, ...])

Returns a systematics-corrected light curve.

create_design_matrix([pld_order, ...])

Returns a DesignMatrixCollection containing a DesignMatrix object for the background regressors, the PLD pixel component regressors, and the spline regressors.

diagnose()

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

diagnose_masks()

Show different aperture masks used by PLD in the most recent call to correct().

diagnose_priors()

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

Attributes

cadence_mask

corrected_lc

dmc

Shorthand for self.design_matrix_collection.

original_lc