Metadata-Version: 2.4
Name: mrax
Version: 0.4.0
Summary: JAX-based tools for quantitative MRI model fitting, reconstruction, and analysis.
Author: Chris Lippe
License-Expression: MIT
Project-URL: Homepage, https://github.com/chris-lippe/MRax
Project-URL: Documentation, https://chris-lippe.github.io/MRax
Project-URL: Repository, https://github.com/chris-lippe/MRax
Project-URL: Issues, https://github.com/chris-lippe/MRax/issues
Keywords: MRI,JAX,quantitative imaging,reconstruction
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Medical Science Apps.
Classifier: Topic :: Scientific/Engineering :: Image Processing
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: jax<0.11,>=0.4.35
Requires-Dist: optax<0.3,>=0.2.4
Requires-Dist: numpy<3,>=2
Requires-Dist: scipy<2,>=1.14
Requires-Dist: ismrmrd<2,>=1.14
Requires-Dist: h5py<4,>=3.11
Requires-Dist: nibabel<6,>=5.3
Requires-Dist: pydicom<4,>=3
Requires-Dist: pydantic<3,>=2.9
Provides-Extra: full
Requires-Dist: pymapvbvd<1,>=0.7; extra == "full"
Requires-Dist: dipy<2,>=1.10; extra == "full"
Requires-Dist: pypulseq<2,>=1.4; extra == "full"
Requires-Dist: SimpleITK<3,>=2.4; extra == "full"
Requires-Dist: matplotlib<4,>=3.9; extra == "full"
Provides-Extra: gui
Requires-Dist: mrax[full]; extra == "gui"
Requires-Dist: fastapi<1,>=0.115; extra == "gui"
Requires-Dist: uvicorn<1,>=0.30; extra == "gui"
Provides-Extra: dicom-codecs
Requires-Dist: pylibjpeg<3,>=2; extra == "dicom-codecs"
Requires-Dist: pylibjpeg-libjpeg<3,>=2.1; extra == "dicom-codecs"
Requires-Dist: pylibjpeg-openjpeg<3,>=2.4; extra == "dicom-codecs"
Provides-Extra: denoise-external
Requires-Dist: bm3d<5,>=4; extra == "denoise-external"
Requires-Dist: bm4d<5,>=4; extra == "denoise-external"
Provides-Extra: all
Requires-Dist: mrax[denoise-external,dicom-codecs,gui]; extra == "all"
Provides-Extra: docs
Requires-Dist: sphinx<11,>=8; extra == "docs"
Requires-Dist: myst-parser<6,>=4; extra == "docs"
Requires-Dist: pydata-sphinx-theme<1,>=0.16; extra == "docs"
Requires-Dist: nbsphinx<1,>=0.9; extra == "docs"
Provides-Extra: notebooks
Requires-Dist: jupyterlab<5,>=4; extra == "notebooks"
Requires-Dist: scikit-image<1,>=0.25; extra == "notebooks"
Provides-Extra: dev
Requires-Dist: httpx<1,>=0.27; extra == "dev"
Requires-Dist: build<2,>=1.2; extra == "dev"
Requires-Dist: coverage<8,>=7.6; extra == "dev"
Requires-Dist: isort<7,>=5.13; extra == "dev"
Requires-Dist: pytest<10,>=8.3; extra == "dev"
Requires-Dist: pyright<2,>=1.1.400; extra == "dev"
Requires-Dist: ruff<1,>=0.9; extra == "dev"
Requires-Dist: twine<7,>=6; extra == "dev"
Dynamic: license-file

![MRax logo](MRax_logo.svg)

# MRax

[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.21723327.svg)](https://doi.org/10.5281/zenodo.21723327)
[![Documentation](https://img.shields.io/badge/Documentation-1f77b4?logo=readthedocs&logoColor=white)](https://chris-lippe.github.io/MRax/)

MRax is a JAX-based Python library for quantitative MRI research. It combines
unit-aware experiments and studies, differentiable signal models, Optax and
proximal optimizers, MRI reconstruction, analysis, and portable `.mrax` bundles.

MRax is intended for research use. Coding agents assisted development.

## Install

```bash
pip install mrax
```

The base package includes CPU fitting, reconstruction, analysis, common MRI I/O
and storage. Install `mrax[full]` for specialized raw importers, registration,
DIPY interoperability and plotting, or `mrax[gui]` for the browser GUI and its
scientific tools. Start the latter with `mrax-gui`. See the
[GUI user guide](https://chris-lippe.github.io/MRax/gui.html) for usage.

Optional BM3D/BM4D
denoisers use `pip install "mrax[denoise-external]"` under their upstream
non-commercial licenses.
See [installation](https://chris-lippe.github.io/MRax/setup.html) and
[development containers](https://chris-lippe.github.io/MRax/docker_setup.html)
for platform and GPU setup.

## Quick example

```python
import jax.numpy as jnp

from mrax.core 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")},
)
dataset = DataSet(data=jnp.ones((te.size, 2, 2)), name="demo")
fields, history = run_fit(
    experiment, make_t2_se_model(scale=1.0), dataset,
    num_steps=20, step_size=0.03,
)
```

## Documentation

Visit the [MRax documentation](https://chris-lippe.github.io/MRax/) for details on usage and development.

- [Overview and workflows](https://chris-lippe.github.io/MRax/overview.html)
- [Fitting guide](https://chris-lippe.github.io/MRax/model_fitting.html)
- [API reference](https://chris-lippe.github.io/MRax/api.html)
- [Tutorial notebooks](https://chris-lippe.github.io/MRax/notebooks.html)
- [Contributing and local checks](https://chris-lippe.github.io/MRax/contributing.html)


## How to cite

If you use MRax in your research, please cite the specific release you used. Select the release used from [MRax on Zenodo](https://doi.org/10.5281/zenodo.21723327)
and copy its version-specific citation.

For a general reference to the project, use:

> Lippe, C. *MRax: JAX-based tools for quantitative MRI research* [Computer software].
> Zenodo. [https://doi.org/10.5281/zenodo.21723327](https://doi.org/10.5281/zenodo.21723327)
