-
Notifications
You must be signed in to change notification settings - Fork 182
JP-4035: Fit trace model and oversample IFU data #10066
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #10066 +/- ##
==========================================
+ Coverage 85.98% 86.95% +0.97%
==========================================
Files 368 370 +2
Lines 38457 39041 +584
==========================================
+ Hits 33066 33948 +882
+ Misses 5391 5093 -298 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
e5e5468 to
765c002
Compare
98c669c to
e427531
Compare
e910580 to
7554242
Compare
0eaa3fb to
cd4d546
Compare
|
Regtests here: Diffs are as expected for spec2 and spec3: the new cal step keyword appears and is set to SKIPPED. There are a couple small numerical diffs in the new regtest (test_miri_mrs_spec3_oversample) because I generated the truth files locally on my Mac. These can be okified with the rest. |
0ae7f83 to
80d2cbe
Compare
Resolves JP-4035
This PR will introduce a new spec2 and spec3 pipeline step called
adaptive_trace_model, which will model the spectral trace in a 2D spectral image with a set of 1D basis spline fits in each column along the dispersion axis. Optionally, the step will also use the trace model to oversample the input data by a specified factor (3 is recommended). Only IFU data is supported so far.Cube build is updated here to accommodate the oversampled data. Oversampled data will have a new frame added at the front of the WCS pipeline, to transform from oversampled pixels to detector pixels. All remaining transforms should work transparently from there, so all that is needed in cube build is to look for the right frame in the input and make sure that detector and image indices are separated correctly.
I added the new step before pixel_replace, with the idea that the new trace model might be a useful alternative for pixel replacement. So far, I updated pixel_replace to check for the right input coordinate frame in case of oversampled input data, but otherwise am not using the new profile anywhere other than the oversampling step. From INS testing, it looks like having the new step before pixel_replace results in a better trace model anyway.
Trace modeling and oversampling are based on David Law's initial draft, here:
https://github.com/drlaw1558/jwst/tree/ifu_oversample
Requires spacetelescope/stdatamodels#632
Tasks
Build 12.0(use the latest build if not sure)no-changelog-entry-needed)changes/:echo "changed something" > changes/<PR#>.<changetype>.rst(see changelog readme for instructions)docs/pageokify_regteststo update the truth files