Skip to content

Helper types

dexter.MagneticFlux()

Helper type to define the magnetic flux $\psi_t$ or $\psi_p$.

This type is instantiated through the Toroidal and Poloidal class methods.

Attributes:

  • value (float) –

    The MagneticFlux' value, regardless of its kind.

  • kind (MagneticFluxKind) –

    The MagneticFlux' kind.

Toroidal(value: float) -> MagneticFlux classmethod

Defines a toroidal magnetic flux $\psi_t$.

Parameters:

  • value (float) –

    The value of the toroidal magnetic flux.

Example
Toroidal MagneticFlux creation
>>> psit = dex.MagneticFlux.Toroidal(0.05)

Poloidal(value: float) -> MagneticFlux classmethod

Defines a poloidal magnetic flux $\psi_p$.

Parameters:

  • value (float) –

    The value of the poloidal magnetic flux.

Example
Poloidal MagneticFlux creation
>>> psip = dex.MagneticFlux.Poloidal(0.04)

__eq__(other: object) -> bool

Returns true if both kind and value of other are equal to self.

dexter.MagneticFluxArray()

A container of multiple magnetic flux values and their kind.

This type is instantiated through the Toroidal and Poloidal class methods.

Attributes:

  • values (Array1) –

    The contained values as a 1D Array.

  • kind (MagneticFluxKind) –

    The magnetic flux' kind.

Toroidal(array: ArrayLike) -> MagneticFluxArray classmethod

Defines an array of toroidal fluxes $\psi_t$.

Parameters:

  • array (ArrayLike) –

    The values of the toroidal magnetic fluxes.

Example
Toroidal MagneticFluxArray creation
>>> psit_array = dex.MagneticFluxArray.Toroidal(np.linspace(0, 0.05, 30))

Poloidal(array: ArrayLike) -> MagneticFluxArray classmethod

Defines an array of poloidal fluxes $\psi_p$.

Parameters:

  • array (ArrayLike) –

    The values of the poloidal magnetic fluxes.

Example
Poloidal MagneticFluxArray creation
>>> psip_array = dex.MagneticFluxArray.Poloidal([0.1, 0.2, 0.3])

__len__() -> int

Returns the number of contained values.

__getitem__(index: int) -> MagneticFlux

Returns a MagneticFlux of the same kind and value of self.values[index].