pyoculus.maps.toroidal_bfield_section

class pyoculus.maps.toroidal_bfield_section.ToroidalBfieldSection(toroidalbfield: ToroidalBfield, phi0=0.0, **kwargs)

Class that sets up a Map given by following the a magnetic field in toroidal system \((s, \theta, \zeta)\).

f(t, y0)

Returns:

df(t, y0)

Computes the Jacobian matrix of the map at \(y_0\) after \(t\) applications \(df^t = (\frac{\partial f^t}{\partial x})_{i,j}\).

The

\[\begin{split}J_f(x) = \begin{bmatrix} \partial_{x^1}f^1 & \cdots & \partial_{x^n}f^1 \\ \vdots & \ddots & \vdots \\ \partial_{x^1}f^n & \cdots & \partial_{x^n}f^n \end{bmatrix}\end{split}\]
Parameters:
  • t (float or int) – The number of times the map is applied.

  • y0 (array) – The point in phase space where the Jacobian is computed.

lagrangian(y0, t)

Calculates the Lagrangian at a given point or the difference in Lagrangian between two points. The Lagrangian is as defined in the paper by Meiss (https://doi.org/10.1063/1.4915831).

Parameters:
  • y0 (array) – The point at which to calculate the Lagrangian.

  • t (int or float, optional) – The number of times the map is applied from \(y_0\).

Returns:

Lagrangian at \(y_0\), or the difference in Lagrangian between \(y_1 = f^t(y_0)\) and \(y_0\): \((\mathcal{L}(y_1)-\mathcal{L}(y_0))\) if \(t\) is provided.

Return type:

float

winding(t, y0, y1=None)

Calculates how much the point \(y_0\) winds around the point \(y_1\) after applying the map \(t\) times.

Parameters:
  • t (float or int) – The number of times the map is applied.

  • y0 (array) – The initial point in the phase space.

  • y1 (array) – The point around which \(y_0\) winds. If None, the origin should be used.

dwinding(t, y0, y1=None)

Calculates the Jacobian of the winding of \(y_0\) around \(y_1\) after applying the map \(t\) times.

Parameters:
  • t (float or int) – The number of times the map is applied.

  • y0 (array) – The initial point in the phase space.

  • y1 (array) – The point around which \(y_0\) winds. If None, the origin should be used.