pyoculus.fields.magnetic_field
magnetic_field.py
This module contains the abstract class for magnetic fields.
- authors:
Zhisong Qu (zhisong.qu@anu.edu.au)
Ludovic Rais (ludovic.rais@epfl.ch)
- class pyoculus.fields.magnetic_field.MagneticField
- abstractmethod B(coords, *args)
Returns the contravariant magnetic fields at the given coordinates.
- Parameters:
coords (array) – The coordinates at which to calculate the magnetic fields.
*args – Additional parameters.
- abstractmethod dBdX(coords, *args)
Returns the contravariant components of the magnetic fields and their derivatives at the given coordinates.
- Parameters:
coords (array) – The coordinates at which to calculate the magnetic fields and their derivatives.
*args – Additional parameters.
- Returns:
The contravariant components of the magnetic field array: The contravariant components of the derivative of the magnetic fields
- Return type:
array
- abstractmethod A(coords, *args)
Returns the contravariant components of the vector potential at given coordinates.
- Parameters:
coords (array) – The coordinates at which to calculate the vector potential.
*args – Additional parameters.
- B_many(x1arr, x2arr, x3arr, input1D=True, *args)
Returns the contravariant magnetic fields at multiple coordinates.
- Parameters:
x1arr (arrays) – The coordinates at which to calculate the magnetic fields.
x2arr (arrays) – The coordinates at which to calculate the magnetic fields.
x3arr (arrays) – The coordinates at which to calculate the magnetic fields.
input1D (bool, optional) – If False, create a meshgrid with x1arr, x2arr and x3arr. If True, treat them as a list of points.
*args – Additional parameters.
- dBdX_many(x1arr, x2arr, x3arr, input1D=True, *args)
Returns the contravariant magnetic fields and their derivatives at multiple coordinates.
- Parameters:
x1arr (arrays) – The coordinates at which to calculate the magnetic fields and their derivatives.
x2arr (arrays) – The coordinates at which to calculate the magnetic fields and their derivatives.
x3arr (arrays) – The coordinates at which to calculate the magnetic fields and their derivatives.
input1D (bool, optional) – If False, create a meshgrid with x1arr, x2arr and x3arr. If True, treat them as a list of points.
*args – Additional parameters.
- A_many(x1arr, x2arr, x3arr, input1D=True, *args)
Returns the contravariant vector potential at multiple coordinates.
- Parameters:
x1arr (arrays) – The coordinates at which to calculate the vector potential.
x2arr (arrays) – The coordinates at which to calculate the vector potential.
x3arr (arrays) – The coordinates at which to calculate the vector potential.
input1D (bool, optional) – If False, create a meshgrid with x1arr, x2arr and x3arr. If True, treat them as a list of points.
*args – Additional parameters.