LightCurveFile

class lightkurve.lightcurvefile.LightCurveFile(path, **kwargs)

Bases: object

Generic class to represent FITS files which contain one or more light curves.

Parameters
pathstr or astropy.io.fits.HDUList object

Local path or remote url of a lightcurve FITS file. Also accepts a FITS file object already opened using AstroPy.

kwargsdict

Keyword arguments to be passed to astropy.io.fits.open.

Attributes Summary

PDCSAP_FLUX

Returns a LightCurve object for PDCSAP_FLUX

SAP_FLUX

Returns a LightCurve object for SAP_FLUX

cadenceno

Cadence number

dec

Declination of the target.

ra

Right Ascension of the target.

time

Time measurements

Methods Summary

header(self[, ext])

Header of the object at extension ext

plot(self[, flux_types, style])

Plot the light curve file using matplotlib’s plot method.

Attributes Documentation

PDCSAP_FLUX

Returns a LightCurve object for PDCSAP_FLUX

SAP_FLUX

Returns a LightCurve object for SAP_FLUX

cadenceno

Cadence number

dec

Declination of the target.

ra

Right Ascension of the target.

time

Time measurements

Methods Documentation

header(self, ext=0)

Header of the object at extension ext

plot(self, flux_types=None, style='lightkurve', **kwargs)

Plot the light curve file using matplotlib’s plot method.

Parameters
axmatplotlib.axes._subplots.AxesSubplot

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

flux_typeslist or None

Which fluxes in the LCF to plot. Default is lcf._flux_types(). For Kepler this is PDCSAP and SAP flux. Pass a list to change flux types.

normalizebool

Normalize the lightcurve before plotting?

xlabelstr

Plot x axis label

ylabelstr

Plot y axis label

titlestr

Plot set_title

stylestr

Path or URL to a matplotlib style file, or name of one of matplotlib’s built-in stylesheets (e.g. ‘ggplot’). Lightkurve’s custom stylesheet is used by default.

kwargsdict

Dictionary of arguments to be passed to matplotlib.pyplot.plot.

Returns
axmatplotlib.axes._subplots.AxesSubplot

The matplotlib axes object.


Created with ♥ by the Lightkurve collaboration. Please cite us or join us on GitHub.