magneticalc.Parameters.Parameters

# ``magneticalc`.`Parameters`.`Parameters``

class documentation

`class Parameters(Validatable):`

Constructor: `Parameters()`

View In Hierarchy

Parameters class.

Method | `__init__` | Initializes parameters class.
Method | `recalculate` | Recalculates parameters.
Method | `set` | Sets the parameters
Property | `energy` | Returns calculated energy.
Property | `magnetic_dipole_moment` | Returns calculated magnetic dipole moment.
Property | `self_inductance` | Returns calculated self-inductance.
Static Method | `_get_magnetic_dipole_moment_worker` | Returns the (unscaled) magnetic dipole moment vector.
Static Method | `_get_squared_field_worker` | Returns the "squared" field scalar.
Method | `_get_magnetic_dipole_moment` | Returns the magnetic dipole moment scalar.
Method | `_get_squared_field` | Returns the "squared" field scalar.
Instance Variable | `_energy` | Undocumented
Instance Variable | `_magnetic_dipole_moment` | Undocumented
Instance Variable | `_self_inductance` | Undocumented

Inherited from `Validatable`:

Method | `valid.setter` | No summary
Property | `valid` | True if valid, False if invalid
Instance Variable | `_valid` | Undocumented

def __init__(self):
overrides `magneticalc.Validatable.Validatable.__init__`

Initializes parameters class.

@validator
def recalculate(self, wire: `Wire`, sampling_volume: `SamplingVolume`, field: `Field`, progress_callback: `Callable`) -> `bool`:

Recalculates parameters.

Parameters
wire: `Wire` | Wire
sampling_volume: `SamplingVolume` | SamplingVolume
field: `Field` | Field
progress_callback: `Callable` | Progress callback

Returns
`bool` | True (currently non-interruptable)

def set(self, *args, **kwargs):

Sets the parameters

@property
@require_valid
energy: `float` =

Returns calculated energy.

@property
@require_valid
magnetic_dipole_moment: `float` =

Returns calculated magnetic dipole moment.

@property
@require_valid
self_inductance: `float` =

Returns calculated self-inductance.

@staticmethod
@ConditionalDecorator(get_jit_enabled(), jit, nopython=True, parallel=True)
def _get_magnetic_dipole_moment_worker(elements_center: `np.ndarray`, elements_direction: `np.ndarray`, length_scale: `float`):

Returns the (unscaled) magnetic dipole moment vector.

Parameters
elements_center: `np.ndarray` | Current element centers
elements_direction: `np.ndarray` | Current element directions
length_scale: `float` | Length scale (m)

Returns
Magnetic dipole moment vector

@staticmethod
@ConditionalDecorator(get_jit_enabled(), jit, nopython=True, parallel=True)
def _get_squared_field_worker(sampling_volume_permeabilities: `np.ndarray`, field_vectors: `np.ndarray`) -> `float`:

Returns the "squared" field scalar.

Parameters
sampling_volume_permeabilities: `np.ndarray` | Ordered list of sampling volume's relative permeabilities µ_r
field_vectors: `np.ndarray` | Ordered list of 3D vectors (B-field)

Returns
`float` | Float

def _get_magnetic_dipole_moment(self, wire: `Wire`, length_scale: `float`) -> `float`:

Returns the magnetic dipole moment scalar.

Parameters
wire: `Wire` | Wire
length_scale: `float` | Length scale (m)

Returns
`float` | Float

def _get_squared_field(self, sampling_volume: `SamplingVolume`, field: `Field`) -> `float`:

Returns the "squared" field scalar.

Parameters
sampling_volume: `SamplingVolume` | SamplingVolume
field: `Field` | B-field

Returns
`float` | Float

_energy: `float` =

Undocumented

_magnetic_dipole_moment: `float` =

Undocumented

_self_inductance: `float` =

Undocumented