Skip to content

Commit

Permalink
Merge pull request #164 from svalinn/comprehend_list_nwl
Browse files Browse the repository at this point in the history
  • Loading branch information
gonuke authored Oct 9, 2024
2 parents d36017b + 2297a3c commit e52ed76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion parastell/invessel_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,8 @@ def generate_invessel_build():
invessel_build_dict["poloidal_angles"],
invessel_build_dict["wall_s"],
invessel_build_dict["radial_build"],
logger=logger**invessel_build_dict,
logger=logger,
**invessel_build_dict,
)

invessel_build = InVesselBuild(
Expand Down
5 changes: 2 additions & 3 deletions parastell/nwl_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ def find_coords(data):
bounds=[(-np.pi, np.pi)],
args=(vmec, wall_s, coords[0], coords[1]),
)
thetas.append(theta.x[0])
# remap from [-pi,pi] to [0, 2pi] to match parastell's angle convention
thetas.append((theta.x[0] + 2 * np.pi) % (2 * np.pi))
return thetas


Expand Down Expand Up @@ -186,8 +187,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_coords + 2 * np.pi) % 2 * np.pi

return phi_coords.tolist(), theta_coords

Expand Down

0 comments on commit e52ed76

Please sign in to comment.