lightkurve.FoldedLightCurve#
- class lightkurve.FoldedLightCurve(data=None, *args, time=None, flux=None, flux_err=None, **kwargs)[source]#
Subclass of
LightCurvein which thetimeparameter represents phase values.Compared to the
LightCurvebase 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)#
Methods
__init__([data, time, flux, flux_err])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
LightCurveobject(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, ...])Bins a FoldedLightCurve in equally-spaced bins in phase.
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()Return a copy of the table.
create_transit_mask(period, transit_time, ...)Returns a boolean array that is
Trueduring transits andFalseelsewhere.errorbar(**kwargs)Plot the folded light curve using matplotlib's
errorbarmethod.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
FoldedLightCurveobject folded on a period and epoch.from_pandas(df[, time_scale])Convert a
DataFrameto aastropy.timeseries.TimeSeries.from_stingray(lc)Create a new
LightCurvefrom astingray.Lightcurve.from_timeseries(ts)Creates a new
LightCurvefrom an AstroPyTimeSeriesobject.group_by(keys)Group this table by the specified
keyshead([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
indexposition 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
plotmethod.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
columnis 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
namewith the newcolobject.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
scattermethod.search_neighbors([limit, radius])Search the data archive at MAST for the most nearby light curves.
select_flux(flux_column[, flux_err_column])Assign a different column to be the flux column.
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, kind, 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
DataFrameobject.to_periodogram([method])Converts the light curve to a
Periodogrampower spectrum object.to_seismology(**kwargs)Returns a
Seismologyobject for estimating quick-look asteroseismic quantities.to_stingray()Returns a
stingray.Lightcurveobject.to_table()to_timeseries()Deprecated since version 2.0.
truncate([before, after, column])Truncates the light curve before and after some time value.
update(other[, copy])Perform a dictionary-style update and merge metadata.
values()values_equal(other)Element-wise comparison of table with another table, list, or scalar.
Attributes
ColumnClassPDCSAP_FLUXDeprecated since version 2.0.
SAP_FLUXDeprecated since version 2.0.
astropy_timeDeprecated since version 2.0.
colnamesThe cycle of the correspond
time_original.dtypeBoolean mask which flags the even-numbered cycles (2, 4, 6, etc).
fluxBrightness values stored as an AstroPy
Quantityobject.flux_errBrightness uncertainties stored as an AstroPy
Quantityobject.flux_quantityDeprecated since version 2.0.
flux_unitDeprecated since version 2.0.
groupshas_masked_columnsTrue if table has any
MaskedColumncolumns.has_masked_valuesTrue if column in the table has values which are masked.
has_mixin_columnsTrue if table has any mixin columns (defined as columns that are not Column subclasses).
hduDeprecated since version 2.0.
ilocReturn a TableILoc object that can be used for retrieving indexed rows in the order they appear in the index.
indicesReturn the indices associated with columns of the table as a TableIndices object.
infolocReturn a TableLoc object that can be used for retrieving rows by index in a given data range.
loc_indicesReturn a TableLocIndices object that can be used for retrieving the row indices corresponding to given table index key value or values.
maskmaskedmetaBoolean mask which flags the odd-numbered cycles (1, 3, 5, etc).
Alias for
LightCurve.time.pprint_exclude_namesMaintain tuple that controls table column visibility for print output.
pprint_include_namesMaintain tuple that controls table column visibility for print output.
timeTime values stored as an AstroPy
Timeobject.time_formatDeprecated since version 2.0.
time_scaleDeprecated since version 2.0.
write