Tuesday 4 December 2012

Towards Gannet 2.0

Several things have come up that suggest the best way forward is to re-organise a lot of the code, and work toward Gannet 2.0. But for now, I am also working to maintain and improve the current Gannet version.  The most recent changes, in response to a major site visit hiccup, seem to be positive for Philips .sdat data but may potentially be negative for other data types.
One of the major changes in Gannet 2.0 will be that the workflow for different data types is integrated wherever possible.  This is likely to be challenging, jsut as the current edit, as changes for one datatype might adversely affect another. Things are likely to progress incrementally.

Monday 24 September 2012

Gannet Glitch Report

If you are considering downloading Gannet today, please wait a week. We have a minor issue that needs fixing (and I am out of the office).

It concerns a longer-term issue of 'Is the Off or the On spectrum acquired first?'. My general advice is Off first, but sometime data gets acquired On-first, and that requires a couple of minus signs to be added in... these have unfortunately seeped into the Master thread online. A better way to handle it would be to auto-detect whether on or Off are first - a longer project than the quick fix, and one for the future. I will post immediately that things are returned to normal.

Thursday 30 August 2012

New Gannet Functionality: Siemens Water reference

Following up from a user request and bringing it into line with the other vendors, Siemens data can now be analysed with a water reference (in addition to the Creatine reference previously used).  The syntax for this is:

MRS_struct  = GannetLoad({'OFF.rda' 'ON.rda'},{'water.rda'});
MRS_struct=GannetFit(MRS_struct);

The new code version can be downloaded from the link above left.

Thursday 31 May 2012

80 ms > 68 ms

With a strong sense of the robustness and reproducibility of GABA-edited MRS, we need a new experiment like a hole in the head. But the main limitation of standard 68-ms-TE acquisitions (and the main barrier to clear and precise interpretation of results) is the co-editing of macromolecular signal.  It is also an easy (and fair) complaint of reviewers that observed effects may be driven by the MM signal. So maybe there is room for improvement.

There are two ways to address MM: acquire a metabolite-nulled scan (as done in the original Rothman and Mescher papers); or use Henry's symmetric editing scheme.  Metabolite nulling has two main issues, adding noise to the GABA signal and invovling the subtraction of two scans that cannot be acquired in an interleaved fashion. The elegant symmetric editing scheme is not widely applied at 3T because of constraints on the length,  and therefore selectivity, of editing pulses that can be shoe-horned into a 68 ms TE. 

The slice-selective PRESS scan on which MEGA-PRESS is based typically has a minimum TE of 30-35 ms, due to limited peak B1 (~ 14 uT), the need for shaped RF pulses with 'rectangular' spatial profile and the inclusion of gradient pulses. Based on such a sequence, it is typical to use editing pulses of duration 14 ms for GABA editing in a TE of 68 ms.  14 ms pulses are insufficiently selective for symmetric editing, and suppression of MM results in suppression of GABA signal as well.

However, simply by increasing the TE to 80 ms (and there is surprisingly little downside to doing so), 20 ms editing pulses can be accommodated which allow symmetric suppression of MM. Bob is, as they say, your mother's brother.  Unfortunately now we need to spend a couple of years establishing the reproducibility and robustness of the 80 ms sequence... harumph.

(For the record, I should say that some Siemens scanners can do PRESS at much shorter TEs, being capable of 20 uT body coil RF.  On these scanners there is more room for longer editing pulses in a 68 ms acquisition and all this is irrelevant.)

All this is explained better, and more fully, in our forthcoming MRM paper.  Watch this space

Friday 18 May 2012

Simulations

Following an interesting chat at ISMRM, I was put onto NMRSCOPEB - a simulation package within jMRUI.  It is incredibly easy to install and start working with and after a half day of work, I have managed to modify their PRESS sequence to have editing pulses in it and produce the following...
Small steps, but a great new (to me) tool.

NMRSCOPEB outputs data in matlab format and works through simple code files and a great table-based GUI. It also has a bunch of spin-systems already saved (as per Govindaraju et al. for GABA). I am happy to share the sequence files with anyone interested.

****************************
Less Glowing Update
****************************
Following this up, I started trying to do simulations of spatial positions within the voxel (which is needed to get the right simulated spectrum.  There appears to be a bug in how NMRSCOPEB handles spatial information, so I would strongly recommend not using NMRSCOPEB for simulation of spectra for makeing basis sets etc, where spatial information is crucial. As a quick look-see is seems to be OK.

Wednesday 18 April 2012

Good Data, Bad Data

We are working towards quantitative metrics of data quality, but for now, a beginners guide to good and bad data.  This pdf shows the GannetLoad output of a good and bad dataset and highlights the things to look for.  As with all subjective judgements, there is no substitute for looking at lots of data and getting a feel for it. It is also useful to look in the literature for good spectra.

Friday 2 March 2012

Gannet Quick Start Guide

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.

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 water reference data have been collected:
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_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);

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.

Wednesday 22 February 2012

Gannet Beta version available through github

Gannet is now freely available through this link to github.Click on the GANNETMaster BETA Download.zip link. (This link allows me to log downloads).

Gannet:

  • analyses GABA-edited MRS data saved as GE P-file, Philips .data or .sdat, or Siemens .rda.
  • is designed for batch analysis of entire study datasets
  • is matlab-based 
  • saves pdf output showing each dataset.

This software is provided without warranty.

We are managing version control of the code through github which also allows downloads.  It may be possible to dowmload without signing in, but it might be worth getting an account if you intend to use Gannet, so you can watch the repository richardedden/GannetMASTER.


I will post soon about how to get started and will add some example data files.  The analysis code pulls a lot of information about acquisitions from the file headers, but some assumptions are made (based on our own defaults), for example about the ordering of OFF and ON within the data.

Monday 20 February 2012

GABA phantom recipe

It seems that there is some value in a standardized GABA phantom for cross-platform testing etc... This recipe is also a reasonable place to start if you want a 'will-work-without-much-thought' option.  Everything is available form Sigma Aldrich.

  • Container: 1 liter Nalgene bottle style 2125
  • Buffer: One PBS sachet P5368
  • GABA: 1.03 g (RMM 103.1) A2129 

Make up to 1 liter with deionized water.  pH can be adjusted using NaOH/HCl (but to a first approximation does not need to be).

Wednesday 15 February 2012

Setting up a MEGA-PRESS scan with the Philips patch

***These instructions are no longer current 9/2014***

These instructions are intended to help anyone with our patch get things set up for GABA editing. They are Philips- and patch-specific.


  1. Start with a short-TE PRESS scan
  2. In Initial, increase the TE to 68 ms.
  3. In Geometry, change the voxel size to ~3x3x3 cm^3.
  4. In Contrast:
    • Change Gradient mode to Maximum and PNS mode to high.
    • Select MEGA basic in BASING pulse options.
    • Pulse duration 14ms, freq1 7.46 ppm, freq2 1.9 ppm. [OFF first, edit 8/19/12]
  5. In Motion, set phase cycles and averages to 8, startup acquisitions 0 and turn off frequency correction.
  6. In Dyn/ang, Dynamic study individual, 40 dynamic scans.
  7. In Postproc, turn off spectral correction.
  8. Set up a separate non-water-suppressed PRESS scan for quantification relative to water.

Wednesday 11 January 2012

Beta versions of Gannet on the way

Over the Christmas period, John and Nick have ironed out some remaining discrepancies between Cardiff code and the master Gannet version, including handling transatlantic differences such as default units for output figures.

We anticipate that this will lead to a beta version of Gannet that will be made available here by the end of January, which will be publicised to our current collaborators and freely downloadable.