StaticField

class StaticField(strengths=None)

Represent a static magnetic field.

Initialize the static magnetic field.

Parameters:

strengths (List[float] | None) – Strengths of the components (in \(\text{T}\), defaults to zero vector).

Hint

Strengths of the components can be set at initialization:

static_field = StaticField([0, 0.001, 0.01])

Or it can be set after initialization:

static_field = StaticField()
static_field.vec = [0, 0.001, 0.01]

Or components can be set one-by-one:

static_field = StaticField()
static_field.y = 0.001
static_field.z = 0.01

Attributes

vec

Vector corresponding the static magnetic field.

x

The \(x\) components of the static magnetic field.

y

The \(y\) components of the static magnetic field.

z

The \(z\) components of the static magnetic field.