DesignMatrixCollection

class lightkurve.correctors.DesignMatrixCollection(matrices)

Bases: object

A set of design matrices.

Attributes Summary

columns

List of column names.

prior_mu

Coefficient prior means.

prior_sigma

Coefficient prior standard deviations.

values

2D numpy array containing the matrix values.

Methods Summary

plot(self[, ax])

Visualize the design matrix values as an image.

plot_priors(self[, ax])

Visualize the prior_mu and prior_sigma attributes.

split(self, row_indices)

Returns a new DesignMatrixCollection with regressors split into multiple columns.

standardize(self)

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

Attributes Documentation

columns

List of column names.

prior_mu

Coefficient prior means.

prior_sigma

Coefficient prior standard deviations.

values

2D numpy array containing the matrix values.

Methods Documentation

plot(self, ax=None, **kwargs)

Visualize the design matrix values as an image.

Uses Matplotlib’s plot_image to visualize the matrix values.

Parameters
axAxes

A matplotlib axes object to plot into. If no axes is provided, a new one will be created.

**kwargsdict

Extra parameters to be passed to plot_image.

Returns
Axes

The matplotlib axes object.

plot_priors(self, ax=None)

Visualize the prior_mu and prior_sigma attributes.

Parameters
axAxes

A matplotlib axes object to plot into. If no axes is provided, a new one will be created.

Returns
Axes

The matplotlib axes object.

split(self, row_indices)

Returns a new DesignMatrixCollection with regressors split into multiple columns.

This method will return a new design matrix collection by calling DesignMatrix.split on each matrix in the collection.

Parameters
row_indicesiterable of integers

Every regressor (i.e. column) in the design matrix will be split up over multiple columns separated at the indices provided.

Returns
DesignMatrixCollection

A new design matrix collection.

standardize(self)

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

Returns
DesignMatrixCollection

The new design matrix collection.