Skip to content
K2 systematics correction using Gaussian processes
Jupyter Notebook Python
Branch: master
Clone or download
Pull request Compare This branch is 10 commits ahead, 6 commits behind OxES:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

K2 Systematics Correction

Build Status Licence MNRAS arXiv

Python package for K2 systematics correction using Gaussian processes.


git clone
cd k2sc
python install --user

Basic usage

A MAST K2 light curve can be detrended by calling

k2sc <filename>

where <filename> is either a MAST light curve filename, list of files, or a directory.

Useful flags

  • --flux-type can be either pdc or sap
  • --de-max-time <ss> maximum time (in seconds) to run global GP hyperparameter optimization (differential evolution) before switching to local optimization.
  • --de-npop <nn> size of the de population, can be set to 50 to speed up the optimization.
  • --save-dir <path> defines where to save the detrended files
  • --logfile <filename>


K2SC supports MPI automatically (requires MPI4Py.) Call k2sc as

mpirun -n N k2sc <files>

where <files> is a list of files or a directory to be detrended (for example, path/to/ktwo*.fits).


  • NumPy, SciPy, astropy, George, MPI4Py


If you use K2SC in your reserach, please cite

Aigrain, S., Parviainen, H. & Pope, B. (2016, accepted to MNRAS), arXiv:1603.09167

or use this ready-made BibTeX entry

    arxivId = {1603.09167},
    author = {Aigrain, Suzanne and Parviainen, Hannu and Pope, Benjamin},
    keywords = {data analysis,methods,photometry,planetary systems,techniques},
    title = {{K2SC: Flexible systematics correction and detrending of K2 light curves using Gaussian Process regression}},
    url = {},
    year = {2016}


  • Hannu Parviainen
  • Suzanne Aigrain
  • Benjamin Pope
You can’t perform that action at this time.