Package: tglc
IntroductionTESS-Gaia Light Curve (TGLC) is a dataset of TESS full-frame image light curves publicly available via the MAST portal. It is fitted with effective PSF and decontaminated with Gaia DR3 and achieved percent-level photometric precision down to 16th TESS magnitude! It unlocks astrophysics to a vast number of dim stars below 12th TESS magnitude. A package called tglc is pip-installable for customized light curve fits.UsageThere are four fluxes in each FITS file: aperture flux, PSF flux, calibrated aperture flux, and calibrated PSF flux.
If you are uncertain which to use:Calibrated psf flux is better indeblendingtargets. Use this if you need to deblend a target near a variable source. The best deblending can be achieved with tglc package by setting a non-zero prior. It also gives the more accuratetransit depthin most cases, especially when fitting with an optimized prior.Calibrated aperture flux usually has slightlyhigher SNR. The transit depth (or variation amplitude), however, can be imperfect since the normalization depends on the PSF fitting which is imperfect. This imperfection can be minimized by using a bigger aperture than the default aperture (3*3). One need to use the tglc package and set tglc_lc(save_aper=True) to access the 5*5 aperture. In the presence of a bright but “constant” contamination (several magnitudes brighter), the calibrated aperture flux is better in removing the constant contamination.The aperture flux and PSF flux are not detrended or normalized. Use this if you are doing stellar variability science with long baseline. Or, if the detrending is not optimal (default detrending has a window length of 1 day; see Known Problems below), start with the aperture flux or PSF flux and detrend carefully!If you are uncertain, start with calibrated aperture flux!Thetutorialshows the syntaxes and differences among these light curves in several examples.Data AccessThere are three data access methods:MAST Portal: Easiest for acquiring light curves for a few stars. However, new sectors are updated relatively slowly.MAST bulk download: Best for downloading light curves for all stars (<16 TESS magnitude) in a sectors.tglc package: Capable of producing similar quality light curves for any sector and any star with custom options.MAST Portal/bulk downloadThe easiest usage requires no package installation. Simply follow theTGLC HLSP pageto download light curves from MAST or useMAST Portal. Light curves are being fitted sector by sector and will be available on MAST gradually. MAST hosts all Gaia DR3 stars down to 16th magnitude. Each .fits file includes PSF and aperture light curves and their calibrated versions.MAST available sectors:sector worklisttglc packageUsers can also fit light curves using the package tglc. Using tglc, one can specify a region, sector(s), and customized aperture shape if needed. It can also allow all field stars to float by assigning Gaussian priors, which can help decontaminate variable field stars. tglc is currently only available for linux. Run:pip install tglcfor the latest tglc release. After installation, follow thetutorialto fit light curves. If there is a problem, please leave a comment in the Issues section to help us improve. Thank you!Known ProblemsThere are several imperfections we noticed in the MAST TGLC light curves and tglc package:If the star is very dim (~< 15 Tmag) near a variable source, it can make the aperture and/or PSF light curve negative for some cadences. The detrending algorithm could malfunction and result in bad cal_aper_flux and/or cal_psf_flux. This is now fixed for tglc package, but this problem remains for the primary mission light curves published on MAST. Please detrend again if necessary. The extended mission light curves on MAST will not be affected. This is a very rare scenario, but could be important.ReferenceIf you find the TGLC light curves or the tglc package useful in your research, please citeour paperpublished on the Astronomical Journal.