Gannet Manual

User Manual:

Open the PDF directly: View PDF PDF.
Page Count: 20

DownloadGannet Manual
Open PDF In BrowserView PDF
1

Contents

Table of Contents
Overview ................................................................................................................................. 3	
  
Difference-edited MRS for GABA ................................................................................................ 3 	
  
Getting Started with Gannet ............................................................................................... 4	
  
Gannet Output ....................................................................................................................... 6	
  
GannetFit Output .................................................................................................................. 8	
  
Acquisitions for Gannet ....................................................................................................... 9	
  
Processing of MRS data in GannetLoad ............................................................................ 9	
  
Registration and Segmentation ......................................................................................... 11	
  
Troubleshooting ................................................................................................................... 14	
  
The Gannet Output Structure .......................................................................................... 16	
  
Additional Resources .......................................................................................................... 19	
  
Acknowledgements ............................................................................................................. 20	
  

2

Overview
Gannet is designed to batch-process GABA-edited MR spectroscopy data. Our aim is to manage this
successfully with minimal user intervention, but it is important to understand the experiment being
performed in order to judge whether this has been achieved. There is no substitute for looking at all the
data at both the GannetLoad and GannetFit steps to judge the quality of the data and it is important to get
a feel for what the data look like. Additionally, checking the registration results and segmentation results
from GannetCoRegister and GannetSegment serve as data quality checks on the voxel registration and
tissue segmentation analyses.

Difference-edited MRS for GABA
Gannet is designed to handle difference-edited spectra, usually acquired with the MEGA-PRESS experiment.
More details on the experiment can be found in the original paper1 or our recent review papers2.
Essentially MEGA-PRESS acquires two spectra which differ in how the GABA signal evolves, so that the
GABA signal is revealed upon subtraction of the two. This subtraction is both the strength of the
experiment, in that it allows a weak GABA signal to be separated from the strong overlying Creatine (Cr)
signal, and its weakness, in that accurate subtraction of the Cr signals is required for accurate GABA
quantification. The key pre-processing step of Gannet (frequency and phase correction) is designed to
overcome some experimental instability and still achieve accurate subtraction of the Cr signal.
MEGA-PRESS harnesses the fact that coupled signals like GABA evolve during the echo time, changing the
appearance of GABA spectrum at different TEs, whereas uncoupled signals like Cr do not. Furthermore,
this evolution can be undone, or refocused, by applying frequency-selective inversion pulses to the GABA
spins. The MEGA-PRESS experiment acquires one experiment in which editing pulses are applied to the
GABA signal at 1.9 ppm (often referred to as the ON experiment) and one in which they are not (the OFF
experiment). In each of these experiments, the GABA signal at 3 ppm has a different shape, and so
therefore subtracting the spectra from the two experiments leaves a measureable GABA signal.
Standard MRS processing
In addition to frequency and phase correction to achieve optimal subtraction of Cr, Gannet performs
standard MRS processing steps such as channel combination of phased array data (where required), fast
Fourier transform (FFT) of time-domain acquired data to frequency-domain spectra, and exponential line
broadening. Further details of processing steps applied to different data types are covered the section
Processing of MRS data in GannetLoad.

1
2

3

Mescher et al. NMR Biomed 11:266-272 (1998).
Puts et al. Prog NMR Spec 60:29-41 (2012); Mullins et al. Neuroimage doi: 10.1016/j.neuroimage.2012.12.004.

Getting Started with Gannet
1. Get Matlab with Optimisation and Statistics Toolboxes
2. Get the Gannet2.0 code from github (http://github.com/cjohnevans/Gannet2.0) and add these files
to your matlab path
3. To perform voxel localization and tissue segmentation, get SPM8 and add to your matlab path
(http://www.fil.ion.ucl.ac.uk/spm/software/spm8/)
Assuming familiarity with Matlab, make sure all the files downloaded from github are in your matlab path;
(i.e. use “add with subfolders”). If you are not familiar with matlab, someone else in your group probably is
and can assist.
4. What do I type?
For preliminary GABA quantification, Gannet is currently run from two commands – GannetLoad and
GannetFit. This section will cover the load and processing of a single data file. Replace the filename with the
actual name of your file.
Note, in Gannet2 – we have included an initialize file – GannetPreInitialize that enables the user to set some
parameters, such as whether ON or OFF editing is applied first, which frequency correction method to use.
Prior to performing analysis, check this file to ensure parameters are all set as expected.
4.1 General
In general, running GannetLoad involves typing something like:
MRS_struct = GannetLoad({‘GE_data1.7’});
and running GannetFit involves typing something like:
MRS_struct = GannetFit(MRS_struct);
Gannet is designed to process a study-worth of data sequentially, so you might start like this:
MRS_struct = GannetLoad({‘GE_data1.7’ ‘GE_data2.7’ ‘GE_data3.7’ ‘GE_data4.7’});
where the input variable to GannetLoad is a cell array of filename strings.
3.1 GE data
P files contain a water reference internally, so:
MRS_struct = GannetLoad({‘GE_data1.7’});
MRS_struct = GannetFit(MRS_struct);
3.2.

Philips .sdat files

If no water reference data have been collected:
MRS_struct = GannetLoad({‘Philips1.sdat’});
MRS_struct = GannetFit(MRS_struct);
If water reference data have been collected:
4

MRS_struct = GannetLoad({‘Philips1.sdat’},{‘Philips1_water.sdat’});
MRS_struct = GannetFit(MRS_struct);
In the most recent patch that includes the Spectral Correction functionality and acquires the water data
within the scan:
MRS_struct = GannetLoad({‘Philips1_act.sdat’},{‘Philips1_ref.sdat’});
MRS_struct = GannetFit(MRS_struct);
2.3.

Philips .data files

If no water reference data have been collected (or if water reference data is ‘internal’ (see 4 below)):
MRS_struct = GannetLoad({‘Philips1.data’});
MRS_struct = GannetFit(MRS_struct);
If water reference data have been collected in a separate acqusition:
MRS_struct = GannetLoad({‘Philips1.data’},{‘Philips1_water.data’});
MRS_struct = GannetFit(MRS_struct);
2.4.

Siemens .rda files (saved as OFF and ON rda files separately)

MRS_struct = GannetLoad({'Siemens1_ON.rda' 'Siemens1_OFF.rda'});
MRS_struct = GannetFit(MRS_struct);
If water reference data have been collected:
MRS_struct = GannetLoad({ 'Siemens1_OFF.rda' 'Siemens1_ON.rda' },{'Siemens_water.rda'});
MRS_struct = GannetFit(MRS_struct);
2.5.

Siemens .dat TWIX files

If no water reference data have been collected:
MRS_struct = GannetLoad({‘Siemens1.dat’});
MRS_struct = GannetFit(MRS_struct);
If water reference data have been collected:
MRS_struct = GannetLoad({‘Siemens1.dat’},{‘Siemens1_water.dat’});
MRS_struct = GannetFit(MRS_struct);
This should work for Siemens .dat data acquired either with the Siemens WIP or Jamie Near’s sequence.
5. Data Formats and Assumptions
GE, Philips and Siemens data formats are supported. Vendor is chosen according to file endings, so make
sure your data files end .7 .rda .sdat or .data.
For GE, data ordering according to Richard Edden’s sequence is assumed. Functionality to automatically
differentiate this data from Ralph Noeske’s GE sequence is planned.
For Philips, we also assume the used of Richard Edden’s acquisition implementation. For Philips .sdat, it is
assumed that edited data are acquired as a dynamic series of alternating OFF and ON scans. In Gannet, an
5

assumption is made as to whether data are acquired on-first, or off-first, whereas from Gannet 2.0, this is a
parameter declared in GannetPreInitialise.
For Philips .data, the same assumptions apply and the data file now contains each FID rather than data timeaveraged within each dynamic scan of n averages. If data are acquired with Spectral Correction on (a newer
functionality for our patch), then GannetLoad extracts that water data from the same .data file as the
edited data (the ‘internal’ case mentioned above). In Gannet, an assumption is made as to whether data are
acquired on-first, or off-first, whereas from Gannet 2.0, this is a parameter declared in GannetPreInitialise.
For Siemens .rda files, it is assumed that time-domain data averaged separately for OFF and ON scans are
available, as provided by the Siemens WIP. Most recently, functionality to read in raw .dat files from the
TWIX server from either the Siemens WIP or Jamie Near’s sequence.
If you are using this software to process your own implementation of GABA-edited MRS, please contact us
gabamrs@gmail.com .
In the case where multiple files are processed in a batch by Gannet, some parameters are assumed to be
conserved across the group. It is not safe to lump “different acquisitions” into a single Gannet run. While
this may raise an error in Matlab, it also may continue processing with incorrect parameters.
6. Batch Processing
In order to batch process data, simply add more filenames to the string arrays, e.g.:
MRS_struct=GannetLoad({gaba1.dat’ ‘gaba2.dat’},{‘water1.dat’ ‘water2.dat’});

Gannet Output
Gannet gives output in two forms: the matlab structure and the figures. The structure itself is described fully
below in the section The Gannet Output Structure. A separate output figure is produced for the
GannetLoad and GannetFit steps of each dataset. These figures are also saved as pdf files locally.
GannetLoad Output

6

A. The plot top left shows the processed GABA-edited difference spectrum, the key output of the
GannetLoad module. This plot shows the spectrum before frequency and phase correction above
in green and the spectrum after frequency and phase correction below in blue. Hopefully the
spectrum below should look nicer than the spectrum above. If it doesn’t, there is a problem; see
the section Troubleshooting.
B. The plot top right shows the frequency of the maximum point in the spectrum (usually residual
water signal) plotted against time. Time is measured at the resolution of time-resolved data is fed in.
The y-axis is free to scale according to the data, so be sure to check the y-range. This information
can be interpreted in several ways, but it gives qualitative information on the stability of the
experiment whether field drift, subject motion, accuracy of prospective frequency correction etc.
Field drift will appear as a non-zero slope in this trace, and movement as a discontinuity in the trace.
Some datapoints may be circled in red in this plot. These are datapoints that have been rejected –
see more below.
C. The plot bottom left presents the Cr signal over the duration of the experiment (same x-axis as B).
The y-axis here represents the frequency in ppm of the Cr signal. The spectra at each timepoint are
presented as a vertical stripe in the image, color-coded according to signal intensity, so the Cr signal
should appear as a ‘hot’ stripe running through the image. In the upper half (PRE), the stripe should
vary in frequency in a similar fashion to the water plot in B. In the lower half (POST), the result of
frequency and phase correction (default is spectral registration SR3) is shown and ideally a more
uniform horizontal stripe should appear.
In the lower half (POST), some rows will appear as a dark blue stripe (i.e. no Cr peak at all). These
rows, corresponding to the red circled points in B, have been rejected because one of the fitting
parameters used for frequency correction lie more than three standard deviations from the mean.
When an outlier is identified for rejection, rejection is always performed pairwise, i.e. if an OFF scan
is rejected, a neighbouring ON scan will also be rejected, so as to balance the number of OFFs and
ONs for subtraction.

3

7

Near et al. Magn Reson Med. 2014, In Press.

D. The panel bottom right shows the filename and some descriptive variables about the data including
the full-width-half-maximum linewidth of the Cr signal after SR and averaging (FWHM (Hz), the
standard deviation of the SR correction frequencies (FreqSTD (Hz)), the exponential line
broadening applied to the data (3 Hz by default), and the code version used.

GannetFit Output

A. The plot top left shows the modeling of the GABA signal. The GABA-edited spectrum is shown in
blue (across a more limited ppm range than in the GannetLoad output). Overlaid in red is the
model of best fit (using a simple Gaussian model by default). Below the plot, the residual between
these two is shown in black.
B. The plot bottom left shows the modeling of the signal against which GABA is quantified. Again data
are blue, models are red and residuals below are black. If no water data is provided, the spectrum
shown will be the Cr signal from the OFF spectrum. If unsuppressed water data are supplied, then
the main spectrum will be the water signal and the Cr signal will be shown in an inset. The water
signal is modeled as a mixed Gaussian-Lorentzian. From Gannet 2.0 onwards, Cr and Choline
(Cho) are modeled as two Lorentzians (with the same linewidth and a fixed frequency separation).
In red both the full model and the Cr component of that model are shown.
C. The right-hand panel contains the results of the fitting, including the file name, number of averages,
the width of the fitted GABA signal, the integral area of GABA, Cr and water models, the fit error
of the models (defined as the standard deviation of the residuals expressed as a percentage of the
signal height), the GABA concentration expressed in institutional units relative to water and as an
integral ratio relative to Cr, and the code versions of GannetFit and GannetLoad used. These
numbers are also contained in the matlab output structure – for more detail, see the section The
Gannet Output Structure.

8

Acquisitions for Gannet
Gannet is designed to process difference-edited GABA spectra. In processing data, Gannet makes several
assumptions as to the shape of the data, particularly with regards to how OFF and ON acquisitions are
ordered within the data. More details of the files supported are given, by vendor, below.
GE implementation
Our implementation of MEGA-PRESS on the GE system (which we are happy to share with collaborators)
stores alternating rows of ON and OFF data, each of which represents a time-averaged sum over NEX TRs.
Philips implementation
Our implementation of MEGA-PRESS on the Philips system (which we are happy to share with
collaborators) exports .sdat files with alternating rows of ON and OFF data, each of which represents a
time-averaged dynamic scan over a certain number of averages.
It exports .data files with alternating blocks of ON and OFF data. Each block, which corresponds to one
dynamic scan, consists of a number of acquisitions correpsonding to the number of averages specified in the
exam card. Thus the total number of averages for the MEGA-PRESS acquisition is the product of the
specified number of averages and number of dynamic scans.
Siemens implementations
The Siemens-supplied WIP sequence can generate separate time-averaged rda files corresponding to the
OFF and ON acquisitions. In the TWIX data export, it stores OFF and ON data separately in the NEco
dimension (i.e. NEco = 2) with averages stored in the NSet dimension. Thus the total number of averages
(as we define it) is NSet*2.
We have additionally programmed the TWIX data read to accommodate Jamie Near’s implementation of
the sequence. For this experiment, OFF and ON data are stored separately in the NIda dimension (i.e.
NIda = 2) with averages stored in the NSet dimension. Thus the total number of averages (as we define it)
is still NSet*2.
Other implementations
We are keen to accommodate further implementations of MEGA-PRESS in order to widen the applicability
of Gannet. If you are acquiring data from a currently unsupported data format and would like to use
Gannet, contact us at gabamrs@gmail.com.
Other experiments
In addition to GABA editing, we are in the process of developing a Gannet variant that handles glutathioneedited MEGA-PRESS data. Please get in touch if this is of interest, at gabamrs@gmail.com.

Processing of MRS data in GannetLoad
Depending on the degree of pre-processing applied before data export from the scanner, a different
number of steps are applied to each data type.
GE p-file data
9

1.
2.
3.
4.
5.
6.
7.
8.

Combination of phased array coil data
Time-domain frequency-and-phase correction using spectral correction
Exponential apodization function (line broadening)
FFT
Time averaging
Frequency and phase correction based upon fitting of the Cho and Cr signals
Pairwise rejection of data for which fitting parameters are greater than 3 s.d. from the mean
Subtraction to generate the edited difference spectrum (and extraction of OFF spectrum)

The distinction between step 2 and step 6 is that spectral correction ensures that the frequency and phase
of time-domain data are internally consistent, but does not ensure either are ‘correct’. In step 6, the
frequency of the Cr signal is set to 3.02 ppm and the phase of the spectrum is chosen so as to maximize
the match between the data and a simple absorption lineshape model. Prior to Gannet 2.0, frequency and
phase correction was performed in the frequency domain, prior to time averaging, according to Evans et al.
20124.
Philips .sdat data
1.
2.
3.
4.
5.
6.
7.

Time-domain frequency-and-phase correction using spectral correction
Exponential apodization function (line broadening)
FFT
Time averaging
Frequency and phase correction based upon fitting of the Cho and Cr signals
Pairwise rejection of data for which fitting parameters are greater than 3 s.d. from the mean
Subtraction to generate the edited difference spectrum (and extraction of OFF spectrum)

The distinction between step 1 and step 5 is that spectral correction ensures that the frequency and phase
of time-domain data are internally consistent, but does not ensure either are ‘correct’. In step 5, the
frequency of the Cr signal is set to 3.02 ppm and the phase of the spectrum is chosen so as to maximize
the match between the data and a simple absorption lineshape model. Prior to Gannet 2.0, frequency and
phase correction was performed in the frequency domain, prior to time averaging, according to Evans et al.
20123.
Philips .data data
Processing of Philips .data files proceeds similarly to .sdat (as above). The only difference between the two
is the reduced time averaging of the .data format – one row is exported per TR, rather than one per
dynamic scan for .sdat. The only additional complication this adds is that pairwise rejection for .data will
result in rejection of a matching (ON/OFF) scan that comes from the next dynamic scan.
Siemens .rda files
1.
2.
3.
4.

4

Time-domain frequency-and-phase correction using spectral correction
Exponential apodization function (line broadening)
FFT
Frequency and phase correction (of OFF.rda to ON.rda) based upon fitting of the Cho and Cr
signals

Evans et al. J Magn Reson Imag 38(4):970-975 (2013).

10

5. Subtraction to generate the edited difference spectrum (and extraction of OFF spectrum)
The Siemens rda files are already time-averaged – Gannet still performs a registration of the OFF scan to
the ON scan to minimize subtraction artefacts, but there is a limit to what can be done!
Siemens .dat files
1.
2.
3.
4.
5.
6.
7.
8.

Combination of phased array coil data
Time-domain frequency-and-phase correction using spectral correction
Exponential apodization function (line broadening)
FFT
Time averaging
Frequency and phase correction based upon fitting of the Cho and Cr signals
Pairwise rejection of data for which fitting parameters are greater than 3 s.d. from the mean
Subtraction to generate the edited difference spectrum (and extraction of OFF spectrum)

The distinction between step 2 and step 6 is that spectral correction ensures that the frequency and phase
of time-domain data are internally consistent, but does not ensure either are ‘correct’. In step 6, the
frequency of the Cr signal is set to 3.02 ppm and the phase of the spectrum is chosen so as to maximize
the match between the data and a simple absorption lineshape model. Prior to Gannet 2.0, frequency and
phase correction was performed in the frequency domain, prior to time averaging, according to Evans et al.
20125. While this frequency and phase correction function still exists, the default and our general
recommendation is to use spectral registration3.

Registration and Segmentation
Two additional functions that have been added for Philips SDAT data and GE data are GannetCoRegister
and GannetSegment. GannetCoRegister registers the MRS voxel to the T1-weighted image (MPRage for
Philips, FSPGR for GE) using GannetMask (which can also be used as a stand alone function). For each MRS
dataset, it creates a nifti image that is a binary mask of the MRS voxel with the same geometric parameters
as the T1-weighted image. This is saved in the same directory as the T1-weighted image data.
GannetSegment calls SPM to segment the T1-weighted image, then uses the segmentation results to
determine the tissue fractions (gray matter, white matter and CSF) for the voxel and a CSF-corrected
GABA estimate.
For this to work you need to have SPM8 installed and the path added to your matlab.
Philips.sdat data
The easiest approach is to export the MPRage in nifti format (NOT FSL nifti) from the scanner. If only
PAR/REC data is available, it needs to be converted to a 3D nifti.
GannetCoRegister and GannetSegment are run from the command line after GannetLoad and GannetFit. In
this example the MRS sdat/spar MPRage nifti are in the current directory.

5

Evans et al. J Magn Reson Imag 38(4):970-975 (2013).

11

MRS_struct = GannetLoad({'MRS_file1.sdat' });
MRS_struct = GannetFit(MRS_struct);
MRS_struct = GannetCoRegister(MRS_struct, {'image1.nii’});
MRS_struct = GannetSegment(MRS_struct);
If a batch is being run, .nii image files are input to GannetCoRegister in the same way as the original files are
input to GannetLoad (i.e. as a cell array of filenames).
MRS_struct = GannetLoad({'MRS_file1.sdat' 'MRS_file2.sdat'});
MRS_struct = GannetFit(MRS_struct);
MRS_struct = GannetCoRegister(MRS_struct, {'image1.nii’ 'image2.nii'});
MRS_struct = GannetSegment(MRS_struct);

GE data
The folder containing the dicom images of the FSPGR (or other anatomical image) and the rotator image
are used in GannetCoRegister. In this example, the current directory contain the following items:
MRS data in GE p-file:
Pfile.7
MRS header for GE p-dile
Pfile.7.hdr
Directory containing the dicom images of the FSPGR images (approx. 170 files)
FSPGR_dcm_ directory
Directory containing the rotator images for the T1-weighted images (1-2 files) rotator_directory
MRS = GannetLoad({Pfile.7'})
MRS = GannetFit(MRS)
MRS = GannetCoRegister(MRS, {‘FSPGR_dcm_directory'}, {‘rotator_directory’})
MRS = GannetSegment(MRS)
The ‘rotator’ is the single-slice planning image that is acquired in the same orientation as the MRS voxel. This
is also referred to as the MRS scout image series that enables rotation of the MRS voxel in the 3rd
dimension. If a rotator was not acquired, do not include a 3rd field when calling GannetGoRegister.
GannetCoRegister outputs one MRS_file1_mask.nii for each MRS dataset. It also saves a pdf image of the
voxel overlaid on a 3-plane view of the image at planes that transect the voxel. GannetSegment outputs
segmented images for gray matter, white matter and CSF, adds the tissue fractions of the voxel to
MRS_struct and saves a pdf image that includes the tissue fractions and a CSF-corrected GABA value. Note,
GannetCoRegister can be run prior to GannetFit.
Example outputs from GannetCoRegister:

12

Voxel from MRSdata.file
on
AnatT1image.nii

L

R

Mask output : MRSdata-mask
Spatial Parameters : [LR, AP, FH]
Size : [30, 30, 30] mm
Volume : 27 ml
Position : [##,##,##] mm
Angulations : [NaN, NaN, NaN, ] deg
Version (CoRegister) : 140707

The file names of the voxel and the anatomical image are shown over an image of the voxel overlaid on the
anatomical image. At the bottom, the name of the mask output and its characteristics are given.

Example output from GannetSegment:

GABAconc(iu) tissue corr: 1.6062
Voxel fraction GM: 0.29266
Voxel fraction WM: 0.66257
Voxel fraction CSF: 0.04477
Spectra: MRSdata.file
Anatomical image: AnatT1image.nii
Ver(Segment): 20140730

4.5

4

3.5

3

2.5

2

1.5

1

0.5

0

At the top left, a single slice to show the voxel location. At the top right, the CSF-corrected GABA
concentration and the voxel tissue fractions are summarized.

13

Troubleshooting
In this section, we will try to identify some “things that can go wrong” and “what to do about it”.
1. Difference spectra appear negative
If the GABA signals in GannetLoad both look negative, it is likely that the MRS_struct.onofforder parameter
is set wrong (the options are the strings ‘onfirst’ or ‘offfirst’). This is set in the GannetPreInitialise script in
the Gannet code folder, and determines whether the data are treated as if the on data or the off data are
acquired first. Since the correct edited spectrum is “ON subtract OFF”, incorrect assignment of this
parameter results in a negative GABA peak.
However, a negative spectrum may also occur if the ON and OFF spectra are correctly assigned, but
phased negatively. If that is the case, follow 2.
2. Creatine stripes are negative
If, as seen in the figure above, the creatine signal in the GannetLoad output is negative i.e. it appears as a
blue (cold) stripe on a red (hot) background, rather than a red (hot) stripe on a cold (blue) background,
then it is likely that the parameter MRS_struct.WaterPositive is set incorrectly. In loading the data, a
preliminary phasing is performed based on the first point of the time-domain data, and if the residual signal
has negative phase relative to the rest of the spectrum (as can happen with some water suppression
schemes) then the creatine signals may become phased negatively. The parameter is set to 1 (yes) by
default and 0 (no) as appropriate.
Note that the Difference spectrum may appear negative in this case also.
3. Matlab can’t find GannetLoad
Make sure the gannet code folder including subdirectories is listed in your matlab path.
4. GannetLoad can’t find my files
Either the filenames has been mistyped, the syntax of the call array is incorrect, or the current working
directory (type pwd) is a mismatch to the filenames used.
5. “Subscripted assignment dimension mismatch”
This is one of the errors that may appear during batch processing if acquisition parameters are not
consistent across scans. A similar message appears with improper syntax in calling GannetLoad.
6. GannetCoRegister error finding T1-weighted image ->
??? Error using ==> spm_vol>subfunc1 at 65
Can't get volume information for 'MPRAGE.nii'
This occurs when SPM is a lower priority in the Matlab path, and may be more likely to be problematic
when working on a network – it can be corrected by moving the SPM director to the same as Gannet (or
changing the priority in the Matlab preferences.

14

15

The Gannet Output Structure
After running GannetLoad, e.g.
MRS_struct = GannetLoad({‘gabafile1.typ’ ’gabfile2.typ’},{‘waterfile1.typ’ ’waterfile2.typ’}); ,
the outputted structure, MRS_struct in this case, will have some of the following attributes. Not all attributes
are filled for all calls, for example e.g. water data is not filled where none is supplied).
The structure has been organized to include fields for acquisition parameters (MRS_struct.p), frequency
domain data (MRS_struct.fids), specta (MRS_struct.spec), output results (MRS_struct.out) and mask data
names (MRS_struct.mask).
MRS_struct.
versionload
ii
gabafile
waterfile

String corresponding to the version and date of GannetLoad
During analysis, the current file being loaded. After analysis, the number of files
loaded
String array containing the inputted GABA filenames
{‘gabafile1.typ’ ’gabfile2.typ’}
String array containing the inputted water filenames
{‘waterfile1.typ’ ’waterfile2.typ’}

MRS_struct.p
sw
npoints
TR
TE
LarmorFreq
target
spar_string
ONOFForder
Water_Positive
LB
ZeroFillTo
AlignTo
Reference_compound
vendor
npoint_water
nrows
nrows_water
Navg
Navg_water
Nwateravg
zf
16

Spectral width (Hz)
Number of time-domain complex datapoints per FID loaded
Repetition time (ms)
Echo time (ms)
Larmor Frequency, where possible, this is determined from data headers but in
some cases (e.g., Philips .data), is taken from GannetPreInitialize
Metabolite of interest. By default this is GABA but implementations for GSH are
currently being tested
Philips-specific string to track capitalization of file endings
Defined in GannetPreInitialize, this states which of the “ON” and “OFF” editing
pulse was applied first in the acquisition
The polarity of the residual water spectrum.
Exponential line broadening applied to data in Hz
Number of points for zero-filled data
Frequency and phase correction scheme applied. By default and recommended is
‘SpecReg’
Concentrations will be calculated relative to this – ‘H20’ is data provided,
otherwise ‘Cr’
Scanner vendor (Siemens, GE or Philips) and data type if relevant
Number of time-domain complex datapoints per FID of the water data
Number of interleaved ON/OFF dynamics
Total number of averages
Number of water averages
Total number of averages of water data
Zero-filling multiple

MRS_struct.fids
gabadata
data_water
flattarget
tempwater
ON_OFF
waterfreq
data_align

Raw time-domain GABA data (dimensions: npoints, nrows) of the last loaded
dataset
Time-domain water data (dimensions: 1, npoints) of the last loaded dataset
Real representation of complex data for ‘SpecReg’
Time-domain water data prior to time averaging
Vector representing each transient as an ON or OFF acquisition.
ppm value of residual water maximum in time-resolved gaba spectra as plotted
top right in GannetLoad output (dimensions: ii, nrows)
Frequency and phase corrected data in time-domain following SpecReg

MRS_struct.spec
water
freq
off
on
diff
diff_noalign
diff_scaled

Frequency-domain water spectra (dimensions: ii, npoints*zf)
ppm x-axis corresponding to waterspec and gabaspec
Frequency-domain OFF subspectra (dimensions: ii, npoints*zf)
Frequency-domain ON subspectra (dimensions: ii, npoints*zf)
Frequency-domain difference spectra after frequency/phase correction
(dimensions: ii, npoints*zf)
Frequency-domain difference spectra prior to frequency/phase correction
(dimensions: ii, npoints*zf)
Frequency-domain difference spectra scaled for plotting output

MRS_struct.out
ChoCrMeanSpecFit
FreqStdevHz
CrFWHMHz
rejects

Fitting parameters of the Cho and Cr peaks
Standard deviation of waterfreq in Hz
Width of Cr peak fit in Hz (dimensions: ii, nrows)
Number of time-resolved spectra rejected due to stability thresholding

After running GannetFit, e.g. MRS_struct=GannetFit(MRS_struct); the outputted structure will have some of the
following additional attributes.

MRS_struct.
versionfit

String corresponding to the date of most recent changes to GannetFit

MRS_struct.out
fitparams_iter
GABAFitError
GABAArea
17

Record of output parameters from GABA fitting, which is looped 100 times
(dimensions: 100, 5, ii)
Standard deviation of the residual of the GABA peak fit expressed as a
percentage of the GABA peak height (dimension: ii)
Integral of Gaussian model fit to GABA peak (dimension: ii)

GABAFWHM
GABAModelFit
WaterModelParam
WaterFitError
GABAIU_Error_w
WaterArea
GABAconciu
CrFitError
GABAIU_Error_cr
CrArea
ChoArea
GABAconcCr
GABAconcCr

Width (FWHM) of fitted GABA peak in Hz (dimension: ii)
Fitting parameters of the model of best GABA fit (dimension: ii,5)
Fitting parameters of the model of best watyerfit (dimension: ii,6)
Standard deviation of the residual of the Water peak fit expressed as a
percentage of the water peak height (dimension: ii)
Error combination of GABAFitError and WaterFitError (dimension: ii)
Integral of Gaussian-Lorentzian model fit to water peak (dimension: ii)
Main GABA concentration output (dimension: ii)
Standard deviation of the residual of the Cr peak fit expressed as a percentage of
the Cr peak height (dimension: ii)
Error combination of GABAFitError and CrFitError (dimension: ii)
Integral of Lorentzian model fit to Cr peak (dimension: ii)
Integral of Lorentzian model fit to Cho peak (dimension: ii)
GABA concentration output calculated relative to Cr (dimension: ii)
GABA concentration output calculated relative to Cho (dimension: ii)

After running GannetCoRegister and GannetSegment, e.g. MRS_struct=GannetCoRegister(MRS_struct, ‘T1.nii’) and
MRS_struct = GannetSegment(MRS_struct); the outputted structure will have some of the following additional
attributes.
MRS_struct.out
tissue
GABAconciuTissCorr

[structure] that contains the Segmentation version, and the tissue fractions for the
voxel
GABA concentration output, referenced to water and CSF-corrected

MRS_struct.mask
outfile
img
T1image

18

File name of created voxel mask (.nii)
Image of voxel location (used in pdf display)
File name of nifti image of T1-weighted anatomical image

Additional Resources
Jiscmail mailing list
GABAMRS@jiscmail.ac.uk is a mailing list to which any questions about MRS of GABA can be asked. The
list also has a searchable archive.
Direct email - GABAMRS@gmail.com
More specific enquiries about Gannet can be made to gabamrs@gmail.com.
Blog
The blog gabamrs.blogspot.com has occasional updates and quite a lot of useful information – the difficulty
is finding the useful information.

19

Acknowledgements
The production and dissemination of Gannet has been supported by NIH grants R01 EB016089, P41
EB15909, R21 NS077300, R21 MH098228, R01 MH 092443 and R01 MH096263.
We gratefully make use of Siemens TWIX read code from Phillip Ehses and Jamie Near. There have also
been many contributions of improvements by our collaborators.

20



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.3
Linearized                      : No
Page Count                      : 20
Title                           : Gannet  Manual 20150128
Author                          : Ashley Harris
Subject                         : 
Producer                        : Mac OS X 10.8.5 Quartz PDFContext
Creator                         : Word
Create Date                     : 2015:01:28 22:57:33Z
Modify Date                     : 2015:01:28 22:57:33Z
Apple Keywords                  : 
EXIF Metadata provided by EXIF.tools

Navigation menu