Closed guynir42 closed 1 year ago
Hey @felixzhu555 I’m using Zenhub in GitHub, click this link to join my workspace and see other features available in GitHub or download the Zenhub extension and sign up with your GitHub account. Posted using Zenhub
Should we use SAP_FLUX or PDCSAP_FLUX? The TESS documentation says SAP is "Simple aperture photometry light curve" and PDCSAP is "PDC corrected SAP light curve". I'm going to default to PDC.
Sounds like a good bet to use the corrected lightcurve. I'll try to figure out what the differences are. It could also be good to download a few examples and plot them to try to see the differences.
Plotted one sample, it seems like PDC values are higher than SAP values by about 1000 e-/s (15400 vs 14400 average). Also, is this paper related to our goals? https://www.researchgate.net/publication/358457993_Searching_for_white_dwarf_variables_in_TESS_data
Comparing by magnitude seems a bit fuzzy, querying by MAST returns observations with slightly different mag values than those for the GAIA catalog. For example, GAIA's g_mean_mag = 8.524133, but astroquery yields GAIAmag = 8.47446. I wanted to clarify, what exactly is mag being used for in fetch_data? Is it just used to filter out anything with mag > threshold? Or do we also use mag to query?
astroquery also seems to have HTTP timeouts quite frequently, don't know how we can have the code handle such random issues.
The magnitude will not be exactly the same, these are different instruments with different wavelength bands. If the magnitude of some lightcurve is really far from the expected value that means it is the wrong source / mixed source, so we'll skip it. Besides that the magnitude is not needed for the query itself.
Do the PDC values seem more stable over the lightcurve? Can you calculate the RMS/mean of each lightcurve? Perhaps the noise is removed/detrended somehow.
One way to handle timeouts would be to make a loop (with, e.g., 10 tries) and in that loop do a try/except block. You'd want to "catch" only the timeout exceptions and ignore them (maybe print out something or not).
Here are some things we need to do to get TESS integrated into VO: 1) create a new file named tess.py 2) Use the existing template in ztf.py to make a
ParsObsTESS
andVirtualTESS
classes. 3) Make afetch_data_from_observatory
function (like the one inobservatory.py
underVirtualDemoObs
class. It should accept the argumentsself, cat_row, verbose=0
and any others that may be needed. This should return a dataframe with all photometry for a source, assumingcat_row
is a dictionary that hasra
anddec
keys 4) Add areduce_to_lightcurves
function similar to that inVirtualZTF
. This function should acceptself, datasets, source=None, init_kwargs={}
and any other arguments (probably want to add_**
in the end to absorb additional but irrelevant keywords). This function should split up a dataset of raw data into lightcurves for different visits.