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.3.0.tar.gz (62.0 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.3.0-py3-none-any.whl (49.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: booz_xform_jax-0.3.0.tar.gz
  • Upload date:
  • Size: 62.0 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.3.0.tar.gz
Algorithm Hash digest
SHA256 c1225ce8a413544269c44d0c3ac2db0bf6e7853c2c44b5591597ccda07dac19a
MD5 1784faaf2aeb9cf2d489e7015b85c936
BLAKE2b-256 b3143e805dac1437fc132cdb20e59bb2a08e7871bb9645264407a2e661761cca

See more details on using hashes here.

Provenance

The following attestation bundles were made for booz_xform_jax-0.3.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.3.0-py3-none-any.whl.

File metadata

  • Download URL: booz_xform_jax-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 49.6 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3113bfaa949554da0fe160bc7507559aa35e92d1d3b979939eb6446d925703c3
MD5 04d17315344aff415d43c73f5039709d
BLAKE2b-256 381319a7d1c517c8d25e08139c39bf1e773fdbd5cf2234d2e66fbe1caed1870b

See more details on using hashes here.

Provenance

The following attestation bundles were made for booz_xform_jax-0.3.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

This release

0.3.0 This release

2 files

0.2.0

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