make_lc

tessilator.lc_analysis.make_lc(phot_table)[source]

Construct the normalised TESS lightcurve.

The function runs the following tasks:
(1) Read the table produced from the aperture photometry
(2) Normalise the lightcurve using the median flux value.
(3) Clean the lightcurve from spurious data using “clean_lc”
(4) Detrend the lightcurve using “detrend_lc”
(5) Return the original normalised lightcurve and the cleaned lightcurve
Parameters:
phot_tableastropy.table.Table or dict
The data table containing aperture photometry returned by aper_run.py. Columns must include:
“time” -> The time coordinate for each image
“mag” -> The target magnitude
“flux_corr” -> The total flux subtracted by the background flux
“flux_err” -> The error on flux_corr
Returns:
clndict
The cleaned, detrended, normalised lightcurve, with the keys:
“time” -> The time coordinate
“time0” -> The time coordinate relative to the first data point
“oflux” -> The original, normalised flux values
“nflux” -> The detrended, cleaned, normalised flux values
“enflux” -> The error on “nflux”
“lc_part” -> The running index for each contiguous data section in the lightcurve
origdict
The original, normalised lightcurve, with the keys:
“time” -> The time coordinate
“nflux” -> The original, normalised flux values
“mag” -> The TESS magnitude values