-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add plane fitting to level_match_step.py #67
Conversation
Noticing some issues with NIRCam shorts. I'll poke into it |
2330cd8
to
8ea36ac
Compare
8ea36ac
to
2919439
Compare
2919439
to
013966a
Compare
- Also adds in metadata about background offset times at the lv2 stage - Also adds in option to combine the NIRCam short chips before any mosaic level matching - Fixes bugs - Updates various package versions
013966a
to
275355c
Compare
"lmfit>=1.2.2", | ||
"matplotlib>=3.8.2", | ||
"numpy>=1.26.4", | ||
"numpy>=1.26.4,<2", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uh oh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it might be fine to go higher, but it caused a crash on the RTD compile so I've limited it for now. Be good to review these versions soon, since JWST has just moved up to supporting numpy v2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wait no, I'm wrong, they're currently also pinned <2
This PR hugely extends the level_match capabilities to also allow for simple 2D planes as well as just a constant offset. This seems to be necessary in some cases, for reasons currently unclear.
The type of fitting can be specified at each stage via the new parameters:
where the options are "level" (constant offset), and "level+slope" (plane)
When matching mosaic tiles, we need to define a reference image which we assume to be completely flat and edit other corrections relative to that. We either use the tile taken closest in time to the backgrounds (if they exist), or the one with maximal overlap between the tileset. As such, the lv2 step has been expanded slightly to include information on when the nearest background to the science observation was taken to make that easier
For now, this is a draft while we run through testing. Obvious test cases are NGC1792 and NGC253 where the level matching currently isn't great, but there may be others lurking