Skip to content
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

JP-3638: Flag asymmetrical snowballs #261

Merged
merged 11 commits into from
Jun 12, 2024

Conversation

mwregan2
Copy link
Collaborator

@mwregan2 mwregan2 commented Jun 3, 2024

Resolves JP-3638

Closes spacetelescope/jwst#8516

This PR addresses the problem of asymmetrical snowballs not getting removed from NIR exposures. These are a sub-population of snowballs where the incoming particle leads a trail of pixels that are flagged as jump and then trigger a circular snowball with a saturated core. Because the current code requires that the center of the ellipse fitted to the pixel flagged as jump have a saturated pixel, these snowballs do not get recognized as a snowball and do not get any increase in the jump ellipse.

The change was to just remove the requirement that the central pixel be saturated and change the requirement to be that there needs to be saturation within a circle with a radius of the major axis of the ellipse centered on the center of the ellipse.

Checklist

  • added entry in CHANGES.rst (either in Bug Fixes or Changes to API)
  • updated relevant tests
  • updated relevant documentation
  • updated relevant milestone(s)
  • added relevant label(s)

Copy link

codecov bot commented Jun 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.79%. Comparing base (af5aefb) to head (dd386f4).
Report is 60 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #261      +/-   ##
==========================================
- Coverage   85.18%   83.79%   -1.40%     
==========================================
  Files          35       36       +1     
  Lines        6797     7009     +212     
==========================================
+ Hits         5790     5873      +83     
- Misses       1007     1136     +129     

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

Copy link
Collaborator

@kmacdonald-stsci kmacdonald-stsci left a comment

Choose a reason for hiding this comment

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

The pipeline should only output expected output files. All output files should be written to the pytest temporary folder. The imports in the ols_fit.py file should not be commented out.

src/stcal/jump/jump.py Outdated Show resolved Hide resolved
tests/test_jump.py Outdated Show resolved Hide resolved
tests/test_jump.py Outdated Show resolved Hide resolved
src/stcal/ramp_fitting/ols_fit.py Outdated Show resolved Hide resolved
@mwregan2
Copy link
Collaborator Author

mwregan2 commented Jun 4, 2024 via email

Copy link
Collaborator

@hbushouse hbushouse left a comment

Choose a reason for hiding this comment

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

Needs a regression test run. I'll start one and leave a link here.

CHANGES.rst Outdated Show resolved Hide resolved
@hbushouse
Copy link
Collaborator

@hbushouse
Copy link
Collaborator

@nden Who's on the hook from Roman these days to run romancal tests for this PR?

@hbushouse
Copy link
Collaborator

@mwregan2 The regression test run shows differences in the jump step results for a NIRISS and NIRSpec exposure. For the NIRISS data, the number of extended CRs flagged, as recorded in the EXTNCRS keyword, went up by a factor of 10 compared to before. In the NIRSpec exposure it went up by a factor of 2. Are these large increases expected due to the changes here and are they reasonable?

@mwregan2
Copy link
Collaborator Author

mwregan2 commented Jun 5, 2024 via email

@mwregan2
Copy link
Collaborator Author

mwregan2 commented Jun 5, 2024 via email

@mwregan2
Copy link
Collaborator Author

mwregan2 commented Jun 5, 2024 via email

@hbushouse hbushouse changed the title Flag asymmetrical snowballs JP-3638: Flag asymmetrical snowballs Jun 6, 2024
Copy link
Collaborator

@hbushouse hbushouse left a comment

Choose a reason for hiding this comment

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

Based on subsequent discussions regarding the large increase in snowball flagging for NIRISS images, it's been concluded that those are OK and actually desirable.

So my final question before approving is to ask whether this change should result in any updates in the docs anywhere?

@mwregan2
Copy link
Collaborator Author

mwregan2 commented Jun 6, 2024 via email

@hbushouse hbushouse merged commit b7dfcc9 into spacetelescope:main Jun 12, 2024
26 of 28 checks passed
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.

Asymmetrical Snowballs not getting flagged
3 participants