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

compute the rotational transform on a magnetic axis #399

Merged
merged 7 commits into from
Mar 30, 2024

Conversation

andrewgiuliani
Copy link
Contributor

This PR introduces functionality to compute the rotational transform on a magnetic axis, using an algorithm shared with me by @landreman and suggested by Stuart Hudson. I've put this function in util/magnetic_axis_helpers.py.

Any suggestions of addition unit tests where the analytical rotational transform is known are welcome.

Copy link

codecov bot commented Mar 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.52%. Comparing base (5b1cb70) to head (5663c88).
Report is 9 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #399      +/-   ##
==========================================
+ Coverage   91.43%   91.52%   +0.08%     
==========================================
  Files          73       74       +1     
  Lines       12701    12819     +118     
==========================================
+ Hits        11613    11732     +119     
+ Misses       1088     1087       -1     
Flag Coverage Δ
unittests 91.52% <100.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link
Contributor

@landreman landreman left a comment

Choose a reason for hiding this comment

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

What do you think about putting this function and test in simsopt.field rather than simsopt.util?

src/simsopt/util/magnetic_axis_helpers.py Outdated Show resolved Hide resolved
src/simsopt/util/magnetic_axis_helpers.py Outdated Show resolved Hide resolved
src/simsopt/util/magnetic_axis_helpers.py Outdated Show resolved Hide resolved
@andrewgiuliani
Copy link
Contributor Author

What do you think about putting this function and test in simsopt.field rather than simsopt.util?

I've moved the magnetic_axis_helpers.py file to the simsopt.field directory. This file would be a good place to include a function that actually computes a field's magnetic axis, in an upcoming PR.

@andrewgiuliani andrewgiuliani merged commit 1fb6e87 into master Mar 30, 2024
47 checks passed
@andrewgiuliani andrewgiuliani deleted the ag/on_axis_iota branch March 30, 2024 20:06
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.

4 participants