Back to the main page.

Bug 2630 - implement ft_globalmeanfieldpower

Reported 2014-07-02 12:36:00 +0200
Modified 2014-07-10 09:58:17 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P5 enhancement
Assigned to: Jim Herring
Depends on:
See also:

Jim Herring - 2014-07-02 12:36:18 +0200

The global mean field power (GMFP) is a measure often used in combined TMS-EEG research that characterizes global activation in response to TMS in a reference free manner. GMFP, as far as I know, was introduced by Lehmann and Skrandies in: 1: Lehmann D, Skrandies W. Reference-free identification of components of checkerboard-evoked multichannel potential fields. Electroencephalogr Clin Neurophysiol. 1980 Jun;48(6):609-21. PubMed PMID: 6155251. as RMS(average reference). I believe it was termend GMFP in: 1: Esser SK, Huber R, Massimini M, Peterson MJ, Ferrarelli F, Tononi G. A direct demonstration of cortical LTP in humans: a combined TMS/EEG study. Brain Res Bull. 2006 Mar 15;69(1):86-94. Epub 2005 Dec 1. PubMed PMID: 16464689. GMFP basically is the root-mean-squared difference between voltages at each channel with the mean of all channels. On the implementation... -The GMFP is calculated on time-locked averages so it requires timelock data as input. The output data contains a single vector thereby losing channel information. -Plotting can only be done with ft_singleplotER as the data does not contain channels. Interactive plotting should thus be turned off. -Which name is best? ft_globalmeanfieldpower, or ft_gmfp. The first is clearer, but long. -A test script should be written (calculate & plot GMFP) -The TMS-EEG tutorial should be adjusted

Robert Oostenveld - 2014-07-02 14:37:01 +0200

I was not aware of it being done on average referenced data. I suggest to make that an option, and (if indeed according to the first papers) make avgref the default.

Robert Oostenveld - 2014-07-02 14:43:10 +0200

I also recall confusion about the naming: it is called GMF power, but it is not a squared measure. Some years back I implemented this for someone, where he explicitly desired (on the basis of literature) that it was squared. Please check in the original literature whether it is squared to not. I would consider GMF amplitude a better name if it is not squared. But I cannot argue against history. Also here: we can make a cfg.method = 'amplitude/power' option and explain them in the help.

Eelke Spaak - 2014-07-02 17:04:17 +0200

(In reply to Jim Herring from comment #0) So GFP = std(tl.avg)..? Does that warrant its own top-level function?

Robert Oostenveld - 2014-07-02 17:13:59 +0200

(In reply to Eelke Spaak from comment #3) it is a conceptual analysis step, so in the style of me explaining the "one-to-one mapping" between concepts and ft functions it fits in. Typically, it is the lesser experienced EEG users that know it and for them it might be difficult to write their own code. But more importantly, I don't like the manual code that is now in the tutorial. It is showing how to work around an omission in fieldtrip.

Jim Herring - 2014-07-03 16:53:08 +0200

Created attachment 646 RMS (Reference free)

Jim Herring - 2014-07-03 16:53:30 +0200

Created attachment 647 RMS (Average Reference)

Jim Herring - 2014-07-03 17:01:20 +0200

In the original article it is mentioned as a method to calculate field power, however the measurement is always called RMS (reference-free/average reference), it is never called 'global mean field power'. From the formula's (attached) you can see that the measurements are not squared, neither is it in the 2006 implementation of Esser et al. There, however, it is called 'global mean field power', I cannot find if it has been called that earlier. The 'reference free' version calculates the root of the mean differences between all electrode pairs, according to the author the second formula (the root of the mean differences between all electrodes and the mean) is exactly the same as the first formula but scaled by the number of electrodes. The second version (average reference) is the one implemented in Esser et al. 2006. It does not matter whether the data is rereferenced to the average, or not, I believe, because the formula does this by subtracting the mean (which should be 0 in case of the average reference).

Jim Herring - 2014-07-03 17:01:55 +0200

Created attachment 648 Global Mean Field Power (Esser et al., 2006)

Jim Herring - 2014-07-04 21:47:06 +0200

It is still a bit unclear to me about how implementing this function will affect other functions. Should gmfp/gmfa be a new datatype or should it fall under timelock, or can it remain unknown? In any case I will start making a test script of how the function could be used and how to plot the outcome.

Robert Oostenveld - 2014-07-07 16:47:27 +0200

(In reply to Jim Herring from comment #9) I think it can be a timelock structure containing one channel with the name "gmfp" or so.

Jim Herring - 2014-07-09 16:10:08 +0200

I've added test_ft_globalmeanfieldpower and ft_globalmeanfieldpower. Adding ft_globalmeanfieldpower.m Adding test/test_ft_globalmeanfieldpower.m Transmitting file data .. Committed revision 9713. However, although I have implemented the option to choose between 'power' and 'amplitude' I believe this will cause confusion. As the measure is historically called gmf power, the users might incorrectly believe they should choose the 'power' option to calculate gmfp, while actually the 'amplitude' method calculates the measure described in Esser et al., and Lehmann and Skandries. I could imagine that we could try to educate our users by calling this function ft_globalmeanfieldamplitude, with cfg.method defaulting on amplitude and state in the help that this measure calculates what is sometimes referred to as GMFP, but since it is not a power-measure, we call it amplitude. If the users then indeed wish to calculate power, they can specify cfg.method = 'power'.

Robert Oostenveld - 2014-07-09 16:15:49 +0200

(In reply to Jim Herring from comment #11) could we call the function ft_globalmeanfield?

Jim Herring - 2014-07-09 17:14:31 +0200

Sure, it will still be confusing that you need to specify cfg.method = 'amplitude' to get the measure referred to as gmfp so I will have to be clear in the help/documentation.

Jim Herring - 2014-07-10 09:58:17 +0200

I've renamed them to ft_globalmeanfield (including the test script) Adding ft_globalmeanfield.m Adding test/test_ft_globalmeanfield.m Transmitting file data .. Committed revision 9718. Deleting ft_globalmeanfieldpower.m Deleting test/test_ft_globalmeanfieldpower.m