vmec_jax.robust_coilsΒΆ

Pure-JAX utilities for deterministic robust-coil perturbation studies.

These helpers operate on direct-coil CoilFieldParams pytrees without depending on ESSOS or the free-boundary solver. Full VMEC free-boundary solves are not yet guaranteed to be batch-transformable, so callers can use these samples with jax.vmap for transformable objectives or a Python loop around non-transformable solver calls.

Functions

aggregate_risk(values[, method, axis, ...])

Aggregate scenario losses with smooth robust-risk choices.

displace_curve_dofs(base_curve_dofs, ...)

Rigidly translate Fourier centerline coefficients by displacement_xyz.

identity_coil_perturbation(params)

Return a perturbation sample that leaves params unchanged.

perturb_centerline_dofs(base_curve_dofs, ...)

Add a deterministic Fourier-coefficient perturbation to coil centerlines.

perturb_coil_params(params, sample)

Return perturbed direct-coil parameters without mutating params.

perturb_currents(base_currents, current_factors)

Apply deterministic multiplicative current perturbations.

rotate_curve_dofs_about_z(base_curve_dofs, ...)

Rotate all Cartesian Fourier coefficient vectors around the z axis.

sample_coil_perturbation(key, params, *[, ...])

Draw one deterministic Gaussian perturbation sample from a PRNG key.

sample_coil_perturbations(key, params, ...)

Draw a batch of deterministic Gaussian coil perturbation samples.