afeinstein20 / eleanor

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

A general fix for errors due to cadence mismatch between postcard and metadata (quality flags, ffiindex, CBV) #278

Open orionlee opened 1 month ago

orionlee commented 1 month ago

The problem in #267 (in sector 65, camera 4, ccd 4) happens in other cases as well, including sector 78, camera 4, ccd 4 (e.g., TIC 468524320).

This PR provides a general fix, a general version of the sector 65 fix at 05e8e8db9eab865dcfa632406cc1eab3cc3b756b.

When there is a cadence mismatch, the PR:

  1. re-calculates quality flag
  2. re-calculates ffi index
  3. re-calculates CBV, and saves the updated version in ~/.eleanor/metadata for future use (for the specific sector-camera-ccd)

The re-calculation is based on the similar logic in update.py. The codes should probably be re-factorized so that the logic is centralized in one place (rather than having multiple functionally identical copies, especially in light of the tweaks going to be needed to accommodate sectors 83+ data).


cc @vbkostov