MRax#
A Python library for quantitative MRI research.
MRax provides data structures and optimization utilities for quantitative MRI research. It includes unit-aware observables, common signal models, reconstruction helpers, and manifest-based storage.
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.
Main components#
Signal models |
Built-in model factories for common quantitative MRI equations, plus a template for custom models. |
Named experiments |
|
JAX optimization |
Differentiable fitting, regularization, masks, constraints, and study-level execution with Optax-based solvers. |
MRI reconstruction |
Cartesian and non-Cartesian helpers, k-space processing blocks, variational solvers, and model-based parameter reconstruction. |
Storage |
ISMRMRD-backed manifests for images, k-space, fitted maps, units, metadata, and optional NIfTI exports. |
Core workflow#
Build or import a
Studyfrom synthetic data, Pulseq, Bruker ParaVision, or a custom loader.Pick a model for each experiment and insert any required observables from study globals or prior fits.
Plan and execute fits with
mrax.core.study_runner.plan_study_fits()andmrax.core.study_runner.execute_study_plan(), or callmrax.core.loss_builder.run_fit()directly for a single experiment.Inspect fitted fields, derived maps, and convergence history.
Save the run with
mrax.data_struct.storage.save_study_results()and analyze ROI or group summaries from the manifest.
Start Here#
Explore the documentation
Quick API Jump#
Data containers and studies: Data and Study Containers
Run single- or multi-experiment fits: Fitting Pipeline
Batch processing on disk folders: Batch Execution
Preprocessing toolbox: Preprocessing
Post-fit analysis toolbox: Post-fit Analysis
Optimizers and regularizers: Optimization and Regularization
Reconstruction operators and solvers: Reconstruction
Import helpers: Import Helpers
Useful Links#
Install docs/test/notebook tooling:
pip install -r requirements-dev.txtBuild docs locally:
sphinx-build -E -b html docs docs/_build/htmlLaunch notebooks locally:
jupyter lab notebooks