desc.equilibrium.Equilibrium.compute_theta_coords
- Equilibrium.compute_theta_coords(flux_coords, L_lmn=None, tol=1e-06, maxiter=20, full_output=False, **kwargs)Source
Find θ (theta_DESC) for given straight field line ϑ (theta_PEST).
- Parameters:
flux_coords (ndarray) – Shape (k, 3). Straight field line PEST coordinates [ρ, ϑ, ϕ]. Assumes ζ = ϕ. Each row is a different point in space.
L_lmn (ndarray) – Spectral coefficients for lambda. Defaults to
eq.L_lmn.tol (float) – Stopping tolerance.
maxiter (int) – Maximum number of Newton iterations.
full_output (bool, optional) – If True, also return a tuple where the first element is the residual from the root finding and the second is the number of iterations.
kwargs (dict, optional) – Additional keyword arguments to pass to
root_scalarsuch asmaxiter_ls,alpha.
- Returns:
coords (ndarray) – Shape (k, 3). DESC computational coordinates [ρ, θ, ζ].
info (tuple) – 2 element tuple containing residuals and number of iterations for each point. Only returned if
full_outputis True.