pleiades.Component¶
-
class
pleiades.Component[source]¶ A Container for representing multiple sets of objects and assigning a Green’s function to the object. Components are like HH coils or Mirror Coils or Vessel Magnets. This is the minimum scale that has its own Green’s function - one for each group.
Variables: - groups (list) – A list of all the groups that comprise this Component
- labels (list of str) – A list of all the names for the groups that comprise this Component. Each label is also accessible as an attribute on the Component as well.
- num_groups (int) – Number of groups that make up the Component
- currents (list of float) – A list of currents representing the current in each group in the Component
- nprocs (int) – The number of processors to use to compute the Green’s functions
- patches (list of matplotlib.patches.Patch objects) – A list of all the patches that represent the Component
- patch_mask (iterable of bool) – A list of booleans of the same length as the number of groups where True indicates to hide the patch for that particular group.
- grid (pleiades.Grid instance) – A grid on which to compute the Green’s functions for flux and magnetic fields
- gpsi (np.array) – Green’s function for magnetic flux psi
- gBR (np.array) – Green’s function for magnetic field component BR
- gBZ (np.array) – Green’s function for magnetic field component BZ
- psi (np.array) – Magnetic flux evaluated on the grid
- BR (np.array) – Magnetic field component BR evaluated on the grid
- BZ (np.array) – Magnetic field component BZ evaluated on the grid
-
classmethod
from_dict(cls_dict)[source]¶ Create Component from a dictionary
Parameters: cls_dict (dict) – The dictionary from which to construct a Component.
-
plot(ax, *args, **kwargs)[source]¶ Plot each group including patches for all the objects in the Component
Parameters: ax (matplotlib.Axes object) – The axis on which to plot the current location