LightCurve#
The LightCurve
class is an extension of AstroPy’s TimeSeries
object, which itself extends AstroPy’s Table
.
Compared to a generic Table, LightCurve objects enforce the presence of three
special data columns: time
, flux
, and flux_err
.
This enables a LightCurve object to offer a range of methods which are specific to working
with flux-based time series data.
Constructor#
Light curves can be instantiated by passing array-like values to the
time
, flux
, and flux_err
parameters.
Additional columns can be added by passing a table-like object to the data
parameter.
|
Subclass of AstroPy |
Attributes#
Another difference with AstroPy Table
is that all columns can
be accessed conveniently as attributes. For example, LightCurve.time
is
offered as a shorthand for LightCurve["time"]
.
Time values stored as an AstroPy |
|
Brightness values stored as an AstroPy |
|
Brightness uncertainties stored as an AstroPy |
Metadata#
All meta data are stored in the meta
dictionary.
For convenience, meta data can be accessed as object attributes,
e.g. LightCurve.sector
is a short-hand for LightCurve.meta["SECTOR"]
.
Plotting#
|
Plot the light curve using Matplotlib's |
|
Plots the light curve using Matplotlib's |
|
Plots the light curve using Matplotlib's |
|
Plot the light curve as a river plot. |
Lightkurve's stylesheet for matplotlib. |
Data manipulation#
The following methods all return a new LightCurve
object.
|
Append one or more other |
|
Return a copy of the table. |
|
Bins a lightcurve in equally-spaced bins in time. |
|
Fill in gaps in time. |
|
Removes the low frequency trend using scipy's Savitzky-Golay filter. |
|
Returns a |
|
Return the first n rows. |
|
Returns a normalized version of the light curve. |
|
Removes cadences where |
|
Removes outlier data points using sigma-clipping. |
|
Assign a different column to be the flux column. |
|
Return the last n rows. |
|
Truncates the light curve before and after some time value. |
Conversions#
|
Returns a corrector object to remove instrument systematics. |
|
Writes the light curve to a CSV file. |
|
Shorthand for |
|
Converts the light curve to a FITS file in the Kepler/TESS file format. |
|
Converts the light curve to a Pandas |
|
Converts the light curve to a |
|
Returns a |
Other Utility Methods#
|
Estimate the CDPP noise metric using the Savitzky-Golay (SG) method. |
Returns a list of asteroids or comets which affected the light curve. |
|
|
Display an interactive Jupyter Notebook widget to find planets. |
|
Returns a boolean array that is |
|
Search the data archive at MAST for the most nearby light curves. |