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-3793: Fix numbers of flagged groups #338

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

drlaw1558
Copy link
Contributor

Resolves JP-3793 regarding inaccurate calculation of the number of groups in the jump step. This PR updates prior #317 to account for recent unrelated changes.

@drlaw1558 drlaw1558 requested a review from a team as a code owner February 7, 2025 16:09
@drlaw1558 drlaw1558 mentioned this pull request Feb 7, 2025
6 tasks
Copy link

codecov bot commented Feb 7, 2025

Codecov Report

Attention: Patch coverage is 98.43750% with 1 line in your changes missing coverage. Please review.

Project coverage is 86.42%. Comparing base (68118a2) to head (ec9b74c).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/stcal/jump/twopoint_difference.py 95.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #338      +/-   ##
==========================================
+ Coverage   86.14%   86.42%   +0.27%     
==========================================
  Files          50       50              
  Lines        9313     9369      +56     
==========================================
+ Hits         8023     8097      +74     
+ Misses       1290     1272      -18     

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

Copy link
Contributor

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

Comparing to the previous PR, it looks like this is a clean copy of the original changes, also incorporating comments from Ken's review.

There are a couple errors in the unit tests that need cleaning up. When that's done, I can run regression tests.

@@ -22,6 +22,89 @@ def _cube(ngroups, nints=1, nrows=204, ncols=204, readnoise=10):

return _cube

def test_sigclip_not_enough_groups(setup_cube):
Copy link
Contributor

Choose a reason for hiding this comment

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

This test has three different definitions with the same name, so only the last one will be run. Testing locally, it looks like the first one fails and the second two pass, as written.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, I thought that was odd but wasn't sure whether same-named tests were ok or not. I've given them unique names now. Looks like that also fixes why I wasn't able to get any pytests against stcal to run locally.
@mwregan2 Any thoughts on why some of these new tests are failing?

)
assert total_crs != -99

def test_nosigclip_with_enough_groups(setup_cube):
Copy link
Contributor

Choose a reason for hiding this comment

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

This test is also defined again later with the same name, so only the second one runs. Testing locally, it looks like both pass as written.

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