MRax#

MRax logo

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

Experiment and Quantity objects keep dimensions and units attached to arrays.

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#

  1. Build or import a Study from synthetic data, Pulseq, Bruker ParaVision, or a custom loader.

  2. Pick a model for each experiment and insert any required observables from study globals or prior fits.

  3. Plan and execute fits with mrax.core.study_runner.plan_study_fits() and mrax.core.study_runner.execute_study_plan(), or call mrax.core.loss_builder.run_fit() directly for a single experiment.

  4. Inspect fitted fields, derived maps, and convergence history.

  5. Save the run with mrax.data_struct.storage.save_study_results() and analyze ROI or group summaries from the manifest.

Start Here#

Quick API Jump#