Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #826 +/- ##
==========================================
- Coverage 59.88% 59.82% -0.06%
==========================================
Files 107 107
Lines 14029 14064 +35
==========================================
+ Hits 8401 8414 +13
- Misses 5628 5650 +22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Yes, I support adding a trace to the plot! |
|
That last commit fixes a minor oversight, where the default pastasoss trace retrieval assumes the trace is at the nominal position first, and then rotates it based on the pupil wheel position. Since rotations and translations don't commute, it's not proper to then shift that pre-rotated trace by the planned X-offset. This caused a difference of a few pixels out at the long wavelength end compared to the observed spectral trace, so I've edited my initial code to translate first, then rotate. I'm not convinced this makes a major difference in the final lightcurve stability, but we'll see. Otherwise, unless anyone has any other suggestions for trace positioning or plotting edits (or whether we should support manual X-direction offsets in the ECFs), I don't think I've got anything else to change here. |

Sometimes, given challenging position angle requirements for targets in multiple systems, observers might apply extra offsets to their NIRISS pointings. This PR includes code to grab the relevant offset information from the FITS headers and applies those to the PASTASOSS modeled traces to ensure correct straightening of the observed spectral trace and correct spectral extraction. This PR also includes code to extrapolate the trace position and wavelength solution out to longer (or shorter, I guess) wavelengths depending on the direction of the offset, so that observers don't lose any flux.
Currently, this works for X-offsets, but Y-offsets are also potentially allowed and we may want to add code to handle these as well. As these are observatory-level operations, I've currently chosen to make this an automatic, header-driven step in S3, but we might want to also allow for passing in custom offset values in the S3 ECFs.