Skip to content

Commit

Permalink
Merge pull request #344 from jons-pf/patch-1
Browse files Browse the repository at this point in the history
[FIX] theta_vmec computation in vmec_fieldlines
  • Loading branch information
landreman authored Jul 18, 2023
2 parents 5fb6831 + 959ea1d commit 38d4f86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/simsopt/mhd/vmec_diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -1306,7 +1306,7 @@ def residual(theta_v, phi0, theta_p_target, jradius):
This function is used for computing an array of values of theta_vmec that
give a desired theta_pest array.
"""
return theta_p_target - (theta_v + np.sum(lmns[js, :, None] * np.sin(xm[:, None] * theta_v - xn[:, None] * phi0), axis=0))
return theta_p_target - (theta_v + np.sum(lmns[jradius, :, None] * np.sin(xm[:, None] * theta_v - xn[:, None] * phi0), axis=0))

theta_vmec = np.zeros((ns, nalpha, nl))
for js in range(ns):
Expand Down

0 comments on commit 38d4f86

Please sign in to comment.