Skip to content

JP-4224: Remove correction_pars#10432

Merged
melanieclarke merged 9 commits into
spacetelescope:mainfrom
melanieclarke:jp-4224
May 5, 2026
Merged

JP-4224: Remove correction_pars#10432
melanieclarke merged 9 commits into
spacetelescope:mainfrom
melanieclarke:jp-4224

Conversation

@melanieclarke
Copy link
Copy Markdown
Collaborator

@melanieclarke melanieclarke commented Apr 7, 2026

Resolves JP-4224

Remove unnecessary storage of correction models as an attribute on the following steps: flat_field, pathloss, barshadow, photom, and master_background_mos.

Just recomputing the corrections instead of storing them only adds a small amount of processing time to the master_background_mos step (~4s running the regtest example locally), but it improves peak memory use in stage 2 for all modes that use these steps.

Discussion still needed about whether we need to deprecate these attributes. So far, I have just removed them, but I can add deprecation support back in.

This PR is built on top of #10421, since they touch the same step and the additional unit test coverage was useful here. I can separate them out if need be. (those changes have been merged; this PR is rebased)

Initial regression tests here:
https://github.com/spacetelescope/RegressionTests/actions/runs/24090988005
There is one header diff for master background MOS processing, because the interpolated flat is recreated instead of provided as a custom reference file. I think the existing value was misleading anyway. Also shows memory improvements above the threshold for NIRCam imaging and spectra as well as NIRISS SOSS.

Tasks

  • If you have a specific reviewer in mind, tag them.
  • add a build milestone, i.e. Build 12.0 (use the latest build if not sure)
  • Does this PR change user-facing code / API? (if not, label with no-changelog-entry-needed)
    • write news fragment(s) in changes/: echo "changed something" > changes/<PR#>.<changetype>.rst (see changelog readme for instructions)
      • if your change breaks step-level or public API (as defined in the docs), also add a changes/<PR#>.breaking.rst news fragment
    • update or add relevant tests
    • update relevant docstrings and / or docs/ page
    • start a regression test and include a link to the running job (click here for instructions)
      • Do truth files need to be updated ("okified")?
        • after the reviewer has approved these changes, run okify_regtests to update the truth files
  • if a JIRA ticket exists, make sure it is resolved properly

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 7, 2026

Codecov Report

❌ Patch coverage is 98.64865% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 86.38%. Comparing base (f86541f) to head (83a7cd8).

Files with missing lines Patch % Lines
jwst/barshadow/bar_shadow.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10432      +/-   ##
==========================================
- Coverage   86.40%   86.38%   -0.02%     
==========================================
  Files         373      373              
  Lines       40112    40062      -50     
==========================================
- Hits        34658    34608      -50     
  Misses       5454     5454              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tapastro
Copy link
Copy Markdown
Contributor

tapastro commented May 4, 2026

I'm in favor of moving forward here. Just needs a conflict to be resolved and to be pulled out of draft.

@melanieclarke
Copy link
Copy Markdown
Collaborator Author

melanieclarke commented May 4, 2026

New regression test run:
https://github.com/spacetelescope/RegressionTests/actions/runs/25341328675

Just the one expected header diff, for the master_background_mos test.

@melanieclarke melanieclarke marked this pull request as ready for review May 4, 2026 20:19
@melanieclarke melanieclarke requested a review from a team May 4, 2026 20:19
@melanieclarke melanieclarke merged commit d894797 into spacetelescope:main May 5, 2026
30 checks passed
@melanieclarke melanieclarke deleted the jp-4224 branch May 5, 2026 13:50
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.

2 participants