8000 JP-3639: Implement 1/f noise correction for ramp data by melanieclarke · Pull Request #8669 · spacetelescope/jwst · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

JP-3639: Implement 1/f noise correction for ramp data #8669

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 67 commits into from
Sep 17, 2024

Conversation

melanieclarke
Copy link
Collaborator
@melanieclarke melanieclarke commented Jul 23, 2024

Resolves JP-3639

Closes #8517

Add a flicker noise correction step to the detector1 pipeline.

Implements both a median-based correction, based on Chris Willott's image1overf, and an fft-based algorithm, based on Bernard Rauscher's NSClean. The nsclean step in spec2 is now aliased to the clean_flicker_noise step, which can support either rate-like input or ramp-like input.

Various scene masking options are provided for either correction option. When run from detector1, the ramp_fit step is run to generate a temporary rate image, used to generate the scene mask. For NIRSpec spectral data, if mask_science_regions is True, the assign_wcs and msaflagopen steps are additionally run to allow masking of the entire science area. For MIRI imaging data, if mask_science_regions is True, the flat_field step is run to retrieve NON_SCIENCE flags, used to block light from the metering structure.

Checklist for PR authors (skip items if you don't have permissions or they are not applicable)

  • 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
  • All comments are resolved
  • Make sure the JIRA ticket is resolved properly

Copy link
codecov bot commented Jul 23, 2024

Codecov Report

Attention: Patch coverage is 93.78531% with 33 lines in your changes missing coverage. Please review.

Project coverage is 61.74%. Comparing base (9f82b52) to head (0396186).

Files with missing lines Patch % Lines
jwst/clean_flicker_noise/clean_flicker_noise.py 96.65% 16 Missing ⚠️
jwst/nsclean/nsclean_step.py 5.88% 16 Missing ⚠️
jwst/pipeline/calwebb_detector1.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8669      +/-   ##
==========================================
+ Coverage   60.75%   61.74%   +0.99%     
==========================================
  Files         375      377       +2     
  Lines       38367    38716     +349     
==========================================
+ Hits        23308    23904     +596     
+ Misses      15059    14812     -247     

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

@melanieclarke melanieclarke marked this pull request as ready for review September 9, 2024 13:45
@melanieclarke melanieclarke requested a review from a team as a code owner September 9, 2024 13:45
@melanieclarke
Copy link
Collaborator Author

This is ready for initial reviews. There is one change outstanding for the NSClean implementation (#8745), which needs to merge first, but I'd like to get the rest of the code reviewed for software issues. I'll run regression tests after the NSClean change is done, unless it would be helpful to see them now.

@melanieclarke
Copy link
Collaborator Author

@melanieclarke
Copy link
Collaborator Author

In the regression test results:

  • Minor changes are expected for nsclean for NIRSpec spec2 and downstream products. I've inspected the differences locally and they are small, mostly due to some revisions in how the scene mask is created, including a new exclusion for large negative outliers.
  • Changes from truth for the new regtest for MIRI clean_flicker_noise were just because of differences between my system and Jenkins: my local CRDS cache had the wrong emicorr reference file. I okified those changes.
  • Other changes (NIRISS rate and MIRI badpix_selfcal) are unrelated.

Copy link
Contributor
@tapastro tapastro left a comment

Choose a reason for hiding this comment

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

👏 🎉

@tapastro tapastro merged commit 05d3c96 into spacetelescope:master Sep 17, 2024
29 checks passed
@melanieclarke melanieclarke deleted the jp-3639 branch September 17, 2024 14:08
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.

Implementation of 1/f correction
4 participants
0