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-3708, JP-3771, JP-3791 #318

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

Conversation

kmacdonald-stsci
Copy link
Collaborator

Resolves JP-3708
Resolves JP-3771
Resolves JP-3791

JP-3708: Add the CRMAG parameter to the optional results product in the C-extension. This wasn't implemented with the C-extension, nor was it properly handled for multiprocessing.

JP-3771: Corrected bugs exposed by adding multiprocessing regression tests to the JWST regression testing suite. The primary bug found was incorrect dimension sizes for internal arrays used for the optional results product. The internal arrays should have dimensions of (nints, nrows, ncols), but they had dimensions (ngroups, nrows, ncols). These incorrect dimensions caused memory corruption causing processes to freeze or segfault.

JP-3791: Corrected the CHARGELOSS recomputation of the read noise variance. For multiprocessing the DQ flags were not being properly sliced and passed to the C-extension for recomputation.

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 below for change types)
    • run regression tests with this branch installed ("git+https://github.com/<fork>/stcal@<branch>")
news fragment change types...
  • changes/<PR#>.apichange.rst: change to public API
  • changes/<PR#>.bugfix.rst: fixes an issue
  • changes/<PR#>.general.rst: infrastructure or miscellaneous change

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 91.42857% with 3 lines in your changes missing coverage. Please review.

Project coverage is 86.40%. Comparing base (d420770) to head (d34d0fd).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/stcal/ramp_fitting/ols_fit.py 66.66% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #318      +/-   ##
==========================================
+ Coverage   86.38%   86.40%   +0.01%     
==========================================
  Files          49       49              
  Lines        8899     8934      +35     
==========================================
+ Hits         7687     7719      +32     
- Misses       1212     1215       +3     

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

*/
void
set_up_logger() {
const char * log_dir = "/Users/kmacdonald/code/stcal/logs";

Choose a reason for hiding this comment

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

Maybe get this location from an environment variable or some other way?

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed - this needs to be removed or updated to remove the local path.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's a debugging function that isn't used anywhere. I left it there so I can use it in the future for debugging. I'll simply remove the path.

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.

Looking good!

Testing on the sample data that failed in #304, I no longer see the processing hang with the optional output + multiprocessing. Optional output looks the same with and without multiprocessing now, and also shows only minor differences from output with the main branch + algorithm = 'OLS'.

Did you run regression tests for jwst and romancal? If so, can you please link them here?

@@ -0,0 +1,19 @@
JP-3791: Fixed the `ramp fitting` multiprocessing portion of the
Copy link
Contributor

Choose a reason for hiding this comment

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

This note doesn't render correctly when it's added to the CHANGES.rst - it is causing errors in the docs build. I think it needs to be rephrased as a single paragraph. We also don't usually add JP ticket numbers to the change log.

*/
void
set_up_logger() {
const char * log_dir = "/Users/kmacdonald/code/stcal/logs";
Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed - this needs to be removed or updated to remove the local path.

@kmacdonald-stsci
Copy link
Collaborator Author

Looking good!

Testing on the sample data that failed in #304, I no longer see the processing hang with the optional output + multiprocessing. Optional output looks the same with and without multiprocessing now, and also shows only minor differences from output with the main branch + algorithm = 'OLS'.

Did you run regression tests for jwst and romancal? If so, can you please link them here?

Here is a link to the regression tests I ran on these PRs:

https://github.com/spacetelescope/RegressionTests/actions/runs/11820513473

These changes don't effect RomanCal, but I will ask a RomanCal maintainer to run regression tests against these changes.

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.

3 participants