lightkurve.correctors.load_kepler_cbvs(cbv_dir=None, mission=None, quarter=None, campaign=None, channel=None, module=None, output=None)[source]

Loads Kepler or K2 cotrending basis vectors, either from a local directory cbv_dir or searches the public data archive at MAST <>.

This function fetches the Cotrending Basis Vectors FITS HDU for the desired mission, quarter/campaign and channel or module/output, etc… and then extracts the requested basis vectors and returns a KeplerCotrendingBasisVectors object

For Kepler/K2, the FITS files contain all channels in a single file per quarter/campaign.

For Kepler this extracts the DR25 CBVs.


Path to specific directory holding Kepler CBVs. If None, queries MAST.

missionstr, list of str

‘Kepler’ or ‘K2’

quarter or campaignint

Kepler Quarter or K2 Campaign.

channel or (module and output)int

Kepler/K2 requested channel or module and output. Must provide either channel, or module and output, but not both.

resultKeplerCotrendingBasisVectors object


This example will read in the CBVs for Kepler quarter 8, and then extract the first 8 CBVs for module.output 16.4

>>> cbvs = load_kepler_cbvs(mission='Kepler', quarter=8, module=16, output=4)