lightkurve.FoldedLightCurve

class lightkurve.FoldedLightCurve(data=None, *args, time=None, flux=None, flux_err=None, **kwargs)

Subclass of LightCurve in which the time parameter represents phase values.

Compared to the LightCurve base class, this class has extra meta data entries (period, epoch_time, epoch_phase, wrap_phase, normalize_phase), an extra column (time_original), extra properties (phase, odd_mask, even_mask), and implements different plotting defaults.

__init__(data=None, *args, time=None, flux=None, flux_err=None, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__([data, time, flux, flux_err])

Initialize self.

add_column(*args, **kwargs)

See add_column().

add_columns(*args, **kwargs)

See add_columns().

add_index(colnames[, engine, unique])

Insert a new index among one or more columns.

add_row([vals, mask])

Add a new row to the end of the table.

append(others[, inplace])

Append one or more other LightCurve object(s) to this one.

argsort([keys, kind, reverse])

Return the indices which would sort the table according to one or more key columns.

as_array([keep_byteorder, names])

Return a new copy of the table in the form of a structured np.ndarray or np.ma.MaskedArray object (as appropriate).

bin([time_bin_size, time_bin_start, n_bins, …])

Bins a lightcurve in equally-spaced bins in time.

convert_bytestring_to_unicode()

Convert bytestring columns (dtype.kind=’S’) to unicode (dtype.kind=’U’) using UTF-8 encoding.

convert_unicode_to_bytestring()

Convert unicode columns (dtype.kind=’U’) to bytestring (dtype.kind=’S’) using UTF-8 encoding.

copy([copy_data])

Return a copy of the table.

create_transit_mask(period, transit_time, …)

Returns a boolean array that is True during transits and False elsewhere.

errorbar(**kwargs)

Plot the folded light curve using matplotlib’s errorbar method.

estimate_cdpp([transit_duration, …])

Estimate the CDPP noise metric using the Savitzky-Golay (SG) method.

field(item)

Return column[item] for recarray compatibility.

fill_gaps([method])

Fill in gaps in time.

filled([fill_value])

Return copy of self, with masked values filled.

flatten([window_length, polyorder, …])

Removes the low frequency trend using scipy’s Savitzky-Golay filter.

fold([period, epoch_time, epoch_phase, …])

Returns a FoldedLightCurve object folded on a period and epoch.

from_pandas(df[, time_scale])

Convert a DataFrame to a astropy.timeseries.TimeSeries.

from_stingray(lc)

Create a new LightCurve from a stingray.Lightcurve.

from_timeseries(ts)

Creates a new LightCurve from an AstroPy TimeSeries object.

group_by(keys)

Group this table by the specified keys

head([n])

Return the first n rows.

index_column(name)

Return the positional index of column name.

index_mode(mode)

Return a context manager for an indexing mode.

insert_row(index[, vals, mask])

Add a new row before the given index position in the table.

interact_bls([notebook_url, minimum_period, …])

Display an interactive Jupyter Notebook widget to find planets.

items()

itercols()

Iterate over the columns of this table.

iterrows(*names)

Iterate over rows of table returning a tuple of values for each row.

keep_columns(names)

Keep only the columns specified (remove the others).

keys()

more([max_lines, max_width, show_name, …])

Interactively browse table with a paging interface.

normalize([unit])

Returns a normalized version of the light curve.

pformat([max_lines, max_width, show_name, …])

Return a list of lines for the formatted string representation of

pformat_all([max_lines, max_width, …])

Return a list of lines for the formatted string representation of

plot(**kwargs)

Plot the folded light curve using matplotlib’s plot method.

plot_river(**kwargs)

Plot the folded light curve in a river style.

pprint([max_lines, max_width, show_name, …])

Print a formatted string representation of the table.

pprint_all([max_lines, max_width, …])

Print a formatted string representation of the entire table.

query_solar_system_objects([cadence_mask, …])

Returns a list of asteroids or comets which affected the light curve.

read(filename[, time_column, time_format, …])

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

remove_column(name)

Remove a column from the table.

remove_columns(names)

Remove several columns from the table.

remove_indices(colname)

Remove all indices involving the given column.

remove_nans([column])

Removes cadences where column is a NaN.

remove_outliers([sigma, sigma_lower, …])

Removes outlier data points using sigma-clipping.

remove_row(index)

Remove a row from the table.

remove_rows(row_specifier)

Remove rows from the table.

rename_column(name, new_name)

Rename a column.

rename_columns(names, new_names)

Rename multiple columns.

replace_column(name, col[, copy])

Replace column name with the new col object.

reverse()

Reverse the row order of table rows.

round([decimals])

Round numeric columns in-place to the specified number of decimals.

scatter(**kwargs)

Plot the folded light curve using matplotlib’s scatter method.

search_neighbors([limit, radius])

Search the data archive at MAST for the most nearby light curves.

show_in_browser([max_lines, jsviewer, …])

Render the table in HTML and show it in a web browser.

show_in_notebook([tableid, css, …])

Render the table in HTML and show it in the IPython notebook.

show_properties()

Prints a description of all non-callable attributes.

sort([keys, reverse])

Sort the table according to one or more keys.

tail([n])

Return the last n rows.

to_corrector([method])

Returns a corrector object to remove instrument systematics.

to_csv([path_or_buf])

Writes the light curve to a CSV file.

to_excel(path_or_buf, **kwargs)

Shorthand for to_pandas().to_excel().

to_fits([path, overwrite, flux_column_name])

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

to_pandas(**kwargs)

Converts the light curve to a Pandas DataFrame object.

to_periodogram([method])

Converts the light curve to a Periodogram power spectrum object.

to_seismology(**kwargs)

Returns a Seismology object for estimating quick-look asteroseismic quantities.

to_stingray()

Returns a stingray.Lightcurve object.

to_table()

to_timeseries()

Deprecated since version 2.0.

truncate([before, after])

Truncates the light curve before and after some time value.

values()

values_equal(other)

Element-wise comparison of table with another table, list, or scalar.

Attributes

ColumnClass

PDCSAP_FLUX

Deprecated since version 2.0.

SAP_FLUX

Deprecated since version 2.0.

astropy_time

Deprecated since version 2.0.

colnames

dtype

even_mask

Boolean mask which flags the even-numbered cycles (2, 4, 6, etc).

flux

Brightness values stored as an AstroPy Quantity object.

flux_err

Brightness uncertainties stored as an AstroPy Quantity object.

flux_quantity

Deprecated since version 2.0.

flux_unit

Deprecated since version 2.0.

groups

has_masked_columns

True if table has any MaskedColumn columns.

has_masked_values

True if column in the table has values which are masked.

has_mixin_columns

True if table has any mixin columns (defined as columns that are not Column subclasses).

hdu

Deprecated since version 2.0.

iloc

Return a TableILoc object that can be used for retrieving indexed rows in the order they appear in the index.

indices

Return the indices associated with columns of the table as a TableIndices object.

info

loc

Return a TableLoc object that can be used for retrieving rows by index in a given data range.

loc_indices

Return a TableLocIndices object that can be used for retrieving the row indices corresponding to given table index key value or values.

mask

masked

meta

odd_mask

Boolean mask which flags the odd-numbered cycles (1, 3, 5, etc).

phase

Alias for LightCurve.time.

time

Time values stored as an AstroPy Time object.

time_format

Deprecated since version 2.0.

time_scale

Deprecated since version 2.0.

write