lightkurve.LightCurve.to_fits

LightCurve.to_fits(path=None, overwrite=False, flux_column_name='FLUX', **extra_data)

Converts the light curve to a FITS file in the Kepler/TESS file format.

The FITS file will be returned as a HDUList object. If a path is specified then the file will also be written to disk.

Parameters
pathstr or None

Location where the FITS file will be written, which is optional.

overwritebool

Whether or not to overwrite the file, if path is set.

flux_column_namestr

The column name in the FITS file where the light curve flux data should be stored. Typical values are FLUX or SAP_FLUX.

extra_datadict

Extra keywords or columns to include in the FITS file. Arguments of type str, int, float, or bool will be stored as keywords in the primary header. Arguments of type np.array or list will be stored as columns in the first extension.

Returns
hduHDUList

Returns an HDUList object.