Skip to main content

booz_xform_jax

Install from PyPI:

pip install booz_xform_jax

booz_xform_jax is a JAX-native implementation of the Boozer coordinate transformation for VMEC equilibria. It reads VMEC wout data, computes Boozer Fourier spectra, writes boozmn NetCDF files, exposes a differentiable Python API, and provides a legacy-compatible command line interface matching xbooz_xform workflows.

Quickstart

Install directly from PyPI:

pip install booz_xform_jax

Install from a clone in editable mode when you want to modify the code:

git clone https://github.com/uwplasma/booz_xform_jax
cd booz_xform_jax
python -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .

The package installs these entry points:

booz_xform_jax
xbooz_xform
xbooz_xform_jax

CLI usage with a standard STELLOPT-style input file:

booz_xform_jax in_booz.mycase F

or, from a source checkout, using a bundled regression case:

booz_xform_jax tests/test_files/booz_in.circular_tokamak F

Python API usage:

from booz_xform_jax import Booz_xform

bx = Booz_xform()
bx.read_wout("wout_mycase.nc", flux=True)
bx.register_surfaces([0.25, 0.5, 0.75])
bx.run()
bx.write_boozmn("boozmn_mycase.nc")

The runtime dependencies installed from PyPI already include jax, jaxlib, netCDF4, scipy, numpy, matplotlib, and plotly, so the CLI and the NetCDF readers/writers work after a normal pip install.

Documentation

The full documentation now lives in the docs/ tree:

Performance Snapshot

The plots below compare booz_xform_jax and the reference xbooz_xform on a set of bundled VMEC cases.

Case booz_xform_jax xbooz_xform Speedup
Tokamak (small, ns=16) 0.007 s 0.001 s 0.2x
li383 stellarator (ns=48) 0.032 s 0.428 s 14x
LSP stellarator (ns=99) 0.040 s 1.710 s 42x
HSX (large, ns=300) 0.627 s 89.9 s 143x

Reproduce the README comparison assets with:

python tools/readme_compare.py

Project Scope

  • The legacy BOOZ_XFORM input format, surface-selection conventions, and boozmn output structure are supported so existing workflows transfer cleanly.
  • The numerical core is written in JAX and keeps the transform differentiable.
  • The package includes both the object-oriented Booz_xform interface and a lower-level functional API in booz_xform_jax.jax_api.
  • More technical background, equations, derivations, numerics, and source references have been moved from the README into the documentation.

Citation

If you use this package, cite the original Boozer-coordinate and BOOZ_XFORM literature listed in docs/citations.rst, together with this repository.

License

MIT. See LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

booz_xform_jax-0.2.0.tar.gz (60.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

booz_xform_jax-0.2.0-py3-none-any.whl (48.7 kB view details)

Uploaded Python 3

File details

Details for the file booz_xform_jax-0.2.0.tar.gz.

File metadata

  • Download URL: booz_xform_jax-0.2.0.tar.gz
  • Upload date:
  • Size: 60.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for booz_xform_jax-0.2.0.tar.gz
Algorithm Hash digest
SHA256 b7d8c86c3dbef0cdfc5c9954cb1f13f99f7da93e6d7945cc76fd4cd55b3a5b98
MD5 29ff411b5e055ddd085f56e3c03b18f0
BLAKE2b-256 a26e4231dd7d3ebce6be4122c8c179726cf629399cc80ddba4dda1754850b18f

See more details on using hashes here.

Provenance

The following attestation bundles were made for booz_xform_jax-0.2.0.tar.gz:

Publisher: publish-pypi.yml on uwplasma/booz_xform_jax

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file booz_xform_jax-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: booz_xform_jax-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 48.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for booz_xform_jax-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35bc11b53076a9c31450cdaa0cb856bbb9c251748e7b8af618fd561f06bd7273
MD5 9309a31b0cd0d7d926624cf97367ffbb
BLAKE2b-256 f4cfa227ae9e5d7ddf2628966bbd8b2c77ac89ce6b9a78bce3ad9ef01d97c9ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for booz_xform_jax-0.2.0-py3-none-any.whl:

Publisher: publish-pypi.yml on uwplasma/booz_xform_jax

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.3.0

2 files

This release

0.2.0 This release

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page