8000 JP-3553: Update background step handling of multi-ints exposures by hbushouse · Pull Request #8326 · spacetelescope/jwst · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

JP-3553: Update background step handling of multi-ints exposures #8326

8000
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

Merged
merged 5 commits into from
Mar 4, 2024

Conversation

hbushouse
Copy link
Collaborator
@hbushouse hbushouse commented Mar 1, 2024

Resolves JP-3553

Closes #8313

This PR updates the background subtraction step to make it more flexible in handling multi-integration background exposures (rateints files). Previously, the way the code was implemented, it was necessary to have NINTS be the same for the science exposure and all of the background exposures. This update allows the background exposures to have any value of NINTS and still be used correctly to form a mean background, which is subsequently subtracted from every integration of the science exposure. The problem with the previous code was that it was allocating internal arrays for working with the background images based on the shape of the science data, so if they different NINTS, the shape is wrong. This update simply allocates the internal background arrays based on the shape of each background image.

I've also incorporated the data that originally triggered this work into a new form of the existing regression test that runs the background step on multi-integration exposures. All of the necessary input and truth files have been uploaded to Artifactory and the updated test runs successfully on my local branch.

Checklist for maintainers

  • added entry in CHANGES.rst within the relevant release section
  • updated or added relevant tests
  • updated relevant documentation
  • added relevant milestone
  • added relevant label(s)
  • ran regression tests, post a link to the Jenkins job below.
    How to run regression tests on a PR
  • Make sure the JIRA ticket is resolved properly

@hbushouse
Copy link
Collaborator Author

Copy link
8000
codecov bot commented Mar 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.38%. Comparing base (4cc0ac1) to head (87024a1).
Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8326      +/-   ##
==========================================
+ Coverage   75.15%   75.38%   +0.22%     
==========================================
  Files         470      474       +4     
  Lines       38604    38904     +300     
==========================================
+ Hits        29014    29326     +312     
+ Misses       9590     9578      -12     
Flag Coverage Δ *Carryforward flag
nightly 77.34% <ø> (-0.06%) ⬇️ Carriedforward from 54a58a8

*This pull request uses carry forward flags. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hbushouse
Copy link
Collaborator Author

Regression test started at https://plwishmaster.stsci.edu:8081/job/RT/job/JWST-Developers-Pull-Requests/1252

Regtest run had 2 unrelated failures. So this PR is clean.

@hbushouse hbushouse requested review from tapastro and emolter March 2, 2024 16:46
Copy link
Collaborator
@emolter emolter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just suggesting to slightly modify changelog wording

Co-authored-by: Ned Molter <emolter@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

level2b for mir_4qpm jw03254-c1009 crashed with "could not broadcast input array"
2 participants
0