Skip to content

JP-4282: Flag group 0 snowballs - #566

Merged
melanieclarke merged 2 commits into
spacetelescope:mainfrom
melanieclarke:jp-4282
Sep 14, 2026
Merged

melanieclarke merged 2 commits into
spacetelescope:mainfrom
melanieclarke:jp-4282

Conversation

@melanieclarke

@melanieclarke melanieclarke commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Resolves JP-4282

Allow snowballs that occur in group 0 to be flagged. The fix is to start iterating at group 0 instead of 1, and take the "previous" group DQ value to be all-zero.

Associated jwst PR to do the same for zeroframes: spacetelescope/jwst#10838

Tasks

  • update or add relevant tests
  • update relevant docstrings and / or docs/ page
  • Does this PR change any API used downstream? (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 existing functionality, also add a changes/<PR#>.breaking.rst news fragment
  • run regression tests with this branch installed ("git+https://github.com/<fork>/stcal@<branch>")

@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.92%. Comparing base (28c2283) to head (5c8d9f6).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #566   +/-   ##
=======================================
  Coverage   91.91%   91.92%           
=======================================
  Files          63       63           
  Lines        8920     8925    +5     
=======================================
+ Hits         8199     8204    +5     
  Misses        721      721           

☔ View full report in Codecov by Harness.
📢 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.

@melanieclarke

melanieclarke commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

@melanieclarke

Copy link
Copy Markdown
Contributor Author

Running the jwst regtests locally and spot checking the changes, the diffs look to me like improvements to isolated snowballs, similar to the example mentioned in the ticket.

For example, for jw01094001002_02107_00001_nis_rate.fits from the NIRISS imaging regression test, a snowball around x,y = 838,490 that saturates in the first group is now caught and masked:

jw01094001002_02107_00001_nis_rate

@melanieclarke

melanieclarke commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Rerunning regtests and moving this to ready for review.

jwst: https://github.com/spacetelescope/RegressionTests/actions/runs/33526380596
Diffs as expected in detector1 products.

romancal: https://github.com/spacetelescope/RegressionTests/actions/runs/33512584960
All passing.

@melanieclarke
melanieclarke marked this pull request as ready for review September 1, 2026 13:23
@melanieclarke
melanieclarke requested a review from a team as a code owner September 1, 2026 13:23
@melanieclarke
melanieclarke marked this pull request as draft September 1, 2026 19:52
@melanieclarke

melanieclarke commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Setting this back to draft again. It needs more investigation, for zeroframe handling.

Edit: done. Needs a jwst PR: spacetelescope/jwst#10838

@melanieclarke

Copy link
Copy Markdown
Contributor Author

@schlafly - can you review for Roman?

@melanieclarke
melanieclarke merged commit d41a4c1 into spacetelescope:main Sep 14, 2026
26 checks passed
@melanieclarke
melanieclarke deleted the jp-4282 branch September 14, 2026 18:54
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.

4 participants