vmec_jax.modes

Mode tables matching VMEC’s conventions.

VMEC uses a slightly special convention: - m ranges from 0..mpol-1 (mpol1), but many arrays allocate up to mpol (mpol) - n ranges from -ntor..ntor, except for m=0 where negative n are omitted - VMEC internally uses the field-period toroidal angle zeta in [0,2pi) and stores xn = n*nfp

For the JAX port we keep explicit (m, n) pairs and apply nfp scaling when needed (e.g. physical toroidal derivatives).

Functions

default_grid_sizes(mpol, ntor[, ntheta, nzeta])

Match VMEC defaults in initialize_vmec_arrays.f.

nyquist_mode_table(mpol, ntor)

nyquist_mode_table_from_grid(*, mpol, ntor, ...)

Create a VMEC-style Nyquist mode table using the angular grid sizes.

vmec_mode_table(mpol, ntor)

Create VMEC-like (m,n) pairs.

Classes

ModeTable(m, n)