laue_jax
A differentiable JAX forward projection for white-beam Laue
microdiffraction — a single-framework port of
laue_torch.
Why a second implementation
laue_torch is the reference: it is the one that is parity-tested against the
NumPy/C simulator, and it carries the full inverse pipeline (ODF/SDF recovery,
coded aperture, joint fitting, uncertainty).
laue_jax exists for one reason: so the Laue forward map composes with
JAX-CPFEM inside a single autodiff graph. Bridging two frameworks across
an optimisation loop means either detaching gradients or paying for a custom
VJP at the boundary; porting the forward is cheaper and keeps the graph intact.
It is deliberately a forward model only — geometry, rasterisation and
projection. Everything downstream stays in laue_torch.
Enable float64
The parity target is laue_torch in double precision. JAX defaults to float32,
which will not reproduce it:
import jax
jax.config.update("jax_enable_x64", True)
Install
pip install laue-jax
JAX itself is installed CPU-only by default. For GPU, follow the JAX install guide for your CUDA version — this package does not pin an accelerator build.
Use
import jax
jax.config.update("jax_enable_x64", True)
from laue_jax import laue_forward, quat_to_matrix
# U: orientation, lat: lattice parameters, P/R: detector pose
image = laue_forward(...)
The public surface mirrors laue_torch's geometry and rasterize modules:
quat_to_matrix, rodrigues_to_matrix, sixd_to_matrix, to_rotation_matrix,
reciprocal_matrix, voigt_to_symmetric, deviatoric5_to_symmetric,
strain_to_B, gaussian_splat, hard_window, soft_window,
pseudo_voigt_splat, and laue_forward.
Tests
The suite is a parity test against laue_torch, so it needs both:
pip install -e ".[dev]"
pytest
laue-torch is a dev-only dependency and never a runtime one — keeping this
package's install footprint JAX-only is the point.
License
BSD-3-Clause (UChicago Argonne, LLC) — see LICENSE, as for the rest
of LaueMatching.
Metadata
Release files for laue-jax 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| laue_jax-0.1.2.tar.gz | 17.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| laue_jax-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.2 kB
Release files / laue_jax-0.1.2.tar.gz
| Download URL | laue_jax-0.1.2.tar.gz |
|---|---|
| Size | 17.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2af47156ae3f7a6c89505fe4c575c6e434312313ba0c46ad07ba685a8675bd1f
|
|
BLAKE2b-256 checksum How to use checksums |
b4005600826e041c17d7ef7f35bae7699185ff11c692acb79bf049d6a328a99a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 29, 2026.
Transparency logRelease files / laue_jax-0.1.2-py3-none-any.whl
| Download URL | laue_jax-0.1.2-py3-none-any.whl |
|---|---|
| Size | 12.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
af1e99a98d9b204627cff43d9d722128cfc60cd34ca8d4cd5171c8fc13374fd8
|
|
BLAKE2b-256 checksum How to use checksums |
4e5032f5d8024e2bfbe5375c0129ae67c7f6143ca8a9823f388562380c9cbdae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 29, 2026.
Transparency log