Back to the main page.

Bug 467 - EGI GSN electrode templates conflict with ft_senstype/ft_senslabel

Reported 2011-02-02 00:27:00 +0100
Modified 2011-03-16 18:04:17 +0100
Product: FieldTrip
Component: plotting
Version: unspecified
Hardware: Macintosh
Operating System: Mac OS
Importance: P1 normal
Assigned to: Jan-Mathijs Schoffelen
Depends on:
See also:

Matt Mollison - 2011-02-02 00:27:51 +0100

I'm using fieldtrip20110131. I tried switching to fieldtrip's 129 channel EGI GSN electrode template file (fieldtrip-20110131/template/GSN-HydroCel-129.sfp), but found an issue with rotation of multi and topo plots because fieldtrip wasn't recognizing the sensor type correctly (to have the nose plotted up, cfg.rotation should be 0, not 90 as ft_prepare_layout does with the 'electrode' case on line 706). Important: note that the electrode labels in all of the GSN files have capitalized "E"s before the actual electrode numbers. Here's what seems to be the problem: In ft_senstype (e.g., line 251), these labels (with capital "E"s) are compared to the output of ft_senslabel (cases for EGI electrodes are lines 2737-2759), which gives lowercase "e"s, and thus there is no match with ismember (in ft_senstype, line 251). Here's a solution: Either ft_senslabel needs to sprintf capital instead of lowercase "E"s (lines 2737-2759), or all of the GSN template files need to have lowercase instead of capital "E"s. Let me know if you don't think this is a problem, but there's clearly no way to match between the GSN file labels and the output of ft_senslabel since ismember (in ft_senstype, line 251) is case sensitive. Additionally, I don't think you control the electrode files and instead they come from EGI or BESA or something, but with the 3 fiduciary points in the GSN files (FidNz, FidT9, FidT10; which are just markers for the nasion and pre-auricular points), the plots in ft_multiplotTFR are not rendered correctly (they are tiny, too small to be seen). I guess it makes sense now why I've been using my own electrode template with lowercase Es and fiduciary points removed... :) back to my own file until this is fixed. Matt

Jan-Mathijs Schoffelen - 2011-02-02 16:32:21 +0100

Hi Matt, Thanks for reporting and already pointing to a solution. We will fix it a.s.a.p JM

Jan-Mathijs Schoffelen - 2011-02-11 12:27:37 +0100

Hi Matt, I changed the 'e' in ft_senslabel into 'E'. Hopefully, this already solves something. I don't really understand what's going on with the scaling, when the fiducials are taken into account. Need to check this. BW, JM

Jan-Mathijs Schoffelen - 2011-03-15 10:30:16 +0100

Hi Matt, I updated ft_prepare_layout leading to an improved size of the TFR boxes (basically forcing it not to look at the locations of the fiducial 'electrodes'). Will you let me know whether this change is sufficient for you in order to swap back to using the .sfp files from FieldTrip, rather than your own layout? Thanks, Jan-Mathijs

Matt Mollison - 2011-03-16 18:04:17 +0100

Hi Jan-Mathijs, I've verified that your change to how ft_prepare_layout deals with the 'Fid' electrodes now plots reasonably sized TFR (and ERP) boxes in ft_multiplotTFR (and ft_multiplotER). Now I'll use the FT .sfp electrode files. Thanks! Matt