Lightkurve v2.0
Telescope data is always affected by noise contributed by the instrument. The lightkurve.correctors sub-package provides classes which offer different strategies to remove such noise. At the core of the package lies the generic RegressionCorrector class. It uses linear regression to correlate a light curve against a DesignMatrix of column vectors which are known to correlate with additive noise components.
lightkurve.correctors
RegressionCorrector
DesignMatrix
The CBVCorrector, PLDCorrector, and SFFCorrector classes extend RegressionCorrector by providing the user with pre-configured DesignMatrix objects which are known to be effective at removing different types of noise.
CBVCorrector
PLDCorrector
SFFCorrector
CBVCorrector(lc[, interpolate_cbvs, …])
Class for removing systematics using Cotrending Basis Vectors (CBVs) from Kepler/K2/TESS.
CBVCorrector.correct([cbv_type, …])
CBVCorrector.correct
Optimizes the correction by adjusting the L2-Norm (Ridge Regression) regularization penalty term, alpha, based on the introduced noise (over-fitting) and residual correlation (under-fitting) goodness metrics.
CBVCorrector.diagnose()
CBVCorrector.diagnose
Returns diagnostic plots to assess the most recent correction.
PLDCorrector(tpf[, aperture_mask])
Implements the Pixel Level Decorrelation (PLD) systematics removal method.
PLDCorrector.correct([pld_order, …])
PLDCorrector.correct
Returns a systematics-corrected light curve.
PLDCorrector.diagnose()
PLDCorrector.diagnose
Returns diagnostic plots to assess the most recent call to correct().
correct()
PLDCorrector.diagnose_masks()
PLDCorrector.diagnose_masks
Show different aperture masks used by PLD in the most recent call to correct().
SFFCorrector(lc)
Special case of RegressionCorrector where the DesignMatrix includes the target’s centroid positions.
SFFCorrector.correct([centroid_col, …])
SFFCorrector.correct
Find the best fit correction for the light curve.
SFFCorrector.diagnose()
SFFCorrector.diagnose
Returns a diagnostic plot which visualizes what happened during the most recent call to correct().
SFFCorrector.diagnose_arclength()
SFFCorrector.diagnose_arclength
Returns a diagnostic plot which visualizes arclength vs flux from most recent call to correct().
RegressionCorrector(lc)
Remove noise using linear regression against a DesignMatrix.
RegressionCorrector.correct(…[, …])
RegressionCorrector.correct
RegressionCorrector.diagnose()
RegressionCorrector.diagnose
DesignMatrix(df[, columns, name, prior_mu, …])
A matrix of column vectors for use in linear regression.
DesignMatrixCollection(matrices)
DesignMatrixCollection
Object which stores multiple design matrices.
SparseDesignMatrix(X[, columns, name, …])
SparseDesignMatrix
SparseDesignMatrixCollection(matrices)
SparseDesignMatrixCollection
A set of design matrices.
A DesignMatrix has the following attributes:
DesignMatrix.X
Design matrix “X” to be used in RegressionCorrector objects
DesignMatrix.rank
Matrix rank computed using numpy.linalg.matrix_rank.
numpy.linalg.matrix_rank
DesignMatrix.shape
Tuple specifying the shape of the matrix as (n_rows, n_columns).
DesignMatrix.values
2D numpy array containing the matrix values.
A DesignMatrix supports the following operations:
DesignMatrix.append_constant([prior_mu, …])
DesignMatrix.append_constant
Returns a new DesignMatrix with a column of ones appended.
DesignMatrix.collect(matrix)
DesignMatrix.collect
Join two designmatrices, return a design matrix collection
DesignMatrix.copy()
DesignMatrix.copy
Returns a deepcopy of DesignMatrix
DesignMatrix.pca([nterms])
DesignMatrix.pca
Returns a new DesignMatrix with a smaller number of regressors.
DesignMatrix.plot([ax])
DesignMatrix.plot
Visualize the design matrix values as an image.
DesignMatrix.plot_priors([ax])
DesignMatrix.plot_priors
Visualize the coefficient priors.
DesignMatrix.split(row_indices[, inplace])
DesignMatrix.split
Returns a new DesignMatrix with regressors split into multiple columns.
DesignMatrix.standardize([inplace])
DesignMatrix.standardize
Returns a new DesignMatrix in which the columns have been median-subtracted and sigma-divided.
DesignMatrix.to_sparse()
DesignMatrix.to_sparse
Convert this dense matrix object to a SparseDesignMatrix.
DesignMatrix.validate([rank])
DesignMatrix.validate
Emits LightkurveWarning if matrix has low rank or priors have incorrect shape.
LightkurveWarning
corrector.Corrector(original_lc)
corrector.Corrector
Abstract base class documenting the required structure of classes designed to remove systematic noise from light curves.