desc.integrals.Bounce2D.angle

static Bounce2D.angle(eq, X=16, Y=32, rho=Array([1.], dtype=float64), iota=None, params=None, profiles=None, tol=1e-08, maxiter=30, **kwargs)Source

Return the angle for mapping boundary coordinates to field line coordinates.

Parameters:
  • eq (Equilibrium) – Equilibrium to use defining the coordinate mapping.

  • X (int) – Poloidal Fourier grid resolution to interpolate the angle. Preferably rounded down to power of 2.

  • Y (int) – Toroidal Chebyshev grid resolution over a single field period to interpolate the angle. Preferably rounded down to power of 2.

  • rho (float or jnp.ndarray) – Shape (num ρ, ). Flux surfaces labels in [0, 1] on which to compute.

  • iota (float or jnp.ndarray) – Shape (num ρ, ). Optional, rotational transform on the flux surfaces to compute on.

  • params (dict[str,jnp.ndarray]) – Parameters from the equilibrium, such as R_lmn, Z_lmn, i_l, p_l, etc. Defaults to eq.params_dict.

  • profiles – Optional profiles.

  • tol (float) – Stopping tolerance for root finding. Default is 1e-8.

  • maxiter (int) – Maximum number of Newton iterations.

Returns:

angle (jnp.ndarray) – Shape (num ρ, X, Y). Angle that maps boundary coordinates to field line coordinates.