Wednesday 18 December 2013

Gannet Quick Start Guide: Again

0.   Get Matlab with Optimisation and Statistics Toolboxes

1.       Get the code from github and add these files to your matlab path
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.
 The Link top left for Gannet 2.0 BETA takes you to github.
2.       What do I type?
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.
2.1.    GE data
P files contain a water reference internally, so:
MRS_struct  = GannetLoad({‘GE_data1.7’});
MRS_struct  = GannetFit(MRS_struct);

2.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:
MRS_struct  = GannetLoad({‘Philips1.sdat’},{‘Philips1_water.sdat’});
MRS_struct  = GannetFit(MRS_struct);

2.3.    Philips .data files
If no water reference data have been collected:
MRS_struct  = GannetLoad({‘Philips1.data’});
MRS_struct  = GannetFit(MRS_struct);
If SEPARATE water reference data have been collected:
MRS_struct  = GannetLoad({‘Philips1.data’},{‘Philips1_water.data’});
MRS_struct  = GannetFit(MRS_struct);
For newer patch versions, the water data is in the same .data file, so use the first option.
MRS_struct  = GannetLoad({‘Philips1.data’});
MRS_struct  = GannetFit(MRS_struct);
2.4.    Siemens .rda files (saved as OFF and ON rda files separately)
MRS_struct  = GannetLoad({'Siemens1_OFF.rda' 'Siemens1_ON.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 files (assumes Jamie Near's implementation)
             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);


3.       Data Formats
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.



4.       Assumptions

The formatting of data within the data files is assumed to be the  same as for ‘our’ implementations on Philips and GE, whereas we handle Siemens outputted data that have already been processed into a single data file.  If you are using this software to process your own implementation of GABA-edited MRS, please contact us.

5.       Batch Processing
If you want to batch process files, simply add more that one filename string into the cell arrays, e.g.:

MRS_struct=GannetLoad({'gaba1.dat' 'gaba2.dat'},{'water1.dat' 'water2.dat');