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 mnutilsRequires 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 scan | Basics |
Understand GEExam/GESeries | Data model |
| Plot images or spectra | Plotting |
| Fit a spectrum | Fitting |
| Convert to NIfTI, run brain extraction | NIfTI & imaging utilities |
| Call into MATLAB | MATLAB bridge |
| Contribute a change | Contribute |