Skip to main content

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.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for laue-jax 0.1.0
File Size Uploaded
laue_jax-0.1.0.tar.gz 13.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for laue-jax 0.1.0
File Interpreter ABI Platform
laue_jax-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.3 kB

Release files / laue_jax-0.1.0.tar.gz

Download URL laue_jax-0.1.0.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8e0fb3ece1e3afde47efa4270226022f6c2d9a9c0c856f8f073c68a2c832b833
BLAKE2b-256 checksum
How to use checksums
ccdaa78b6fe9495bd208c743e962e8440e9d93ed2bbd15d5d1a15b55db471017
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 Aug 28, 2026.

Transparency log

Release files / laue_jax-0.1.0-py3-none-any.whl

Download URL laue_jax-0.1.0-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a9bc840746f9965a41716e0303815f85a2e8f3f04d20119022c9a514b8191708
BLAKE2b-256 checksum
How to use checksums
80d034f6cc1528cebd865393613784fc49d88cc62cc1dbefd3fbdc942e5390b4
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 Aug 28, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release 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