The MRSuite project is an open-source, modular framework for magnetic resonance spectroscopy (MRS) that brings together tools for data handling, signal processing, machine learning, and reproducible reporting in a modular and extensible ecosystem.
Overview
MRSuite is designed to support the full MRS workflow, from raw data processing to advanced analysis. It is built around the following core principles:
- Modularity: Each processing and analysis step is encapsulated in reusable, interchangeable modules.
- Flexibility: Custom algorithms, models, and external-language tools can be easily integrated.
- Scalability: Capable of handling large datasets and computationally intensive workflows.
- Extensibility: New modules and features can be added by following a consistent interface.
- Reproducibility: Standardized interfaces and reporting tools ensure transparent, consistent documentation.
- Benchmarking: Built-in tools allow for systematic evaluation across datasets and methods.
- Community-Driven: Open-source development encourages contributions and collaboration.
Installation
MRSuite needs Python 3.11 or newer:
pip install mrsuite
The toolboxes MRSuite drives come in as you use them: what pip cannot install (Octave or MATLAB, R, FSL-MRS) is named when a step first needs it, and everything else is fetched on first use, each under its own licence (FSL-MRS, for one, is for non-commercial use only).
Python
from mrsuite import io, lcmodel, tarquin
from mrsuite.benchmark import scoring
from mrsuite.core.pipeline import Pipeline
from mrsuite.datasets import challenge2016
spectra, water, truth = challenge2016.load() # fetched on first use
basis = io.basis(challenge2016.BASIS)
fits = {"LCModel": Pipeline([lcmodel.step.fit(basis=basis)]).run(spectra),
"TARQUIN": Pipeline([tarquin.step.fit(basis=basis)]).run(spectra)}
scores = scoring.score(fits, truth, references=["optimal"], metrics={"mosae": scoring.mae})
A step is any toolbox's function: fid_a.step.op_alignAverages(0.2, 'n'),
spant.step.hsvd_filt(), osprey.step.op_eccKlose(water). Swap one for another and the
rest of the chain stands. Scoring runs on
MRSValidate, which is not on PyPI yet:
pip install git+https://github.com/JohnLaMaster/MRSValidate.git.
Key Components
Processing Pipeline
A modular pipeline for preprocessing MRS data, including:
- Data Import: Load data from various formats.
- Processing: Choose from a collection of processing steps or add your own.
- Provenance: Every step is recorded in the data's own processing history (NIfTI-MRS): the toolbox, its exact version and every argument.
AI Model Zoo
A collection of (pre-trained) AI models for MRS analysis, including:
- Interface: A standardized interface for integrating AI models into the processing pipeline.
- Training: Train or retrain a model in MRSuite (
model.learn, one Keras 3 loop, on the CPU, CUDA or Apple's MPS), its recipe recorded with it. - Sharing: Push a model to the Hugging Face Hub and load anyone's by its name.
Benchmarking Suite
A suite of tools for benchmarking MRS processing and analysis methods, including:
- Accuracy and agreement: MRSuite's own errors (MAE, MOSAE) and every analysis of MRSValidate that compares fits with the truth: errors, Lin's CCC, regression, Bland-Altman, normality; per metabolite and pooled.
- Comparative Analysis: Compare different methods and configurations on the same data.
- Score tables: One table per measure, by method, reference and metabolite.
- Visualization: A radar of the methods, a corner per aspect, and MRSValidate's plots.
Graphical Interface
mrsuite-gui
Wire blocks on a canvas. One block per step, each offering every toolbox that does it, and every function of every toolbox besides. Each block shows what it made, exports it, and reads out its NIfTI-MRS header and history. The graph is written out as the Python that makes it again.
In vivo processing: coils, alignment, outliers, averaging, eddy currents, water, referencing and phasing by four toolboxes, then LCModel with the water reference.
A benchmark: the 2016 fitting challenge into four fitters, scored on five aspects against the truth and drawn on a radar.
The same processing as the Python it writes.
Reporting Standards
A set of standards for generating reproducible reports, including:
- Documentation: Each step of the processing pipeline is documented automatically, in the data's history.
- Training recipes: A trained model carries how its training spectra were made, reported as the MRSsynMRS minimum standard for synthetic data.
- Contribution Guidelines: CONTRIBUTING.md says how to add a method, check it, and share a trained model.
Metadata
Release files for mrsuite 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mrsuite-0.0.3.tar.gz | 592.5 kB | With provenance | Details for mrsuite-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mrsuite-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for mrsuite-0.0.3-py3-none-any.whl |
Total release size: 1.2 MB
Release files / mrsuite-0.0.3.tar.gz
| Download URL | mrsuite-0.0.3.tar.gz |
|---|---|
| Size | 592.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1aea1af14a63741dd4c7a14f2b4381936aaef488622d198594f5117a28d8482
|
|
BLAKE2b-256 checksum How to use checksums |
4b618f6f4d5f663280adc9aa2106c803463d28cbe1492304344a0741d5fd3187
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 27, 2026.
Transparency logRelease files / mrsuite-0.0.3-py3-none-any.whl
| Download URL | mrsuite-0.0.3-py3-none-any.whl |
|---|---|
| Size | 637.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8fb01e06b198b079d0cd404947ca9233791f7343e55559bb51712a99c12d0f9d
|
|
BLAKE2b-256 checksum How to use checksums |
a4a0214bd66d764fbb15557d7bd507892111a68fb3d704d392791895e1690022
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 27, 2026.
Transparency logSecurity for mrsuite 0.0.3
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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for mrsuite-0.0.3.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 Oct 27, 2026.
Transparency logA 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.