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:
  • eq (Equilibrium) – Equilibrium to use

  • flux_coords (ndarray, shape(k,3)) – 2d array of flux coordinates [rho,theta*,zeta]. 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 > 0) – 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_scalar such as maxiter_ls, alpha.

Returns:

  • coords (ndarray, shape(k,3)) – coordinates [rho,theta,zeta].

  • info (tuple) – 2 element tuple containing residuals and number of iterations for each point. Only returned if full_output is True