jax_sbgeom.coils.discrete_coil module
- class DiscreteCoil(positions: Array, _centre_i: Array)[source]
Bases:
CoilClass representing a coil defined by discrete positions and a centre. This centre is precomputed from the given positions. It does not feature in the computation of the coil positions; only the centre.
- positions: Array
- classmethod from_positions(positions: Array)[source]
Create a DiscreteCoil from discrete positions
Positions are assumed to be non-periodic (in other words, the first and last point are not equal).
- Parameters:
positions (
Array) – Cartesian positions of discrete coil points […, 3]- Returns:
DiscreteCoil object
- Return type:
- position(s)[source]
Position along the coil as a function of arc length
- Parameters:
s (jnp.ndarray) – Arc length(s) along the coil
- Returns:
Cartesian position(s) along the coil
- Return type:
jnp.ndarray
- tangent(s)[source]
Tangent vector along the coil as a function of arc length
- Parameters:
s (jnp.ndarray) – Arc length(s) along the coil
- Returns:
Tangent vector(s) along the coil
- Return type:
jnp.ndarray