pyoculus.toybox.cylindrical_toybox.psitob

pyoculus.toybox.cylindrical_toybox.psitob(f)

Decorator to calculate the contribution of a \(\psi\) function to a \(B\) field using the relation \(B = \nabla \times A\), with \(A_\phi \textbf{e}_\phi = \psi / r \textbf{e}_\phi\), where \(g(\textbf{e}_\phi, \textbf{e}_\phi) = 1\).

Parameters:

f (function) – Function that returns the \(\psi\) field. The function must take the position vector \(\textbf{r}\) as first argument.

Returns:

Function that returns the \(B\) field.

Return type:

function