afeinstein20 / eleanor

A tool for light curve extraction from the TESS FFIs.
MIT License
92 stars 39 forks source link

Get eleanor working for S56 and beyond #262

Closed ethankruse closed 1 year ago

ethankruse commented 2 years ago

This is my fix for #261.

Upon reflection, I decided the easiest approach would be to switch to using the 20-sec targets as the reference point because then you again have an integer 10 20-sec cadences making up the new 200-sec FFI cadence.

I believe I made all the necessary changes, and it builds locally and seems to work on a test TOI.

Summary of changes:

The big issue I'm having is in choosing the correct 20-s cadences to use in the CBVs/quality flags.

In both cases, you're uncorrecting the BJD correction to compare times? For some reason, that seems to be correct for the CBVs as far as I can tell (the CBV times do seem to not be BJD corrected).

cbv_time = array([2825.25051738, 2825.25074886, 2825.25098034, ..., 2853.13893042, 2853.1391619 , 2853.13939338])

target[1].data['time'] = array([2825.25155724, 2825.25178872, 2825.2520202 , ..., 2853.13987331, 2853.14010479, 2853.14033627])

target[1].data['time'] - target[1].data['timecorr'] = array([2825.25051136, 2825.25074284, 2825.25097432, ..., 2853.1389244 , 2853.13915588, 2853.13938736])

But in the quality flag section, both the target and your cutout should theoretically be BJD corrected, but you uncorrect both of them. Why is that?

Which one you choose (BJD or uncorrected for each) changes your matching central 20-sec cadence by ~8 cadences (160s). So in previous sectors you might be off by 1 short cadence one way or the other, but now if you choose the wrong one, you're effectively shifting your quality flags to the wrong 200-sec cadence.

I tried playing around with it and just confused myself more, but I chose to use the BJD corrected times for the quality flag match for now.

benmontet commented 1 year ago

Not sure how this slipped through before but it looks like exactly the sensible way to handle this!