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.

The GEExam class hierarchy

ExamBase is the general-purpose entry point: point it at a data folder and it classifies every series for you. Some study designs are common enough to deserve their own subclass on top of that — one that already knows which series is the anatomical scan, which are the pre/post-injection spectra, and how they relate to each other, so you don’t have to re-derive that bookkeeping in every notebook.

ClassWhat it adds
ExamBaseclassifies series into GESeries subclasses; load_series/load_all
DMIExam+ sorts series into anatomical/all_MRS/all_MRSI by folder-name convention
MS_DMIExam+ picks the one MRSI and the two MRS series flanking it (pre/post)
DMIinjExam+ splits every MRS/MRSI series into pre-/post-injection lists around a wash-in series

Splitting series around an injection

DMIinjExam finds a wash-in series (description containing MRS washin) and uses its series ID as a reference point: every other MRS/MRSI series sorts into “pre” (the single one immediately before it) or “post” (all series after it, in order). This is _split_series — a pure function of a series-ID array and a reference ID, easiest to see without loading any real data.

2026-10-16 09:49:41.206 | DEBUG    | mnutils.GEExam:_split_series:399 - Splitting MRS series into pre- and post-injection based on reference series 5 for series list: [3 7 9].
3 [7 9]

Loading a real exam

DMIinjExam.load_all_series() does the equivalent classification against real series data, setting pre_MRS/post_MRS/pre_MRSI/post_MRSI/washin once loaded. The general ExamBase walkthrough already covers classification and loading in depth — this page only adds the injection-specific splitting on top.