lightkurve.LightCurve.read

classmethod LightCurve.read(filename, time_column=None, time_format=None, time_scale=None, format=None, *args, **kwargs)

Read and parse a file and returns a astropy.timeseries.TimeSeries.

This method uses the unified I/O infrastructure in Astropy which makes it easy to define readers/writers for various classes (https://docs.astropy.org/en/stable/io/unified.html). By default, this method will try and use readers defined specifically for the astropy.timeseries.TimeSeries class - however, it is also possible to use the format keyword to specify formats defined for the astropy.table.Table class - in this case, you will need to also provide the column names for column containing the start times for the bins, as well as other column names (see the Parameters section below for details):

>>> from astropy.timeseries import TimeSeries
>>> ts = TimeSeries.read('sampled.dat', format='ascii.ecsv',
...                      time_column='date')  
Parameters
filenamestr

File to parse.

formatstr

File format specifier.

time_columnstr, optional

The name of the time column.

time_formatstr, optional

The time format for the time column.

time_scalestr, optional

The time scale for the time column.

*argstuple, optional

Positional arguments passed through to the data reader.

**kwargsdict, optional

Keyword arguments passed through to the data reader.

Returns
outastropy.timeseries.sampled.TimeSeries

TimeSeries corresponding to file contents.

Notes

The available built-in formats are:

Format

Read

Write

Auto-identify

cdips

Yes

No

No

everest

Yes

No

No

k2sff

Yes

No

No

kepler

Yes

No

No

kepseismic

Yes

No

No

pathos

Yes

No

No

qlp

Yes

No

No

tasoc

Yes

No

No

tess

Yes

No

No