Back to the main page.

Bug 2672 - Neuromag EEG layout for distribution / documentation

Status NEW
Reported 2014-08-07 17:58:00 +0200
Modified 2014-09-24 13:36:23 +0200
Product: FieldTrip
Component: documentation
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P5 enhancement
Assigned to: Jim Herring
Depends on:
See also:

Stephen Whitmarsh - 2014-08-07 17:58:42 +0200

The neuromag system can also record EEG but there is no existing layout in FT. Also, electrode labels are named numerically ('EEG0111') and therefore do not correspond to the existing elec1005.lay, although our (Easy)caps follow the 5% system. I've therefor created neuromag128eeg.lay (attached). It is as little bit idiosyncratic becasue T9 and T10 are shifted 2.5% to the front or else they would be at the ear-slits: EEG029 i.e. T9'(X) = -cos(9/180*pi); EEG029 i.e. T9'(Y) = sin(9/180*pi); EEG039 i.e. T10'(X) = cos(9/180*pi); EEG039 i.e. T10'(Y) = sin(9/180*pi); The layout works both for our 128 and out 74 electrode layout (75-128 are called EEG075 to EEG128, and the earlier ones are at the same location). Obviously other labs might have other layouts so the question is whether this layout should be distributed. I would suggest so, calling it neuromag128eeg_natmeg.lay, because we have recordings at our lab that are analyzed elsewhere using FieldTrip. I would be happy to then document the layout on the FT wiki. Ofcourse, I could also distribute the layout via our own site. Please let me know what you think. Alternatively, I could make a FAQ of the following code with which I made the layout. Let me know what you think (But please send a note to when you do, since I still don't get responses...) Best wishes, Stephen -------------------------------- % load EEG label names according to specifications from easycap nr2labels = tdfread('/home/stephen/Analysis/128EEG.txt'); % load high density EEG layout to which variable names were added in first % row layout = tdfread('/home/stephen/Analysis/elec1005_varnames.lay',' ') clear new inew = 0; for itemplate = 1:size(layout.label,1); for icap = 1:size(nr2labels.label,1); if strcmp(nr2labels.label(icap,:), layout.label(itemplate,:)) inew = inew + 1; = icap; new.label(inew,:) = sprintf('%s%03d','EEG',,:)); new.label_old(inew,:) = layout.label(itemplate,:); new.x(inew) = layout.x(itemplate); new.y(inew) = layout.y(itemplate); new.h(inew) = layout.h(itemplate); new.b(inew) = layout.b(itemplate); end end end ='; % sort according to channelnumber [a b] = sort(;,:) =,:) ; new.label(:,:) = new.label(b,:) ; new.label_old(:,:) = new.label_old(b,:) ; new.x = new.x(b); new.x = new.x'; new.y = new.y(b); new.y = new.y'; new.h = new.h(b); new.h = new.h'; new.b = new.b(b); new.b = new.b'; for i = 1 : size(new.x,1) if strcmp(new.label_old(i,:), 'T9 ') new.x(i) = -cos(9/180*pi); new.y(i) = sin(9/180*pi); disp(num2str(i)); end if strcmp(new.label_old(i,:), 'T10 ') new.x(i) = cos(9/180*pi); new.y(i) = sin(9/180*pi); disp(num2str(i)); end end fid = fopen('neuromag128eeg.lay','w'); for i = 1:size(,1) fprintf(fid,'%d %f %f %1.2f %1.2f %s\n',, new.x(i), new.y(i), new.h(i), new.b(i), new.label(i,:)); end fclose(fid); cfg = []; cfg.layout = 'neuromag128eeg'; lay = ft_prepare_layout(cfg); figure; ft_plot_lay(lay);

Stephen Whitmarsh - 2014-08-07 18:00:58 +0200

Created attachment 659 layout of natmeg's 74-128 EEG

Jim Herring - 2014-08-07 19:30:49 +0200

"Obviously other labs might have other layouts so the question is whether this layout should be distributed" Is this indeed the case? If so, is there perhaps another name we could think of that fits the combination of neuromag and that specific layout better than adding _natmeg? (In principle you could in the future also use a different layout at NatMeg). For instance, 'neuromag128-1005.lay', assuming that T9 and T10 are always shifted forward when using the 1005 layout in combination with a Neuromag system.

Stephen Whitmarsh - 2014-08-08 09:09:41 +0200

Yes I think that is the case, indeed. For instance, one can have an equidistant layout, and, now I think of it, a totally different manufacturer of the caps. In fact, we use Easycap instead of the cap that Elekta themselves can supply. My major concern is that because of the ambiguous channel labels (e.g. EEG011) it is not in any way clear what the layout might be. What I did not know, however, was that there is a place to describe them: So shall we call it neuromag128EEG_easycap and make a note of T9' T10' on that page? Cheers, Stephen

Jim Herring - 2014-08-08 09:57:19 +0200

I would prefer neuromag128EEG_1005, or something to make it clear that it follows the 5% system. Easycap also supplies equidistant caps so 'neuromag128EEG_easycap' is ambiguous with respect to the type of layout.

Stephen Whitmarsh - 2014-08-08 10:58:55 +0200

Fair enough

Jim Herring - 2014-08-12 12:09:10 +0200

Adding neuromag306eeg1005.lay Transmitting file data . Committed revision 9771.

Jan-Mathijs Schoffelen - 2014-09-10 13:50:02 +0200

Discussed in FT-meeting: the 'neuromag' in the name is too generic, because the cap may be site-specific. Please rename the layout and add it to the documentation fieldtrip/template/layout