lightkurve.correctors.DesignMatrixCollection#
- class lightkurve.correctors.DesignMatrixCollection(matrices)[source]#
Object which stores multiple design matrices.
DesignMatrixCollection objects are useful when users want to regress against multiple different systematics, but still keep the different systematics distinct.
Examples
>>> from lightkurve.correctors.designmatrix import create_spline_matrix, DesignMatrix, DesignMatrixCollection >>> dm1 = create_spline_matrix(np.arange(100), n_knots=5, name='spline') >>> dm2 = DesignMatrix(np.arange(100), name='slope') >>> dmc = DesignMatrixCollection([dm1, dm2]) >>> dmc DesignMatrixCollection: spline DesignMatrix (100, 5) slope DesignMatrix (100, 1) >>> dmc.matrices [spline DesignMatrix (100, 5), slope DesignMatrix (100, 1)]
Methods
__init__(matrices)plot([ax])Visualize the design matrix values as an image.
plot_priors([ax])Visualize the
prior_muandprior_sigmaattributes.split(row_indices)Returns a new
DesignMatrixCollectionwith regressors split into multiple columns.standardize()Returns a new
DesignMatrixCollectionin which all the matrices have been standardized using theDesignMatrix.standardizemethod.to_designmatrix([name])Flatten a
DesignMatrixCollectioninto aDesignMatrix.validate()Attributes
columnsList of column names.
prior_muCoefficient prior means.
prior_sigmaCoefficient prior standard deviations.
values2D numpy array containing the matrix values.