-
Notifications
You must be signed in to change notification settings - Fork 181
Allow background accumulation for combinations of full and subarray observations #7827
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
Allow background accumulation for combinations of full and subarray observations #7827
Conversation
de598eb to
be6da45
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #7827 +/- ##
==========================================
- Coverage 76.39% 76.36% -0.03%
==========================================
Files 459 459
Lines 37074 37130 +56
==========================================
+ Hits 28324 28356 +32
- Misses 8750 8774 +24
*This pull request uses carry forward flags. Click here to find out more.
☔ View full report in Codecov by Sentry. |
hbushouse
left a comment
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.
Looks good overall. Just a few comments and questions.
|
All the CI failures are due to a mismatch between jwst/master and the latest stdatamodels release. A new stdatamodels release is being created, which should fix this. |
be6da45 to
b120f7c
Compare
|
Comments addressed, and I've rebased and pushed |
|
Thanks for the updates. Looks good. Wouldn't hurt to add a short blurb to https://github.com/spacetelescope/jwst/blob/master/docs/jwst/background_step/description.rst to mention that the step now has the capability to create an average bkg image from inputs of different (overlapping) sizes. Looks like the failing CI tests are due to numpy deprecation warnings from other code modules, but still need to check them all to confirm. |
|
Started a regression test run at https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/895 |
|
Oh wait, regarding the failing CI tests. It does look like it's encountering a problem in the new code in this PR when running one of the unit tests: which is due to: Suggests that |
cfdb397 to
d601c87
Compare
d601c87 to
f0fe4ce
Compare
|
Could be, there's some code in there to catch if starts are missing but not sizes. Just made a quick edit on that which should hopefully catch it (unless subarray data, in which case it should likely error out anyway). Added a quick note in the description as well that this will use the overlapping regions |
|
In addition to adding a trap in the code for missing xsize/ysize values, it looks like the unit test should also be updated so that it sets those to begin with in the fake images it's creating. It sets xstart/ystart, but not xsize/ysize. For example, lines could be added here https://github.com/spacetelescope/jwst/blob/master/jwst/background/tests/test_background.py#L46 and https://github.com/spacetelescope/jwst/blob/master/jwst/background/tests/test_background.py#L72 to set |
|
Done! I used the image shape in case these things change in the future |
c6927d0 to
3bedeb6
Compare
|
CI failures are unrelated. |
hbushouse
left a comment
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.
Everything looks good now.
Closes #7807
This PR changes the way background accumulation is handled, to properly extract regions of the chip if combining e.g. main chip and subarray data. Tested on imaging data (works in these edge cases, and is identical to the old behaviour otherwise). Spectra should work but haven't explicitly been tested. I'm not at STScI so can't run the full regression suite.
Checklist for maintainers
CHANGES.rstwithin the relevant release sectionHow to run regression tests on a PR