cherab.imas.math.functions.fourier_bezier.py_fourier_modeΒΆ
-
cherab.imas.math.functions.fourier_bezier.py_fourier_mode(phi, index, periodicity=
1) floatΒΆ Calculate the value of a Fourier mode at a given angle \(\varphi\).
Note
This is the python wrapper for the Cython function
fourier_mode(). If you are using this function in a loop, consider using the Cython function directly.Fourier modes \(Z_l(\varphi)\) corresponding to the different mode indices \(l\) with \(n_\mathrm{p}\) as periodicity of the simulation are defined as:
\[\begin{split}Z_l(\varphi) = \begin{cases} 1 & \text{if } l = 0, \\ \sin\left(\displaystyle\frac{l}{2}n_\mathrm{p} \varphi\right) & \text{if } l \text{ is even}, \\ \cos\left(\displaystyle\frac{l + 1}{2}n_\mathrm{p} \varphi\right) & \text{if } l \text{ is odd}. \end{cases}\end{split}\]- Parameters:
- Returns:
float β Value of the Fourier mode at the given angle \(\varphi\).