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

Removed nested for loop, floats->doubles #325

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

Conversation

t-brandt
Copy link

Resolves JP-nnnn
Resolves RCAL-nnnn

Closes #

This PR removes a nested for loops in the Cython code, changing its cost from order nresultants^2 to order nresultants. It also promotes some floats to doubles within that routine, and removes the allocation of an unneeded array.

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

@t-brandt t-brandt requested a review from a team as a code owner December 17, 2024 18:28
Copy link

codecov bot commented Dec 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.55%. Comparing base (728b877) to head (ccf2672).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #325      +/-   ##
==========================================
- Coverage   29.56%   29.55%   -0.01%     
==========================================
  Files          37       36       -1     
  Lines        8332     7949     -383     
==========================================
- Hits         2463     2349     -114     
+ Misses       5869     5600     -269     

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

@schlafly
Copy link
Collaborator

Tim, can you add a change log entry, following this model? https://github.com/spacetelescope/stcal/pull/321/files#diff-65a8677afe9532023b50e0f3c9424360837e2b7f60693db564f8e3056ff5d4a5

Roman regtests are here: https://github.com/spacetelescope/RegressionTests/actions/runs/12379700686
They show some small differences likely related to numerical precision; I will investigate tomorrow. I've not run Webb regtests as it seems impossible that this could have any effect there, as ols_cas22 is not used?

Tim, do you want to ask someone running large ramps to test to see if this leads to the expected speed up?

@t-brandt
Copy link
Author

I added a change log entry. That is correct; this code is not used at all in the JWST pipeline. And I asked RTB members to run romancal on this stcal branch to verify performance.

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