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)]
__init__(matrices)[source]#

Methods

__init__(matrices)

plot([ax])

Visualize the design matrix values as an image.

plot_priors([ax])

Visualize the prior_mu and prior_sigma attributes.

split(row_indices)

Returns a new DesignMatrixCollection with regressors split into multiple columns.

standardize()

Returns a new DesignMatrixCollection in which all the matrices have been standardized using the DesignMatrix.standardize method.

to_designmatrix([name])

Flatten a DesignMatrixCollection into a DesignMatrix.

validate()

Attributes

columns

List of column names.

prior_mu

Coefficient prior means.

prior_sigma

Coefficient prior standard deviations.

values

2D numpy array containing the matrix values.