desc.magnetic_fields.OmnigenousField.compute

OmnigenousField.compute(names, grid=None, params=None, transforms=None, profiles=None, data=None, **kwargs)Source

Compute the quantity given by name on grid.

Parameters:
  • names (str or array-like of str) – Name(s) of the quantity(s) to compute.

  • grid (Grid, optional) – Grid of coordinates to evaluate at. The grid nodes are given in the usual (ρ,θ,ζ) coordinates, but θ is mapped to η and ζ is mapped to α. Defaults to a linearly space grid on the rho=1 surface.

  • params (dict of ndarray) – Parameters from the equilibrium, such as R_lmn, Z_lmn, i_l, p_l, etc Defaults to attributes of self.

  • transforms (dict of Transform) – Transforms for R, Z, lambda, etc. Default is to build from grid

  • profiles (dict of Profile) – Profile objects for pressure, iota, current, etc. Defaults to attributes of self

  • data (dict of ndarray) – Data computed so far, generally output from other compute functions

  • **kwargs (dict, optional) –

    Valid keyword arguments are:

    • iota: rotational transform

    • helicity: helicity (defaults to self.helicity)

Returns:

data (dict of ndarray) – Computed quantity and intermediate variables.