LightCurve.select_flux(flux_column, flux_err_column=None)[source]

Assign a different column to be the flux column.

This method returns a copy of the LightCurve in which the flux and flux_err columns have been replaced by the values contained in a different column.


Name of the column that should become the ‘flux’ column.

flux_err_columnstr or None

Name of the column that should become the ‘flux_err’ column. By default, the column will be used that is obtained by adding the suffix “_err” to the value of flux_column. If such a column does not exist, flux_err will be populated with NaN values.


Copy of the LightCurve object with the new flux values assigned.


You can use this function to change the flux data on which most Lightkurve features operate. For example, to view a periodogram based on the “sap_flux” column in a TESS light curve, use:

>>> lc.select_flux("sap_flux").to_periodogram("lombscargle").plot()