Thursday 27 March 2014

NEW Gannet functionality: Saving the GannetFit output structure

Until now, it has been necessary to use matlab's save function to manually save the MRS-struct after a batch analysis.  This is fine, but easily forgotten, and re-doing full analyses can take time for large datasets.  Equally, saving the structure for every analysis gets tiresome and datasome.

Now we have added MRS_struct.p.mat which is set in GannetPreInitialise.m as a binary switch, to decide whether or not to save the MRS_struct as MRS_struct.mat.  If set to 1, the output is saved to the GannetFit folder.  NOTE that the folder is date-stamped but the filename is fixed, so analyses run on separate days will be kept separate, but analyses run on the same day in the same working directory will over-write the .mat file output.

PaperPlot just got better!

PaperPlot now supports three input formats:

PaperPlot(MRS_struct)
This will plot the spectrum and best-fit model for the first dataset in your structure.

PaperPlot(MRS_struct.spec.freq,MRS_struct.spec.diff)
This will plot the GABA MRS spectrum for the x and y values specified.

and
PaperPlot(MRS_struct.spec.freq,MRS_struct.spec.diff,plot_options)
As with the second option, it is possible to also specify plot options e.g. 'k' for black lines, as accepted by matlab's plot function.

To save for publication, save the matlab figure as .eps format.  Vector graphics saved as pdf do not come out right.  Then edit in Adobe Illustrator...

Tuesday 25 March 2014

NEW Gannet functionality: PaperPlot


PaperPlot is a helpful tool for plotting isolated spectra for publication.

The syntax is:

PaperPlot(MRS_struct.spec.freq,MRS_struct.spec.diff,'k')

This will plot a tidy spectrum from 0.5 ppm to 4.5 ppm, with reversed "MRS" ppm axis and no y-axis values.  To save for publication, save the matlab figure as .eps format.  Vector graphics saved as pdf do not come out right.  Then edit in Adobe Illustrator...