Closed thomaswilliamsastro closed 3 months ago
Noticing some issues with NIRCam shorts. I'll poke into it
@rchwn @low-sky Ready for testing and review! There's some changes in the level_match config for inspiration if you want to play around. I ran through the full NGC2566 stack which was catastrophically crashing last time and now works fine
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:
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