desc.coils.CoilSet.compute_magnetic_field

CoilSet.compute_magnetic_field(coords, params=None, basis='rpz', source_grid=None)Source

Compute magnetic field at a set of points.

Parameters:
  • coords (array-like shape(n,3)) – Nodes to evaluate field at in [R,phi,Z] or [X,Y,Z] coordinates.

  • params (dict or array-like of dict, optional) – Parameters to pass to coils, either the same for all coils or one for each.

  • basis ({"rpz", "xyz"}) – Basis for input coordinates and returned magnetic field.

  • source_grid (Grid, int or None, optional) – Grid used to discretize coils. If an integer, uses that many equally spaced points. Should NOT include endpoint at 2pi.

Returns:

field (ndarray, shape(n,3)) – Magnetic field at specified nodes, in [R,phi,Z] or [X,Y,Z] coordinates.