API

This page provides an overview of the Python functions and classes provided by the Lightkurve package.

Programmers tend to refer to a list like this as the API (Application Programming Interface).

Light curve objects

The lightkurve.lightcurve module provides classes which represent time-series brightness (flux) data. The generic LightCurve class can be used to work with any «time vs flux» data set and provides access to a range of common operations, e.g. ~lightkurve.lightcurve.LightCurve.bin(), ~lightkurve.lightcurve.LightCurve.flatten(), ~lightkurve.lightcurve.LightCurve.fold(), and ~lightkurve.lightcurve.LightCurve.plot(). There are specific sub-classes for light curves observed by the Kepler and TESS missions, which extend the generic class by adding mission-specific metadata.

Searching and downloading data

The lightkurve.search module provides functions which make it easy to load and search data files produced by the Kepler and TESS missions.

Data product objects

Lightkurve provides classes to interact with the files that are generated by NASA’s Kepler and TESS data processing pipelines and made available at the data archive. The lightkurve.lightcurvefile module provides classes which represent FITS files that store one or more light curves. These classes provide methods to read in LightCurve objects and access various metadata.

The lightkurve.targetpixelfile module provides classes which represent FITS files that store the original pixel data (images) obtained by the Kepler or TESS telescopes. These classes provide methods to visualize these data and extract custom light curves.

Correcting systematics

Telescope data is always affected by systematic noise contributed by the detector. The lightkurve.correctors sub-package provides classes which offer different strategies to remove such noise:

Finding periodic signals

The lightkurve.periodogram module provides classes to help find periodic signals in light curves.

Asteroseismology

The lightkurve.seismology sub-package provides tools to extra quick-look astroseismic parameters (numax, deltanu, radius, mass, and logg) from periodograms.

Utilities

The lightkurve.utils module provides a range of common helper functions and classes.

Can’t find what you’re looking for?

If you are looking for a specific class or function not listed here, try consulting the API index or search pages: