make_lc

tessilator.lc_analysis.make_lc(phot_table, name_lc='target', store_lc=False, lc_dir='lc', cbv_flag=False)[source]

Construct the normalised, detrended, cleaned TESS lightcurve.

This is essentially a parent function that performs all the steps in fixing the lightcurve.

The returned product is an array containing the new tabulated lightcurve data for the original (unfiltered) aperture photometry, and (if necessary) another one for the CBV-corrected fluxes (see the ‘cbv_fit_test’ function for more information.)

Parameters:
phot_tableastropy.table.Table or dict
The data table containing aperture photometry. Columns must include:
“time” -> The time coordinate for each image
“mag” -> The target magnitude
“(reg/cbv)_oflux” -> The total flux subtracted by the background flux
“flux_err” -> The error on flux_corr
name_lcstr, optional, default=’target’

The name of the file which the lightcurve data will be saved to. The target name

store_lcbool, optional, default=False

Choose to save the cleaned lightcurve to file

lc_dirstr, optional, default=’lc’

The directory used to store the lightcurve files if lc_dir==True

cbv_flagbool, optional, default=False

Choose whether to analyse the lightcurves for CBV-corrected data.

Returns:
final_tabslist

A list of tables containing the lightcurve data These are for the original lightcurve, and the cbv-corrected lightcurve if required and it satisfies the criteria from cbv_fit_test.

norm_flagslist

A list of norm_flag values from the detrending algorithm.

smooth_flagslist

A list of smooth_flag values from the detrending algorithm.