Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Welcome to MNUtils

MNUtils is a collection of utility functions for working with multi-nuclear MR data from our GE scanners: loading raw and reconstructed data, converting to NIfTI, plotting, and spectral fitting.

At its core sit two classes, GEExam and GESeries, wrapping a single scan session and one series within it, so the rest of the toolbox — plotting, NIfTI conversion, fitting — takes a GESeries in and gives you back something usable, instead of another positional-array puzzle.


Quick start

from mnutils.GEExam import ExamBase

# ExamBase scans DATA_FOLDER and figures out which series are which
exam = ExamBase(BASE_FOLDER="data/HeVo-18")
exam.load_series(6)  # loads series 6 as the right GESeries subclass automatically

mrs_series = exam[6]
print(mrs_series.protocol_name, mrs_series.spec.shape)

The full walkthrough — including what each GESeries subclass gives you — lives in Loading a series and an exam.

Fitting has its own path, delegated to xmris and pyAMARES — see Fitting once that chapter has content.

Install

uv add mnutils

Requires Python 3.12+. Installing the MATLAB Engine for Python separately is required for any function that calls into MATLAB — see MATLAB bridge.

Where to go next

You want to...Go to
Load and inspect a scanBasics
Understand GEExam/GESeriesData model
Plot images or spectraPlotting
Fit a spectrumFitting
Convert to NIfTI, run brain extractionNIfTI & imaging utilities
Call into MATLABMATLAB bridge
Contribute a changeContribute