desc.coils.CoilSet.compute_magnetic_field

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

Compute magnetic field at a set of points.

Parameters:
  • coords (array-like shape(n,3) or Grid) – coordinates to evaluate field at [R,phi,Z] or [x,y,z]

  • params (dict or array-like of dict, optional) – parameters to pass to curves, either the same for all curves, or one for each member

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

  • grid (Grid, int or None or array-like, optional) – Grid used to discretize coil, the same for all coils. If an integer, uses that many equally spaced points.

Returns:

field (ndarray, shape(n,3)) – magnetic field at specified points, in either rpz or xyz coordinates