hybrid_jp.dtypes module#
Base data types for the hybrid_jp.
- class hybrid_jp.dtypes.BaseContainer(*args, **kwargs)[source]#
Bases:
ProtocolBase container for parameters.
- property all: dict[str, numpy.ndarray[Any, numpy.dtype[numpy.float64]]]#
Return all parameters as a dict.
- is_2d() bool[source]#
Check if all components are 2D arrays.
- Returns:
True if all components are 2D arrays.
- Return type:
bool
- mean_over_axis(axis: int) BaseChild[source]#
Take the mean over the specified axis in a 2d array.
axis=0: mean over x axis=1: mean over y
- Parameters:
axis (int) – Axis to take the mean over.
- Raises:
ValueError – All components must be 2D arrays.
- class hybrid_jp.dtypes.Current(jx: ndarray[Any, dtype[float64]], jy: ndarray[Any, dtype[float64]], jz: ndarray[Any, dtype[float64]])[source]#
Bases:
BaseContainerCurrent components.
- property all: dict[str, numpy.ndarray[Any, numpy.dtype[numpy.float64]]]#
All currents.
- Returns:
‘jx’|’jy’|’jz’, (x, y)
- Return type:
dict[str, arrf]
- jx: ndarray[Any, dtype[float64]]#
- jy: ndarray[Any, dtype[float64]]#
- jz: ndarray[Any, dtype[float64]]#
- class hybrid_jp.dtypes.Elec(ex: ndarray, ey: ndarray, ez: ndarray)[source]#
Bases:
BaseContainerElectric field components.
- Parameters:
ex (np.ndarray) – x component of electric field.
ey (np.ndarray) – y component of electric field.
ez (np.ndarray) – z component of electric field.
- property all: dict[str, numpy.ndarray[Any, numpy.dtype[numpy.float64]]]#
All parameters as a dict.
- ex: ndarray#
- ey: ndarray#
- ez: ndarray#
- class hybrid_jp.dtypes.Grid(x: ndarray, y: ndarray)[source]#
Bases:
BaseContainerSimulation grid.
Note
Can be either edges or midpoints.
- Parameters:
x (np.ndarray) – x grid.
y (np.ndarray) – y grid.
- property all: dict[str, numpy.ndarray[Any, numpy.dtype[numpy.float64]]]#
All parameters as a dict.
- property shape: tuple[int, int]#
Shape of the grid (nx, ny).
- x: ndarray#
- y: ndarray#
- class hybrid_jp.dtypes.Mag(bx: ndarray, by: ndarray, bz: ndarray)[source]#
Bases:
BaseContainerMagnetic field components.
- Parameters:
bx (np.ndarray) – x component of magnetic field.
by (np.ndarray) – y component of magnetic field.
bz (np.ndarray) – z component of magnetic field.
- property all: dict[str, numpy.ndarray[Any, numpy.dtype[numpy.float64]]]#
All parameters as a dict.
- bx: ndarray#
- by: ndarray#
- bz: ndarray#