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

Replace maths library with Python libraries #3418

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

Conversation

timothy-nunn
Copy link
Contributor

Removing some of the maths routines that can be replaced with simple routines from libraries like numpy and scipy.

@codecov-commenter
Copy link

codecov-commenter commented Dec 11, 2024

Codecov Report

Attention: Patch coverage is 80.88235% with 13 lines in your changes missing coverage. Please review.

Project coverage is 29.53%. Comparing base (ec3c1f5) to head (c6ddd0e).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
process/pfcoil.py 14.28% 12 Missing ⚠️
process/availability.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3418      +/-   ##
==========================================
+ Coverage   29.51%   29.53%   +0.01%     
==========================================
  Files          77       78       +1     
  Lines       19049    20097    +1048     
==========================================
+ Hits         5622     5935     +313     
- Misses      13427    14162     +735     

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

sigma, umat, vmat, ierr, work2 = ml.svd(
nrws, np.asfortranarray(gmat), truth, truth
)
umat, sigma, vmat = svd(gmat)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The changes to PF coil require a bit of explaining. The single value decomposition from scipy returns different results to the maths library implementation. This causes the integration tests to fail, but none of the regression tests.

In some cases, like test_solv the values of ccls changed, but their sum did not.
In test_efc, the ccls values changed (one of the PF coils groups ended up with 0 current!?) but the ssq value did not, weirdly, ssq is calculated from the ccls.

Overall, I suspect this is nothing to worry about, but its worth careful consideration before approving.

@timothy-nunn timothy-nunn self-assigned this Dec 11, 2024
@timothy-nunn timothy-nunn marked this pull request as ready for review December 11, 2024 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants