Skip to content

Commit

Permalink
do theta shift where its calculated
Browse files Browse the repository at this point in the history
  • Loading branch information
Edgar-21 committed Oct 8, 2024
1 parent ac01cb4 commit c2c7f66
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions parastell/nwl_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def find_coords(data):
bounds=[(-np.pi, np.pi)],
args=(vmec, wall_s, coords[0], coords[1]),
)
thetas.append(theta.x[0])
thetas.append((theta.x[0] + 2 * np.pi) % (2 * np.pi))
return thetas


Expand Down Expand Up @@ -186,10 +186,6 @@ 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_coord + 2 * np.pi) % 2 * np.pi for theta_coord in theta_coords
]

return phi_coords.tolist(), theta_coords

Expand Down

0 comments on commit c2c7f66

Please sign in to comment.