open, **kwargs)

Opens any valid Kepler or TESS data file and returns an instance of LightCurveFile or TargetPixelFile.

This function will use the detect_filetype() function to automatically detect the type of the data product, and return the appropriate object. File types currently supported are:

* `KeplerTargetPixelFile` (typical suffix "-targ.fits.gz");
* `KeplerLightCurveFile` (typical suffix "llc.fits");
* `TessTargetPixelFile` (typical suffix "_tp.fits");
* `TessLightCurveFile` (typical suffix "_lc.fits").

Path or URL of a FITS file.

dataa subclass of TargetPixelFile or

LightCurveFile, depending on the detected file type.

ValueErrorraised if the data product is not recognized as a Kepler or

TESS product.


To open a target pixel file using its path or URL, simply use:

>>> tpf = open("mytpf.fits")