Skip to main content

MRax logo

MRax

DOI

MRax is a JAX-based Python library for quantitative MRI research. It provides data structures for experiments and studies, differentiable signal models, optimization utilities, reconstruction helpers, analysis tools, and ISMRMRD-backed storage for images, k-space, and fitted maps.

Disclaimer: MRax is intended for research use only. This is an early release, and bugs may occur. Coding agents were used to assist in development. Code was manually reviewed and validated on Bruker ParaVision 360 3.6 data.

Installation

Install the release package from PyPI:

pip install mrax

The default install includes fitting, Cartesian reconstruction, import, built-in denoising, registration, analysis, storage, and desktop GUI support. Optional non-Cartesian and external denoising backends are installed explicitly:

pip install "mrax[nufft]"
pip install "mrax[denoise-external]"

jax-finufft does not publish Windows wheels. The upstream bm3d and bm4d packages are licensed for non-commercial use; review their licenses before installing the denoise-external extra. Development, documentation, and notebook authoring tools remain outside the base runtime package.

MRax uses the mrax.* import namespace:

from mrax.core.loss_builder import run_fit
from mrax.library import make_t2_se_model

Contributor extras are available for notebook and documentation workflows:

pip install "mrax[notebooks]"
pip install "mrax[docs]"

For local development from a clone:

python -m pip install --upgrade pip
python -m pip install -e ".[all,dev,docs,notebooks]"
pytest

Dev Container

The repository includes one VS Code compatible dev container. Open the public clone in VS Code and choose Dev Containers: Reopen in Container. The container installs all runtime features plus development, documentation, and notebook tooling, then installs MRax in editable mode:

python -m pip install -e ".[all,dev,docs,notebooks]"

Inside the container, common checks are:

pytest
sphinx-build -E -b html docs docs/_build/html
jupyter lab notebooks

Documentation Website

Documentation is built with Sphinx:

python -m pip install -e ".[docs]"
sphinx-build -E -b html docs docs/_build/html

PyPI Release

Build and inspect a local distribution with:

python -m pip install -e ".[all,dev,docs,notebooks]"
python -m build
twine check dist/*

Quick Example

import jax.numpy as jnp

from mrax.core.loss_builder import run_fit
from mrax.data_struct import DataSet, Quantity
from mrax.library import build_default_experiment, make_t2_se_model

te = jnp.asarray([8.0, 24.0, 48.0, 96.0])
experiment = build_default_experiment(
    "mse",
    frame_count=te.size,
    spatial_shape=(2, 2),
    observables={"TE": Quantity(te, "ms")},
)
model = make_t2_se_model(scale=1.0)
dataset = DataSet(data=jnp.ones((te.size, 2, 2)), name="demo")

fields, losses = run_fit(experiment, model, dataset, num_steps=20, step_size=0.03)
print(fields["t2"].si_unit, losses[-1])

Metadata

Release files for mrax 0.2.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 mrax 0.2.0
File Size Uploaded Provenance Actions
mrax-0.2.0.tar.gz 1.9 MB With provenance Details for mrax-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mrax 0.2.0
File Interpreter ABI Platform Actions
mrax-0.2.0-py3-none-any.whl Python 3 none any Details for mrax-0.2.0-py3-none-any.whl

Total release size: 2.3 MB

Release files / mrax-0.2.0.tar.gz

Download URL mrax-0.2.0.tar.gz
Size 1.9 MB
Tags Source
SHA-256 checksum
How to use checksums
c7b86e19492ef79cffb1cb3fea1316158a519269d12ba104ba7926be4a536b04
BLAKE2b-256 checksum
How to use checksums
4a5f1dea52b9464b38a1126f580b64aa8c068d7f8d6d4ac92c77360f8b4267f6
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 8, 2026.

Transparency log

Release files / mrax-0.2.0-py3-none-any.whl

Download URL mrax-0.2.0-py3-none-any.whl
Size 428.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b8d51c42efd99c8c4322f614e2f4db3718001560176ced959dd222609499bdde
BLAKE2b-256 checksum
How to use checksums
62cde82046ec809901c026669f55c4d71ce81566bbbd198638911ccbc394c5fe
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 8, 2026.

Transparency log

Security for mrax 0.2.0

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.

Select from 2 files

Attestation for mrax-0.2.0.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 Aug 8, 2026.

Transparency log

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

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