diff --git a/parastell/invessel_build.py b/parastell/invessel_build.py index 1d535ec..29b2fc1 100644 --- a/parastell/invessel_build.py +++ b/parastell/invessel_build.py @@ -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( diff --git a/parastell/nwl_utils.py b/parastell/nwl_utils.py index 6660711..44f1162 100644 --- a/parastell/nwl_utils.py +++ b/parastell/nwl_utils.py @@ -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 @@ -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