Lightkurve v2.0
lightkurve.correctors.
RegressionCorrector
Remove noise using linear regression against a DesignMatrix.
DesignMatrix
Given a column vector of data \(\y\) and a design matrix of regressors \(X\), we will find the vector of coefficients \(\w\) such that:
We will assume that the model fits the data within Gaussian uncertainties:
We make the regression robust by placing Gaussian priors on \(\w\):
We can then find the maximum likelihood solution of the posterior distribution \(p(\w | \y) \propto p(\y | \w) p(\w)\) by solving the matrix equation:
Where \(\covw\) is the covariance matrix of the coefficients:
LightCurve
The light curve that needs to be corrected.
__init__
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.
original_lc
Methods
__init__(lc)
compute_overfit_metric(**kwargs)
compute_overfit_metric
Measures the degree of over-fitting in the correction.
compute_underfit_metric(**kwargs)
compute_underfit_metric
Measures the degree of under-fitting the correction.
correct(design_matrix_collection[, …])
correct
Find the best fit correction for the light curve.
diagnose()
diagnose
Returns diagnostic plots to assess the most recent call to correct().
correct()
diagnose_priors()
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.