8000 JP-3622 Update refpix step for NIR detectors to use convolution kernel by penaguerrero · Pull Request #8726 · spacetelescope/jwst · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

JP-3622 Update refpix step for NIR detectors to use convolution kernel #8726

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 82 commits into from
Dec 20, 2024

Conversation

penaguerrero
Copy link
Contributor
@penaguerrero penaguerrero commented Aug 26, 2024

Resolves JP-3622

Closes #

This PR addresses the addition of an optimized convolution kernel to the REFPIX step

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

@penaguerrero penaguerrero requested a review from a team as a code owner August 26, 2024 17:30
Copy link
codecov bot commented Aug 26, 2024

Codecov Report

Attention: Patch coverage is 81.25000% with 21 lines in your changes missing coverage. Please review.

Project coverage is 66.87%. Comparing base (095d364) to head (8146963).
Report is 786 commits behind head on main.

Files with missing lines Patch % Lines
jwst/refpix/refpix_step.py 14.28% 12 Missing ⚠️
jwst/refpix/reference_pixels.py 70.96% 9 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #8726       +/-   ##
===========================================
- Coverage   76.89%   66.87%   -10.03%     
===========================================
  Files         497      377      -120     
  Lines       45656    38099     -7557     
===========================================
- Hits        35108    25478     -9630     
- Misses      10548    12621     +2073     
Flag Coverage Δ
nightly ?

☔ 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.

@penaguerrero
Copy link
Contributor Author

This PR should be coordinated with spacetelescope/stdatamodels#321

@melanieclarke
Copy link
Collaborator

@penaguerrero - This implementation looks pretty faithful to the example notebook we were given, but I think with a little more effort, we can integrate it more smoothly into the existing code base.

This correction is intended to replace the rolling median in the side reference pixel correction, if d 8000 esired. I think it was probably implemented as a totally separate correction just to make it possible to call it as a post-hook for the step. What would be more natural for our code is to keep the existing side pixel identification and signal subtraction structure, and just add an alternate method that does the convolution, to sub in for the median_filter function as needed.

That is, modify the calculate_side_ref_signal function here:

def calculate_side_ref_signal(self, group, colstart, colstop):

to check for a "use convolution" option. If desired, then an optimized convolution filter is called. If not, the median_filter function is called as usual.

That is, we are not turning off side pixel correction and adding in a whole new correction, we're just replacing the low-level median filter for the side pixels with the convolution filter instead. Does that make sense?

@melanieclarke melanieclarke removed this from the Build 11.2 milestone Dec 12, 2024
@melanieclarke melanieclarke added this to the Build 11.3 milestone Dec 12, 2024
@penaguerrero
Copy link
Contributor Author
penaguerrero commented Dec 13, 2024

@melanieclarke
Copy link
Collaborator

I reran the full regtest set here:
https://github.com/spacetelescope/RegressionTests/actions/runs/12318879900

There are many failures, but I think they are all because of differences between CRDS test and ops.

Copy link
Collaborator
@melanieclarke melanieclarke left a comment

Choose a reason for hiding this comment

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

I think this is now ready to go, pending merge of the stdatamodels PR and any coordination that needs to happen with CRDS.

@melanieclarke melanieclarke modified the milestones: Build 11.3, Build 11.2 Dec 13, 2024
@melanieclarke
Copy link
Collaborator

@tapastro - I'm setting the build milestone back to 11.2, assuming we can sort out the remaining coordination issues for this build.

@tapastro tapastro self-requested a review December 20, 2024 20:51
@tapastro tapastro merged commit dfd1fc7 into spacetelescope:main Dec 20, 2024
26 of 27 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.

6 participants
0