-
Notifications
You must be signed in to change notification settings - Fork 12
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
Poloidal degree change #162
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small suggestion for the computation of positive angles; otherwise LGTM!
Co-authored-by: Connor Moreno <[email protected]>
I can't merge until this is formatted with black |
My suggestion must've done something to the formatting |
parastell/nwl_utils.py
Outdated
@@ -186,6 +186,9 @@ def flux_coords(plas_eq, wall_s, coords, num_threads): | |||
for theta_coord_chunk in theta_coord_chunks | |||
for theta_coord in theta_coord_chunk | |||
] | |||
# Ensures theta_coords are all positive (add 360 degrees where needed) | |||
theta_coords = (theta_coords + 2 * np.pi) % 2*np.pi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will they need to be reordered/sorted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Edgar-21 correct me if I'm wrong but I don't believe theta_coords
is sorted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't need to be reordered, theta_coords is just a list of the same length as the list of surface crossings from the surface source that stores the poloidal angle for each surface crossing, all we are doing here is changing the notation of theta, each theta_coord still corresponds to the same surface crossing.
For reference, here is what the NWL looks like from before:
And after:
The first has been rescaled as noted in its title, but looking at the overall profile the coordinate shift can be seen
Co-authored-by: Paul Wilson <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks @FusionSandwich
@connoramoreno please take a look and let us know what you think.