Nat1405 / Nifty4Gemini

A Gemini Data Reduction Pipeline Framework
MIT License
0 stars 0 forks source link

Automatic Sky Frame Identification #13

Open Nat1405 opened 4 years ago

Nat1405 commented 4 years ago

Sky frames are currently identified by their P and Q offsets. If the "radius" of the offsets (sqrt(POFF^2 + QOFF^2) ) is larger than a threshold value the frame is deemed to be a sky frame. However, this can fail if the science frames were not centred as well and every frame has a non-zero offset radius.

I think moving the sky frame identification from makePythonLists to sortScienceAndTellurics() is a good idea. Then, a new way to identify sky frames vs science frames automatically is needed.

Nat1405 commented 4 years ago

One algorithm idea:

For each telluric or science observation directory:
    - Make two clusters of images based on P and Q offsets
    - Take the cluster with the higher median counts to be the science frames.
Nat1405 commented 3 years ago

47 programs at time of writing have a skyFrameError. I've been working to update how sky frames are identified. I implemented the clustering idea, and it seems to work pretty well for bright objects like telluric observations. However, for very faint targets like in GN-2013A-Q-62 both the skyFrame and scienceFrame clusters have very similar median counts. In that case, it's better to fall back to the "outside 1.5 arcsecond offset" strategy....