desc.equilibrium.Equilibrium.to_sfl

Equilibrium.to_sfl(L=None, M=None, N=None, L_grid=None, M_grid=None, N_grid=None, rcond=None, copy=False, tol=1e-09, maxiter=30)Source

Transform this equilibrium to use straight field line PEST coordinates.

Uses a least squares fit to find FourierZernike coefficients of R, Z, Rb, Zb with respect to the straight field line coordinates, rather than the boundary coordinates. The new lambda value will be zero.

The flux surfaces of the returned equilibrium usually differ from the original by 1% when the default resolution parameters are used.

Parameters:
  • L (int, optional) – Radial resolution to use for SFL equilibrium. Default is 3*eq.L.

  • M (int, optional) – Poloidal resolution to use for SFL equilibrium. Default is 4*eq.M.

  • N (int, optional) – toroidal resolution to use for SFL equilibrium. Default is 3*eq.N.

  • L_grid (int, optional) – Radial grid resolution to use for fit to Zernike series. Default is 1.5*L.

  • M_grid (int, optional) – Poloidal grid resolution to use for fit to Zernike series. Default is 1.5*M.

  • N_grid (int, optional) – Toroidal grid resolution to use for fit to Fourier series. Default is N.

  • rcond (float, optional) – Cutoff for small singular values in the least squares fit.

  • copy (bool, optional) – Whether to update the existing equilibrium or make a copy (Default).

  • tol (float) – Tolerance for coordinate mapping. Default is 1e-9.

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

Returns:

eq_PEST (Equilibrium) – Equilibrium transformed to a straight field line coordinate representation.