PLDCorrector.correct(pld_order=None, pca_components=None, pld_aperture_mask=None, background_aperture_mask='background', spline_n_knots=None, spline_degree=5, normalize_background_pixels=None, restore_trend=True, sparse=False, cadence_mask=None, sigma=5, niters=5, propagate_errors=False, use_gp=None, gp_timescale=None, aperture_mask=None)[source]#

Returns a systematics-corrected light curve.

If the parameters pld_order and pca_components are None, their value will be assigned based on the mission. K2 and TESS experience different dominant sources of noise, and require different defaults. For information about how the defaults were chosen, see PR #746 at


The order of Pixel Level De-correlation to be performed. First order (n=1) uses only the pixel fluxes to construct the design matrix. Higher order populates the design matrix with columns constructed from the products of pixel fluxes. Default 3 for K2 and 1 for TESS.


Number of terms added to the design matrix for each order of PLD pixel fluxes. Increasing this value may provide higher precision at the expense of slower speed and/or overfitting.

pld_aperture_maskarray-like, ‘pipeline’, ‘all’, ‘threshold’, or None

A boolean array describing the aperture such that True means that the pixel will be used when selecting the PLD basis vectors. If None or all are passed in, all pixels will be used. If ‘pipeline’ is passed, the mask suggested by the official pipeline will be returned. If ‘threshold’ is passed, all pixels brighter than 3-sigma above the median flux will be used.


Number of knots in spline.


Polynomial degree of spline.


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


Whether to create SparseDesignMatrix.

cadence_masknp.ndarray of bools (optional)

Mask, where True indicates a cadence that should be used.

sigmaint (default 5)

Standard deviation at which to remove outliers from fitting

nitersint (default 5)

Number of iterations to fit and remove outliers

propagate_errorsbool (default False)

Whether to propagate the uncertainties from the regression. Default is False. Setting to True will increase run time, but will sample from multivariate normal distribution of weights.

use_gp, gp_timescaleDEPRECATED

As of Lightkurve v2.0 PLDCorrector uses splines instead of Gaussian Processes.


As of Lightkurve v2.0 the aperture_mask parameter needs to be passed to the class constructor.


Noise-corrected LightCurve.