Vous êtes sur la page 1sur 19

MANUAL FITTING OF 1H-MRS SPECTRA

AT CONVENTIONAL AND HIGH MAGNETIC FIELD STRENGTHS


A STEP-BY-STEP APPROACH USING FITMAN

Denise Bernier and Xiaowei Song

PART I. Manual fitting of the 3 main peaks


1. Pre-processing of raw data
1.1 Transforming 1.5 T GE P .7 files into a format that fitMAN can read:
In a terminal window, navigate into the folder where the P .7 file to be converted is located.
Convert the raw data format using the program ge2fitman:
$ /home/denise/fitMAN_v1/bin/ge2fitman infile name outfilename
(do not put a space or a dot in the outfilename; e.g.: sdtD11a_p54272)
A prompt will appear, asking whether suppressed and/or unsuppressed files to be created:
Choose both types of files, by typing b / OK
This process has created two files, located in the original P .7 folder:
a) rescode_pfilenumber_s.dat (contains the metabolite peaks and the residual water peak)
b) rescode_pfilenumber_uns.dat (contains the metabolites and the large unsuppressed water peak)
(e.g. sdtC01a_p22016_s.dat)

1.2 Visualizing the spectrum using fitMAN:


Opening fitMAN:
Open a terminal.
In the same terminal window, navigate into the folder where fitMAN_v1 is located.
$ cd fitMAN_v1
$ idl -vm
A new window appears: Click once in that IDL window.
another window opens (called: "Please select IDL save file").
Directory path: /home/denise/fitMAN_v1/
Filter: *.sav
In Files, double click on: fitMAN_Suite1.7.sav
another window opens (called FitMAN Suite)
Visualizing the .dat files created in step 1.1:

Right click in the Middle View of the fitMAN window in order to activate that view
File, Data
a window opens, called "Please select a file for reading"
In the Directory box, the path should be:
/home/denise/fitMAN_v1.0/fitMAN_Documentation
(Note: if default directory is wrong: click on Options in the fitMAN Suite window,
and set default directory to: /home/denise/fitMAN/fitMAN_Documentation / OK)
In Directories, navigate into the folder where the P .7 file is located
In Files, double click on the _s.dat file created in step 1.1
The file will appear in the middle view, in the Time domain
Domain
Frequency
While the spectrum is in the Frequency domain, record how large is the
bandwidth. We need this information to calculate the dwell time, which is 1 over
the bandwidth.
For example, if the spectrum bandwidth is 2,500 Hz (cycles per sec), dwell time
will be 1/2,500 or .0004 seconds, or .4 milliseconds (ms).
Record this information.
Still in the Frequency domain, we need to evaluate whether a zero order phase
correction will be sufficient for all the peaks to be aligned. Use the cursor just
above Phase (Degrees) on the left side of the window to evaluate if the all peaks
can be aligned perfectly.
Record how many degrees are required for a good alignment.
If this phase adjustment produces adequate alignment, the Time Delay will be 0
when we will apply corrections in step 1.3.
If the Phase (Degrees) cursor does not get a good alignment of all the peaks, it
means that a 1st order phase correction is required. To visually evaluate in the
Frequency domain how many points at the beginning of the FID will need to be
cut off for all the peaks to be aligned, use FT 1 (s) and increase the value by
increments of dwell time, till all the peaks are perfectly well aligned in the middle
view of the fitMAN window.
If a change in FT 1 was required for the peaks to be aligned, record how many sec
were required. That information will be required for the Time Delay when
creating the _convert files.
Domain
Time
Looking at the spectrum in the Time domain, we first inspect the end of the FID.
If the tail is free of artifacts and shows only narrow, regular noise, it means that it
will be appropriate to apply a Baseline Correction during the conversion step that
will be performed in step 1.3.

3
In the Time domain, we also need to determine the Junction Point on the x-axis,
between the area that will undergo quality deconvolution (QUECC), and the area
for eddy current correction (ECC). We can zoom on the baseline for a better
assessment of where the signal has almost disappeared and almost only noise is
left. Choose this point conservative: make sure that there is a tiny bit of signal left
at the cut off point.
For example, if the junction point is evaluated to be .09 sec or 90 millisec,
junction time divided by dwell time will be: 90 ms / .4 ms = 225 Quality points.
Record this information; it is required in step 1.3.
We can also determine right away which part of the FID tail will not be necessary
to include in the fit. That point will likely be a little greater than the one
determined for the junction point because here, we want to make sure that all the
signal will be included in the fit, while still excluding this part of the tail that
obviously represents only noise.
For example, if the cut off point for the fit is determined to be .35 sec, 350ms / .4
ms = 875 data points to be included in the fit.
Record this information.

1.3 Applying corrections to the spectrum, prior to generating the fit


View, Clear all windows
File
Convert raw data (A new window opens, called: "Convert Raw Data")
By Input Filename, click on Browse
In Directories, navigate to find the folder where is located the P .7 file to be converted.
In Files, select the original P .7 file to be converted (Denise: We should use a later
version of the procedure that specifies the exact files names from 4T, e.g., sup-sum1
unsup-sum1, etc)
This P .7 file name will appear simultaneously in the Input and Reference files boxes.
By Output Filename, click Browse
In the new window, type in the outfile name in the Selection box at the bottom:
rescode_pfilenumber_convert (e. g.: sdtC01a_p22016_convert)
OK
GE is enabled; Verbose is enabled; Overwrite is enabled (this is only necessary if you
are re-doing this step in the same spect); Scale Factor is 0; Input file byte swap is at
Detect, always; Baseline correction: Yes; Auto Filter is enabled; QUECC is enabled;
IR: Options INcluded is enabled.
By Reference File, the P .7 input file that was selected in the upper part of the window is
supposed to be already showing up in the box. If it is not the case, re-do the input file procedure
and make sure that the input file selection is done appropriately.
Scale Factor: 0; Reference file byte swap is at Detect, always; Baseline correction: Yes;
Auto Filter and Normalize are enabled; Filter: 0; Time Delay: 0 (if only 0 phase order

4
correction was necessary); Quality Points: enter the Junction Point (time in ms/dwell
time) calculated in step 1.2.
OK
This process has created two files, located in fitMAN_Documentation:
rescode_pfilenumber_convert_s.dat
rescode_pfilenumber_convert_uns.dat
e. g. : sdtC01a_p22016_convert_s.dat
At this point, we can open the header of the .dat files, in order to record information that will be
required for the .xls sheet in step 3.
In the Finder, highlight each .dat file, open with Text Editor (emacs is good), and record the
conversion scaling factor and the receiver gain for each of the _s.dat and _uns.dat file:
It can be useful to also record date and time of MRS acquisition, ROI position (P1, P2, & P3) and
volume (V1, V2, & V3).
To view the corrected spectrum:
Right click in the Middle View of the fitMAN window
File, Data, Select the _convert_s.dat file / OK
It will appear in the Middle View, in the Time domain
The _convert_uns.dat file will be used later in step 2.2.

1.4 Removal of the residual water peak, prior to generating the fit
Since fitting occurs in the Time domain, signal representing each spectral component is present
throughout the Time domain signal. Therefore, it is necessary to remove the residual water signal
before performing metabolite fitting with prior knowledge.
Already loaded: the file rescode_pfilenumber_convert_s.dat
Domain, Frequency
Arithmetic,
HSVD Water Removal
OK
Let it work. This will subtract the peaks within a limited range, surrounding the water resonance.

**Save the file:


Right click in that window, File, Save Active Window
In the Selection box, type in a name for the file:
rescode_pfilenumber_noRwater_s / OK
At this point, we have a clean spectrum.

2. Fitting
Following water removal, the spectrum is now ready for fitting.
Fitting is accomplished incorporating prior knowledge of metabolite lineshapes.

2.1 The spectrum


2.11 Loading Guess & Constraints files for the spectrum
(which files are the prior knowledge for fitting the data)
A .cst file is a text file that contains all the linking information for each metabolite
(e. g. relative positions, amplitude and width). This is our prior knowledge
template; this information comes from in vitro solutions of metabolites.
A .ges file is a text file that contains all the initial value estimates for the
parameters listed in the .cst file. We can modify these values on an individual
basis for each spectrum.
The purpose of the .ges file is to approximate the correct fit so that the automated
fitting algorithm has an easier time. The most sensitive parameter that requires a
fairly good adjustment is the shift. The amplitude, width and phase parameters are
more robust and require the least modification. The .ges file contains starting
values for each parameter defined in the .cst file, which values we can modify by
trial and error in order to determine the best fit values for each parameter of the
actual spectrum to be fitted. The values in the .ges file are all in the Time domain;
however, the view in the fitMAN window, used to approximate the best fit, is in
the Frequency domain. Thus, there is no direct correspondence between what we
see in the fitMAN window and the parameters that we change in the .ges file.
Load rescode_pfilenumber_noRwater_s.dat
Domain
Frequency
Load Constraints file: File, Constraints, 3peak.cst / OK (will appear in blue)
Load Guess file: File, Guess, 3peak.ges / OK (will appear in red)
To see if the fit is good, we can zoom in.
The fit needs to be close, but doesn't need to be perfect.
The most important parameter to get close is the shift. The amplitude is very
robust; the width also. But if the shift is off, that means trouble for later fit.
If the shift is off, we need to change the parameters in the .ges file:
In the Finder, open the 3peak.ges file with a text editor.
We can change variables values under shift and under amp to bring the fit into
better alignment with the data. The 1st row is Cho, 2nd is Cr, 3rd row is NAA.
Continue to adjust parameters until an adequate match is obtained.
Record the fit parameters used.

6
When variables have been changed,
save .ges file and return to window Fitman Suite
zoom out, click File, and Reload .ges file.
Finally, we need to determine the range of the FID that will be used for the fit.
The cut off point at the tail of the FID has been determined in step 1.2.
The cut off point at the beginning of the FID still needs to be determined.
To make that decision, the FT1 (s) parameter can be changed by increments of dwell time, till there is
enough cleaning up of macromolecules and artifacts, but still enough signal to noise ratio left.
e.g. FT1 (s) could be changed to .0004sec, then .0008, .0016, .- till you are satisfied with the output
visualized in the Middle View. When the decision is made about how many sec should be cut off from
the beginning of the FID, calculate how many data points those seconds represent, and
Change the range in the 3peak.cst file. Save the file, and record the new parameters used for that fit.
e.g. For my data, FT1(s) is usually best at .0296 sec (or 29.6 ms or 74 data points).
However, we could try to go up to as much as .037 sec (37 ms).
For my data, FT2 (s) is usually around .3 sec (or 300 ms or 750 data points).

2.12 Fitting the spectrum


Already loaded: _noRwater_s.dat, 3peak.cst, 3peak.ges
File, Generate Fit:
a window called Fit will appear.
By File to Fit, click on Browse, select rescode_pfilenumber_noRwater_s.dat / OK
By Output File, click on Browse
In Selection box, type output file name: rescode_pfilenumber_fit.out
OK
OK
To view output file:
Keep the 3 working files into the middle window
click File, Output, and select the .out file just created / OK
As you click on OK, keep your eyes on the spectrum and look for a change on the previous guess
when the fitted spectrum appears in the window; that change will reassure you that the fit really
occurred.
However, the naming of the file on top of the fitted spectrum will not change. The naming
_noRwater_s.dat file will still show on top of the fitted spectrum.
Above Phase (Degrees), drag the cursor for a better alignment of the peaks.
For a .jpg image of the _fit.out file: File, Save Window to Image File: rescode_pfilenumber_fit.jpg

2.2 The large unsuppressed water peak + metabolites file


2.21 Loading Guess & Constraints files
Fitting the unsuppressed water signal is required if the water signal is to be used as an internal
standard.
View,
Clear all windows
Load rescode_pfilenumber_convert_uns.dat / OK (a yellow line appears in the Time domain)
Click File,
Constraints, load Human_water.cst, OK (a blue line appears)
Click File,
Guess, load Human_water.ges, OK (a red line appears)
Edit the Human_water.ges file through Text Editor and adjust its amplitude value equal to
intersection of water peak line (yellow) with the y axis as visualized in the Middle View
using the Time domain. Zoom on the y axis for more precision on that value (3 decimals).
Enter that value into the guess file, under "Amp".
Then, adjust the WL value on the guess file, so that the fit looks good when visualized into
the fitMAN suite window.
Note: While fitting the water peak, the "Reload Guess File" doesn't work in the Time domain; we use
File => Guess again.

2.22 Fitting the water peak


Once a good guess is achieved with the Amp and WL values,
File, Generate fit
By File to Fit: click Browse,
Select rescode_pfilenumber_convert_uns.dat / OK
By Output File: click Browse,
In Selection box, name the output file: rescode_pfilenumber_waterfit.out / OK
To see output: File, Output, select the _waterfit.out file.
Create a .jpg image of the waterfit.out file if you wish:

File, Save Window to Image File.

At this point, we can open the_waterfit.out file with a text editor, and record the following
information that will be required in the .xls sheet in step 3:
Width_L (Hz):
Amplitude:

3. Summarizing Results in Excel


Transfer from Linux into Windows and open (and click on Enable Macros):
PC_fitMAN_data_compile_3Peak_macro.xls
fitMAN_data_summary.xls
A folder containing all the _fit.out files

Open the spreadsheet containing the information that was recorded from:
rescode_pfilenumber_convert_s.dat
rescode_pfilenumber_convert_uns.dat
rescode_pfilenumber_waterfit.out

Open the spreadsheet containing the fractional content of each tissue type in the ROIs.

Go into the file fitMAN_data_summary.xls


Insert a new row clicking in the A column, under Volunteer.
(A new row must be created for each ROI)
Verify that the formulas are enabled for new rows.

Entering information
From the _convert_s.dat file and from the recorded information during fitting:
AQ:
AR:
AS:
AV:
AW:
AY:
AZ:

enter the name of the _s.dat file in the Suppressed Filename cell
enter the name of the _convert_s.dat file
enter QUECC points/delay used when creating the _convert files
Gain (e.g.: 145)
NT (or NEX)
Machine Scaling factor
Conversion Scaling factor

From the _convert_uns.dat file:


BA:
BC:
BD:
BF:
BG:

enter the name of the _convert_uns.dat in the Unsuppressed Filename cell


Gain
NT (or NEX)
Machine Scaling factor
Conversion Scaling factor

9
From the _waterfit.out file:
BH:
BI:

FWHM (Hz)
Amplitude or area

From the spreadsheet with tissue type classification of ROIs, enter:


BJ:
BK:
BL:

CSF fractional content in the ROI


GM fractional content in the ROI
WM fractional content in the ROI

Always stay the same:


BM:
BN:
BO:

FW H2O = 18.0152 (the formula weight of water: the atomic weight of oxygen and two hydrogen atoms)
Density at 38C = 0.99299
H2O at 38C = BN / BM

Entering metabolite concentration values


Scroll
Click
Select

to the cell titled Amplitude Cho (or BS cell).


Tools
macro
macros
PC_fitMAN_data_compile_3Peak_macro.xls
If the above macro does not show in the macros window, verify that the _macro.xls file is open)

Click

Run
Another window opens:
navigate into the folder with all the _fit.out files,
select the appropriate rescode_pfilenumber_fit.out file
Click Open.

Will be calculated automatically:


The adjusted metabolite concentration values:
Absolute Cho
Absolute Cr
Absolute NAA
The ratios of metabolites over Cr and over Cho.

10

Part II. Manual fitting of 4 Tesla 1H-MRS data

RAW
sup_sum1.fid
(Rename)
=> id_full_sup128.fid
Metabolites + macro

RAW
sup_sum2.fid
(Rename)
=> id_macro_sup128.fid
Macromolecules

RAW
unsup_sum1.fid
(Rename)
=> id_water_unsup8.fid
Reference water file

RAW
Just for viewing prior to converting
(Run Convert)
=> id_full.dat (Disable baseline correction and reference)

id_full_sup128.fid + id_water_sup8.fid
(Run convert)
=> id_full_convert400_s.dat
=> id_full_convert400_uns.dat

id_macro_sup128.fid + id_water_unsup8.fid
(Run convert)
=> id_macro_convert400_s.dat
=> id_macro_convert400_uns.dat

2
Fitting the macromolecules:
id_macro_convert400_s.dat
(Run HSVD fit, 256 points, 20 peaks, scaling is 1)
=> id_macro_convert400_fit256.dat
Save active window

Subtracting the macromolecules:


Top panel:
id_full_convert400_s.dat
Middle panel:
id_macro_convert400_fit256.dat
(Run Subtract: Manual/no scale;
scaling may need to be either 0.12 or 1.2)
Bottom: =>
id_full400_noMacro.dat
Save active window

4
Removing the residual water peak:
id_full400_noMacro.dat
(Run HSVD water removal, xx points, 35 peaks)
=> id_full_HSVD400.dat
Save active window
6
Generate fit of water file:
id_full_convert400_uns.dat
Human_water.cst
Human_water.ges
(Generate fit)
=> id_VOI_waterfit850.out
Save a .jpg image of the fit
Save the .cst and .ges files

5
Generate fit of metabolites:
id_full_HSVD400.dat
Human_vivo.cst
Human_vivo.ges
(Generate fit)
=> id_VOI_fit850.out
Save a .jpg image of the fit

Enter data in data_summary.xls


(Enable PC_compile_macro.xls):

_convert_s.dat
_convert_uns.dat
_fit.out
_waterfit.out

11

Manual fitting of 4 Tesla 1H-MRS data


Three output MRS files are required for the fit
Suggested re-naming:

Scanner output:

id_full128_sup.fid (metabolites + macromolecules + residual water)


id_macro128_sup.fid (macromolecules, water suppressed)

sup_sum1.fid
sup_sum2.fid

id_wtr8_unsup.fid (reference full water peak for the 2 files above)

unsup_sum1.fid
unsup_sum2.fid

1st step: converting 4T vnmrJ format spectra into fitMAN format


cd fitMAN_v1
idl -vm
click on the latest fitMANSuite.sav file
a fitMAN window will open
First, have a look at the raw data,
File => Convert raw data
Click on Varian
input file:
id_full128_sup.fid
output name: id_full128.dat
Disable QUECC by enabling 'None'
Decide Delay time, Quality points, and Baseline correction (dwell time is .0005 sec or .5 ms).
Then convert the raw data:
File => Convert raw data
Click on Varian
input file:
id_full128_sup.fid
output name: id_full128_convert400
Use baseline correction and QUECC
reference file: id_water8_unsup.fid
use baseline correction; usually, Delay at 0 and Quality points at 400
This process has created two files:
id_full128_convert400_s.dat
id_full128_convert400_uns.dat
Now, the same 'convert' process has to be performed with the macromolecules file:
File => Convert raw data
Click on Varian
input file:
id_macro128_sup.fid
output name: id_macro128_convert400

12
use baseline correction
reference file: id_water_unsup8.fid (unsup_sum1.fid)
use baseline correction; Delay at 0 and Quality points at 400
This process has created two files:
id_macro128_convert400_s.dat
id_macro128_convert400_uns.dat

2nd step: fitting the macromolecules spectrum


Why do we fit the macromolecules spectrum? The HSVD-fit algorithm is a very precise mathematical fit.
The algorithm will identify the peaks above the level of noise and will reproduce them without the noise.
The only prior knowledge used is the Lorentzian line shape for the peaks. The following parameters are
not linked, but completely independent: Amp, Pos, phase, and width. Fitting the macromolecules
spectrum will help SNR when subtracting from the full spectrum. It reduces the random error by a factor
of 2. However, the accuracy of the final fit is not improved whether this algorithm is used or not.

Load
id_macro128_convert400_s.dat on the top panel and on the middle panel of the fitMAN Suite.
(Working in the Frequency domain)
Click into the middle window to activate it.
Arithmetic => HSVD fit
use 256 data points
disable SRSV Auto Detect: 35 Values (peaks) will appear in the SRSV box
set the SRSV box to 20 peaks (fewer peaks is better than more because
at one point it would start fitting the noise)
That step created a fitted macromolecules spectrum in the middle window.
Save that file:
Activate middle window
File => Save Active Window: id_macro128_convert400_fit256.dat
In order to see if the macromolecules fit is good:
Activate the middle window (the fitted macromolecules file)
Arithmetic => Subtract: Manual / no scale
(the Scaling factor is 1, as shown on the terminal window)
The bottom panel will show the residuals (acquired minus fitted),
which should only be regular noise.
Activate the top panel and set EF at 5 in order to visually evaluate the correspondence
of the macro peaks between the 2 top files.

13

3rd step: subtracting the fitted macromolecules from the full spectrum
Compare the Conversion scaling factors of these two files (open each file and look at ConvS):
id_full128_convert400_s.dat
id_macro128_convert400_fit256.dat
Differences in scale between the two files must be taken into account during the subtraction process.
For our test data:
The conversion scaling factor was 1.00e -04 for the id_full_convert400.dat file
and it was 1.00e -03 for the id_macro_convert400_fit256.dat file.
It's the macromolecules spectrum that is being re-scaled to the full spectrum or to put this another
way, the scaling factor is applied to the macromolecules file.
Load
id_full128_convert400_s.dat in the top panel
id_macro128_convert400_fit256.dat in the middle panel
Arithmetic => Subtract: Manual / no scale
Scaling factor is usually 1.2 at 4T (when both files have the same ConvS
factor) but for our test data here, it will be 0.12
The output of the subtraction will show in the bottom panel.
Save the output file:
File => Save Active Window: id_full128_noMacro.dat

4th step: removal of the residual water peak


Load
id_full128_noMacro.dat
Arithmetic => HSVD water removal; disable SRSV Auto Detect; leave Values at 35 peaks
Let it process for a while
Save the output file:
File => Save Active Window: id_full128_HSVD512.dat
At this point, we have a clean metabolite spectrum, ready for fitting.

14

5th step: fitting the clean metabolites spectrum


(See Appendix 2 for more detailed information)
Load:
id_full128_HSVD512.dat
The NAA peak can be re-localized at 2.01ppm using View => Offset Modification.
The SNR can be calculated at this point if needed.
Set FT (2) according to the best cut off point of the FID tail (assessed visually in the frequency
domain); e.g., FT (2) = .2 sec if range of fit is 400 data points: .2sec / .0005 sec = 400 pts.
EF (exponential filter) can be used to decrease the noise for a better visual assessment of the spectrum
if needed; e.g. the value can be put at 4.000.
FT (1) can be used to ignore a few initial data points in the FID, in order to help visualize the spectrum
with all the peaks well aligned (e.g. it can be set at .0005 to ignore one initial data point or at .001 for
two points, assuming that dwell time is .0005s).
Using the cursor Phase (Degrees), the phase can be adjusted for a better alignment of the spectrum.
Adjust the Range of fit in the .cst file to be used for the fit of the FID:
Open:
Human_vivo.cst and adjust the Range
e.g. if ignoring two initial data points (FT (1) = .001s) looked better when visualizing the FID
just above, then set the .cst range for the fit at 3 to 400 (based on FT1 and points to fit).
Guessing of fit parameters:
Load:
Human_vivo.cst into the same panel where the id_full_HSVD512.dat file is already loaded.
Load
Human_vivo.ges into the same panel.
Visualize the initial fit of the .ges line (red) with the data (yellow), with the idea of re-adjusting the
values of the parameters in the .ges file.
Open the Human_vivo.ges file and re-adjust the parameters for a better fit of the guess with the
spectrum.
All the parameters are linked in the original .cst file; thus, changing one of them in the .ges file will
affect all the others at the same time.
As well, we are fitting all the peaks together; so we have to make an overall assessment of the whole
spectrum altogether in order to adjust the .ges values.
Amp =>The amplitude for the guess peaks. Can be adjusted.

15

D => The delay time for the fit.


It can be changed by increments of dwell time.
Usually no more than 3 initial data points will be ignored.
It will help getting a straight baseline and a good alignment of the peaks / a better shape
of the spectrum.
Pha =>The phase of the guess spectrum. The units are radians.
That's a difficult thing for the algorithm to fit.
Pay attention to make a close guess here.
WL =>The line width. Can be adjusted to fit the data.
Pos =>The shift of the guess peaks. A close guess has to be done here as well.

6th step: fitting the water file


Load
id_full128_convert400_uns.dat
Load
Human_water.cst
Human_water.ges
On the Y axis, find the amplitude of the water peak (Time domain).
It can also be found in the .dat file (the first data point).
Open
Human_water.ges
adjust the Amp value
adjust the WL value
adjust the Shift if need be
adjusting the Phase is probably not necessary.
Save the .ges file
Reload, visualize, and re-adjust for the best fit
When the best fit is achieved
File => Generate fit
input file: id_full128_convert400_uns.dat
output name: id_ROIname_waterfit1-400.out

16

7th step: entering the data into the .xls summary spreadsheet
The required files:
id_ROIname_fit.out
id_ROIname_waterfit.out
id_full_convert400_s.dat
id_full_convert400_uns.dat
fractional content of each tissue type within each spectroscopic volume of interest
fitMAN_data_summary.xls
PC_fitMAN_data_compile_macro.xls

See pages 8-9 for practical details on how to enter the data.

17

Appendix 1
How to calculate the S/N ratio with fitMAN
We load the id_full_wtrRem400.dat file with the goal of assessing the SNR before fitting the data. No
.ges or .cst file in the panel.
Work in the Frequency domain.
The SNR is defined as the maximum amplitude of the NAA peak (as an example peak) divided by the
SD of the noise in the frequency domain.
Don't use the noise filters (EF & GF); they must be set at zero.
1) Set Phase Degrees properly.
2) Adjust FT(1) according to the numbers of initial points that will not be included in the fit. Also
adjust FT(2) according to the end of the FID that will be used for the fit.
3) Visualize the spectrum. Units of the X axis are in Hz (units => Hz). The line of the noise should be
at 0 on the Yaxis. If that's not the case, ignore 1-3 initial data points using FT(1).
4) Statistics => Standard Deviation: a new window appears and shows the loaded spectrum along with
a list of parameters that can be used for calculations.
5) Zoom onto the NAA peak if that's the one you're interested to calculate. In the box Minimum
Frequency, enter the minimum value in Hz that includes the NAA peak region on the X axis. Into the
Maximum Frequency box, enter the maximum Hz value that covers the NAA peak region on the X
axis.
6) Press the Calculate button. Read and record the Max Real Value of the NAA amplitude.
7) Repeat these procedures (4 & 5) selecting a noise region aside the metabolite region.
Press the Calculate button. Read and record STD Dev Real, which is the SD of the noise.
8) Using a calculator:
SNR = Max Real Value from the NAA peak (e.g. .003) / Std Dev Real of the noise (e.g. 2.19501e-05)

18

Appendix 2
A flexible framework to have in mind while adjusting the guess parameters values:
Once the id_full_HSVD512.dat file, & the .cst and .ges files have been loaded in the middle panel:
1) Phase. While the spectrum is zoomed out for an overall assessment of the whole dataset, adjust the
phase of the yellow line (acquired data) using Phase Degrees and FT(1). That's for a visual assessment
on the screen.
E.g., FT(1) can be put at .0005s for adjusting the baseline of the .ges file.
2) Phase.
Open the .ges file and adjust the phase of the red line (guess). It needs to be very close to the acquired
data.
These units are in radians; e.g. pha value could be set at 1. Save the .ges file and reload.
3) Shift.
If this has not been done before: in order to have a good location on the X axis for the spectrum peaks,
go in View => Offset modification; a new window appears. Double click on the NAA peak and input
the ppm value of 2.01 in the box. OK.
Then zoom twice into the metabolite region for a closer assessment of the peaks. Look at the shift of
all the peaks as a whole. In the .ges file, re-adjust the pos value for a closer guess of the shift for all the
peaks together.
4) Width. The width Lorentzian (WL) could be adjusted in the .ges file for a better guess if there is an
important discrepancy between the red line and the yellow line.
5) Amplitude. The amplitude of the peaks can be re-adjusted in the .ges file for a closer guess; e.g. amp
can be set at .45.
6) Phase. Back into assessing the phase again in the .ges file, for polishing the guess of this important
parameter. e.g. pha could be re-set at 1.2 or 1.4.
When the best guess is achieved:
Save the .ges file and reload again.
Adjust the range for the fit in .cst file according to the number of data points ignored at the
beginning of the FID (the FT(1) adjustment) and cut off at the end of the FID (FT(2)
adjustment.
Generate the fit:
File =>Generate fit
input file: id_full_HSVD512.dat
output name: id_VOIname_fit1-400.out
OK
Visualize the output file (File => Output) and re-adjust Phase (Degrees).
If that first try at fitting the data does not yield the best fit, re-do the whole process again, this time
using the parameters of the id_VOIname_fit1-400.out file as a starting point.

Vous aimerez peut-être aussi