Listed below are the preprocessing routines that are run in
GannetLoad.m. Whether a particular routine or subroutine is
run will depend on the format of the inputted data and the options set
in GannetPreInitialise.m.
RF coil combination
Certain raw MRS data formats store data without coil combination;
specifically, GE P-file (.7), NIfTI-MRS (if the source data were raw),
Philips .raw, and Siemens TWIX (.dat) data. Gannet uses generalized
least squares1 to optimally combine the signal
from the multiple RF channels. If water files are provided, these data
will be used as references for signal weighting and phasing of the coil
data.
Eddy-current correction
Eddy-current
correction can only be applied if water reference data are provided.
In GannetPreInitialise.m, users have the option to apply
eddy-current correction (ECC) to metabolite and water data. If applied,
Gannet uses the method described by Klose (1990)2. The
code for the ECC routine can be found in
EddyCurrentCorrection.m.
Phase correction
It is common for unprocessed spectra to be out of phase. Gannet
applies a global zero-order phase correction to all transients by
fitting the real-valued 3 ppm Cr and 3.2 ppm Cho signals in the
frequency domain and correcting the phase to be 0° phase (i.e., to make
all the Cr and Cho peaks have positive phase). This is performed in
PhaseCorrection.m.
Line-broadending (apodization)
FID data are multiplied by a time-varying exponential weighting
function where the weighting constant is set in
GannetPreInitialise.m (3 Hz is the default).
Zero-filling
Gannet zero-pads all raw FIDs (i.e., adds zeros to the end of each
FID) to obtain a nominal spectral resolution (the resolution between
each frequency-domain data point) of 0.061 Hz/point. Differences in
spectral width and number of complex data points of the raw FIDs are
accounted for to obtain this nominal spectral resolution.
Frequency and phase alignment
During acquisition, spectral data are affected by frequency and phase
offsets as a result of biophysical, electronic, and participant factors.
Gannet has several algorithms to correct for these errors during
preprocessing. Users can choose which method to use in
GannetPreInitialise.m:
A method originally developed to align multiplexed
edited HERMES data. This approach is based on spectral
registration.
SpectralRegistrationHERMES.m
Robust spectral registration5
(the default and recommended)
RobustSpecReg
A method based on spectral registration that is robust
against spectral distortions caused by unstable residual water peaks and
lipid contamination.
RobustSpectralRegistration.m
Peak alignment
Cr, Cho, NAA,
H2O
Frequency-domain-based alignment using one of the
following peaks in each transient as the target signal: Cr, Cho, NAA, or
residual H2O.
AlignUsingPeak.m,
AlignUsingH2O.m
No alignment
none
Do not perform any frequency or phase alignment between
transients.
n/a
Signal averaging and subtraction
Gannet provides two methods for averaging individual transients
(selected in GannetPreInitialise.m): arithmetic averaging
(with outlier rejection) and weighted averaging (the default). The code
for the signal averaging routines can be found in
SignalAveraging.m.
Arithmetic averaging
Arithmetic averaging is straightforward. All subspectra for each
editing experiment \(x_m\) (e.g., all
edit-ON and all edit-OFF subspectra) are averaged using the arithmetic
mean: \(\bar{x} =
\frac{1}{M}\sum{x_m}\). The average difference between the
averaged edit-ON and edit-OFF spectra is then calculated to yield the
final difference spectrum: \(x_{DIFF} =
(\bar{x}_{ON} - \bar{x}_{OFF})/2\).
Note that before the arithmetic averaging of subspectra, individual
transients are excluded based on the outlier rejection algorithm used
during frequency and phase alignment.
Weighted averaging
Weighted averaging down-weights individual subspectra that are
corrupted by signal artifacts — this is an important distinction from
traditional signal averaging. As described in Mikkelsen et al.5,
for all subspectra for each editing experiment, a similarity matrix
\(\mathbf{D}\in\mathbb{R}^{M{\times}M}\) is
obtained by calculating the mean squared error between each real-valued
subspectrum and every other real-valued subspectrum (in the range 1.8 to
3.4 ppm). A similarity metric \(d\) is
calculated as the column-wise median of \(\mathbf{D}\). Normalized weights \(w_{m}\) are then derived, \(w_{m} = d^{-2}_m/\sum{d^{-2}_m}\), and
applied to the subspectra to give the weighted average: \(\bar{x} = \sum{w_{m}x_{m}}\). As above, the
difference is then taken to obtain the average difference spectrum.
Other algorithms to calculate weights can be found in
SignalAveraging.m. (Note: These have not been tested
extensively and should be used with caution.)
Residual water removal
If water_removal is set to 1 in
GannetPreInitialise.m (the default), the residual water
peak is removed from all difference spectra using an HSVD filter6.
References
1.
An
L, Willem van der Veen J, Li S, Thomasson DM, Shen J. Combination of multichannel single-voxel MRS signals
using generalized least squares. Journal of Magnetic
Resonance Imaging. 2013;37(6):1445-1450. doi:10.1002/jmri.23941
2.
Klose U. In vivo proton
spectroscopy in presence of eddy currents. Magnetic Resonance
in Medicine. 1990;14(1):26-30. doi:10.1002/mrm.1910140104
3.
Near
J, Edden R, Evans CJ, Paquin R, Harris A, Jezzard P. Frequency and phase drift correction of magnetic
resonance spectroscopy data by spectral registration in the time
domain. Magnetic Resonance in Medicine.
2015;73(1):44-50. doi:10.1002/mrm.25094
4.
Mikkelsen M, Saleh MG, Near J, et al. Frequency and phase correction for multiplexed edited MRS
of GABA and glutathione. Magnetic Resonance in Medicine.
2018;80(1):21-28. doi:10.1002/mrm.27027
5.
Mikkelsen M, Tapper S, Near J, Mostofsky SH,
Puts NAJ, Edden RAE. Correcting frequency and phase
offsets in MRS data using robust spectral registration. NMR
in Biomedicine. 2020;33(10):e4368. doi:10.1002/nbm.4368
6.
Barkhuijsen H, Beer R de, Ormondt D van. Improved algorithm for noniterative time-domain model
fitting to exponentially damped magnetic resonance signals.
Journal of Magnetic Resonance (1969). 1987;73(3):553-557.
doi:10.1016/0022-2364(87)90023-0