pleiades.Device

class pleiades.Device(**kwargs)[source]

A container for a full configuration of magnets for an experiment

Parameters:

**kwargs – Any valid argument for FieldsOperator

Variables:
  • current_sets (iterable) – List of CurrentFilamentSet objects
  • R (np.array) – The R locations of the mesh
  • Z (np.array) – The Z locations of the mesh
  • patches (list) – A list of patch objects for the configuration
  • patch_coll (matplotlib.patches.PatchCollection) – A patch collection for easier adding to matplotlib axes
BR(current=None, mesh=None)

Compute the radial component of the magnetic field, BR.

Parameters:current (float, optional) – Specify a current value to override the current attribute for calculating the field. Defaults to None, which causes the current attribute to be used for the calculation
Returns:BR
Return type:np.array
BZ(current=None, mesh=None)

Compute the z component of the magnetic field, BZ.

Parameters:current (float, optional) – Specify a current value to override the current attribute for calculating the field. Defaults to None, which causes the current attribute to be used for the calculation
Returns:BZ
Return type:np.array
gBR(mesh=None)

Compute the Green’s function for the radial magnetic field, BR

Parameters:mesh (ndarray, optional) – An Nx2 array of points representing (R, Z) coordinates at which to calculate BR. Defaults to None, in which case the CurrentFilamentSet.mesh attribute is used.
Returns:gBR – 1D array representing the Green’s function for BR and whose size is equal to the number of mesh.
Return type:ndarray
gBZ(mesh=None)

Compute the Green’s function for the vertical magnetic field, BZ

Parameters:mesh (ndarray, optional) – An Nx2 array of points representing (R, Z) coordinates at which to calculate BZ. Defaults to None, in which case the CurrentFilamentSet.mesh attribute is used.
Returns:gBZ – 1D array representing the Green’s function for BZ and whose size is equal to the number of mesh.
Return type:ndarray
gpsi(mesh=None)

Compute the Green’s function for magnetic flux, \(psi\).

Parameters:mesh (ndarray, optional) – An Nx2 array of points representing (R, Z) coordinates at which to calculate the magnetic flux. Defaults to None, in which case the CurrentFilamentSet.mesh attribute is used.
Returns:gpsi – 1D array representing the Green’s function for flux and whose size is equal to the number of mesh.
Return type:ndarray
psi(current=None, mesh=None)

Compute the magnetic flux, \(psi\).

Parameters:
  • current (float, optional) – Specify a current value in amps to use instead of CurrentFilamentSet.current. Defaults to None, in which case the current attribute is used to calculate the flux.
  • mesh (ndarray, optional) – An Nx2 array of points representing (R, Z) coordinates at which to calculate the magnetic flux. Defaults to None, in which case the CurrentFilamentSet.mesh attribute is used.
Returns:

psi

Return type:

ndarray