This release is a pre-release and may not be stable for production use.
TomoJAX
TomoJAX reconstructs and aligns parallel-beam tomography, laminography, and lab cone-beam CT in JAX with CUDA kernels. It provides differentiable forward projectors with exact transposes, fast analytical and iterative reconstruction (Fourier, FBP/FDK, CGLS, SIRT/OS-SART, MLEM/OSEM, FISTA-TV, SPDHG-TV), joint volume-and-pose alignment, and a CLI for NXtomo, APS Data Exchange, Nikon .xtekct, Zeiss .txrm, ESRF, SkyScan, and TIFF data.
Full documentation is at tomojax.dev. Check the support matrix and known limitations for geometry, format, and solver details.
A 29 mm mechanical watch movement simulated with 600 views of a 120 keV parallel beam in gVXR (independent of TomoJAX's projector), reconstructed with FISTA-TV on 38.5 µm voxels in 50 s on a laptop GPU, and rendered directly in JAX. Reproduce it.
From 200 views at 10⁴ photons per pixel, filtered backprojection through the hairspring has relative error 0.357 against the exact voxel average of the meshes; FISTA-TV reaches 0.124 in 17 s. Reproduce the figure.
tomojax align and tj.align solve the volume and requested geometry corrections jointly. By default they fit per-view translations; add "tilt" and "roll" for shared setup angles, or "rotations" for per-view wobble. See align a scan.
First reconstruction
On Linux, install uv and install the CPU wheel into a fresh environment:
uv venv --python 3.12
uv pip install --python .venv/bin/python "tomojax[cpu]"
.venv/bin/tomojax simulate -o synthetic.nxs --size 32 --n-views 60
.venv/bin/tomojax reconstruct synthetic.nxs -o recon.nxs
.venv/bin/tomojax inspect recon.nxs --preview-dir previews
To try unreleased changes from source, build and install a wheel first, then run the same three commands.
For this axial parallel scan, reconstruct selects the Fourier-slice inverse automatically and writes the volume, geometry, and processing record to recon.nxs (pass --include-scan to keep the projections in the same file). inspect checks the file (Valid: yes) and writes display-scaled central slice PNGs to previews/.
Commands that write data take -o OUTPUT and refuse to overwrite existing files without --force (inspect prints a report and optionally writes PNGs to --preview-dir DIR; simulate takes no input). Run tomojax <command> --help for flags, or see the CLI overview. For CUDA 12 installation see installation; for real data start with the quickstart.
Choose a workflow
| Task | Guide |
|---|---|
| Load, correct, and reconstruct NXtomo, Data Exchange, Nikon, or TIFF scans | Quickstart |
| Supply measured geometry for parallel or laminography scans, including TIFF stacks | Real scan guide |
| Import, calibrate, and reconstruct lab cone-beam CT, including multi-orbit scans | Lab cone-beam CT |
| Simulate data or script the Python API | Synthetic tomography, examples |
| Correct per-view motion, setup angles, or the centre of rotation | Align a scan |
| Reconstruct volumes larger than GPU memory, or use several GPUs | Large scans and several GPUs |
| Check supported formats, models, and limitations | Support matrix, known limitations |
Python API
A Scan bundles projections with their geometry, and every operation returns a result carrying its geometry and processing record:
import tomojax as tj
scan = tj.load("scan.nxs")
recon = tj.reconstruct(scan) # chooses method from geometry
recon = tj.reconstruct(scan, "cgls", iterations=50)
result = tj.align(scan, fit=("translations", "rotations")) # result.scan holds the updated poses
tj.save("recon.nxs", tj.reconstruct(result.scan))
CLI options use the same names: tomojax reconstruct scan.nxs -o recon.nxs --method cgls --iterations 50 and tomojax align scan.nxs -o aligned.nxs --fit translations rotations. Pass method-specific settings via config classes from tomojax.recon (such as FISTAConfig(regularizer="huber_tv")) or a TOML file passed to --config. See align a scan for alignment settings.
Build a scan from arrays with tj.Scan(projections, geometry) and simulate projections with tj.project(geometry, volume). Volumes use (z, y, x) and projections use (view, v, u), with detector and voxel spacings in one consistent length unit. Lower-level interfaces live in tomojax.recon, tomojax.alignment, tomojax.corrections, tomojax.geometry, tomojax.io, tomojax.forward, and tomojax.datasets. Start with examples/simulate_and_reconstruct.py or browse tomojax.dev.
Benchmarks
| Case | TomoJAX | Other tools |
|---|---|---|
| Parallel beam, real: Diamond I12, 1801 views of 64 × 2560 pixels | 0.81 s default, 3.35 s FBP | ASTRA FBP 7.64 s, TomoPy gridrec 2.90 s (CPU) |
| Cone FDK, real: FIPS walnut, 1200 views, 501³ | 1.02 s | ASTRA 1.71 s |
| Cone CGLS, real: FIPS walnut, 10 iterations | 28.2 s, error 0.184 | ASTRA 26.8 s, error 0.197 |
| Laminography CGLS to fixed error, 256³ synthetic (smooth / sharp) | 3.29 / 0.435 s | ASTRA 16.5 / 0.452 s |
| TV reconstruction, 128³ synthetic, 3% noise | 0.32 s, error 0.075 | TIGRE 9.1 s, best error 0.101 |
Warm times on one 8 GB laptop GPU (measured 2026-11-21), with every tool given the same corrected data, geometry, and output grid. ASTRA is faster per CGLS iteration on the walnut, though TomoJAX reaches lower error at 10 iterations. See the headline comparison for full tables and where each library wins.
Volumes larger than GPU memory stream automatically in slabs: SIRT of a whole Diamond I12 scan (1801 views of 2160 × 2560 pixels into a 56.6 GB volume) ran on an 8 GB laptop GPU using 1.4 GB of VRAM at 1.13× the per-voxel time of an in-core scan (large scans).
Development and licence
See CONTRIBUTING.md for development setup, conventions, and test commands, and CHANGELOG.md for release notes.
TomoJAX is licensed under GPL-3.0-only.
Metadata
Release files for tomojax 1.0.0rc1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tomojax-1.0.0rc1.tar.gz | 683.2 kB | With provenance | Details for tomojax-1.0.0rc1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tomojax-1.0.0rc1-py3-none-any.whl | Python 3 | none | any | Details for tomojax-1.0.0rc1-py3-none-any.whl |
Total release size: 1.5 MB
Release files / tomojax-1.0.0rc1.tar.gz
| Download URL | tomojax-1.0.0rc1.tar.gz |
|---|---|
| Size | 683.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0a4ecfc273bd04818b7bd79fe3231ad814a7a40dc6385c3e55f5fbf39799abd7
|
|
BLAKE2b-256 checksum How to use checksums |
ccf8c377f26d33a412b504a72615e90e6d6b299b5a3b149e19c9dc73d1afcc4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logRelease files / tomojax-1.0.0rc1-py3-none-any.whl
| Download URL | tomojax-1.0.0rc1-py3-none-any.whl |
|---|---|
| Size | 803.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c6377711d58433c359d099b8ff3e4233fb495bd508771ab46ff789597cf7011
|
|
BLAKE2b-256 checksum How to use checksums |
ee95bd299a96259675d62ca0cf5ba856eba82ef304124f4d8b69b2ce207aec31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logSecurity for tomojax 1.0.0rc1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for tomojax-1.0.0rc1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.