[FieldTrip] How to adapt a layout file

Sprenger, S.A. s.a.sprenger at rug.nl
Tue Jul 4 16:56:51 CEST 2017


Dear colleagues,

I was wondering whether someone could give us some advice on how to adapt
an existing layout file.

We would like to adapt easycapM1.mat, as our own layout is highly similar.
Specifically, we would like to remove F1, F2, FT7, FT8, TP7, TP8, CP1 and
CP2. In addition, we would like to add the mastoids (for ICA plotting
purposes).

We tried the following:

% removing F1, F2, FT7, FT8, TP7, TP8, CP1, CP2:
load('/Volumes/DATA/Applications/fieldtrip-20170425/
template/layout/easycapM1.mat');

% this plots the layout with electrodes on the correct positions:
cfg = [];
cfg.layout = lay;
ft_layoutplot(cfg);

for i = {'F1', 'F2', 'FT7', 'FT8', 'TP7', 'TP8', 'CP1', 'CP2'}
    [truefalse, index] = ismember(i, lay.label);
    if truefalse == 1
        lay.label = setdiff(lay.label, lay.label{index});
        lay.width = lay.width([1:(index-1), (index+1):end]);
        lay.height = lay.height([1:(index-1), (index+1):end]);
        lay.pos = lay.pos([1:(index-1), (index+1):end],:);
    end
end

% now suddenly many electrodes are plotted on wrong locations,
% but we just wanted to remove some electrodes:
cfg = [];
cfg.layout = lay;
ft_layoutplot(cfg);

Comments and suggestions will be much appreciated.

Kind regards,
  Simone

_____________________________________________
Dr. S.A. Sprenger
University of Groningen
Faculty of Arts
Center for Language and Cognition

Visiting address:
Oude Kijk in 't Jatstraat 26
Room 1315.420
9712 EK Groningen

Working hours: mo-thur
 050 363 9619
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170704/4f3f38cb/attachment-0001.html>


More information about the fieldtrip mailing list