vmec_jax.fourier¶
Helical Fourier basis utilities.
VMEC represents surfaces using Fourier series in the helical phase:
phase = m*theta - n*zeta
where zeta is the field-period toroidal angle (one field period spans
[0, 2π)).
This module provides:
basis matrices (cos/sin of phase) for a set of (m,n) modes,
evaluation of a scalar field from (cos, sin) Fourier coefficients,
evaluation of angular derivatives, including the physical-toroidal derivative that includes the NFP scaling used in VMEC.
All functions are backend-agnostic: they use jax.numpy if available,
otherwise NumPy.
Functions
|
Precompute cos/sin(phase) tensors. |
|
Project a real-space field f(theta,zeta) onto the helical Fourier basis. |
|