TessLightCurveFile

class lightkurve.lightcurvefile.TessLightCurveFile(path, quality_bitmask='default', **kwargs)

Bases: lightkurve.lightcurvefile.LightCurveFile

Subclass of LightCurveFile to represent files generated by NASA’s TESS pipeline.

Parameters
pathstr

Local path or remote url of a FITS file in TESS’s lightcurve format.

quality_bitmaskstr or int

Bitmask (integer) which identifies the quality flag bitmask that should be used to mask out bad cadences. If a string is passed, it has the following meaning:

  • “none”: no cadences will be ignored (quality_bitmask=0).

  • “default”: cadences with severe quality issues will be ignored (quality_bitmask=1130799).

  • “hard”: more conservative choice of flags to ignore (quality_bitmask=1664431). This is known to remove good data.

  • “hardest”: removes all data that has been flagged (quality_bitmask=2096639). This mask is not recommended.

See the TessQualityFlags class for details on the bitmasks.

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

get_lightcurve(self, flux_type[, centroid_type])

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

get_lightcurve(self, flux_type, centroid_type='MOM_CENTR')
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.