Specifying the channel layout for plotting

Layout files (*.lay files)

FieldTrip can use layout files that gives you exact control of the 2-D position of the sensors for topoplotting, and of the per-channel local coordinate axes for the multiplotting. These layout files are ascii file with the extention *.lay, or matlab files containing a variable with the name “lay”. Here is a small snippet of an ascii layout file:

1  -0.308949  0.951110  0.750000  0.450000  Fp1
2   0.000121  1.000000  0.750000  0.450000  Fpz
3   0.309064  0.951004  0.750000  0.450000  Fp2
4  -0.808816  0.587705  0.750000  0.450000  F7
5  -0.411232  0.519845  0.750000  0.450000  F3
6   0.000257  0.499920  0.750000  0.450000  Fz
7   0.410919  0.519568  0.750000  0.450000  F4
8   0.809069  0.587789  0.750000  0.450000  F8
...

The format of the layout file is described in more detail in the frequently asked question ”what is the format of the layout file which is used for plotting”.

Using the ft_prepare_layout function to make a layout

The ft_prepare_layout function can be used to make a custom layout. This can be especially convenient if you have a nice bitmap image for the channel arrangement, like this


for the Easycap M10 electrodecap arrangement (see http://www.easycap.de/easycap/e/electrodes/13_M10.htm) for full details), or like this

for an ECoG electrode arrangement (this example photo is from Dalal et al. in Journal of Neuroscience Methods 174 (2008) 106–115).

You can specify cfg.image in ft_prepare_layout and subsequently click on the location of each electrode. After specifying each electrode location, you'll be asked to specify the outlines of the head (i.e. the circle around the head, the nose and ears and optionally some lines representing other important landmarks) and to specify the mask for the topographic interpolation.

cfg = [];
cfg.image = 'dalal_ecog.png';
lay = ft_prepare_layout(cfg);

After creating the layout, you should manually assign the correct name of the channel labels in the lay.label cell-array. Furthermore, you probably should place the SCALE and COMNT locations at a convenient place in eth figure and modify the width and height of the boxes used for multiplotting. You can use ft_layoutplot for a visual inspection of the complete layout

cfg = [];
cfg.layout = lay;   % this is the layout structure that you created with ft_prepare_layout
ft_layoutplot(cfg);

or including the original image as black-and-white background like this

cfg = [];
cfg.image  = 'dalal_ecog.png';    % use the photo as background
cfg.layout = lay;                 % this is the layout structure that you created with ft_prepare_layout
ft_layoutplot(cfg);

Once you are happy with the result, you can save it to a matlab file:

save dalal_ecog.mat lay         % save the layout in the variable "lay" to a matlab file

The matlab file can subsequently be specified as cfg.layout='dalal_ecog.mat' whenever you need a layout for plotting. Alternatively, you can specify the layout like cfg.layout=lay.

The advantage of the matlab file over the ascii file, is that the matlab file can also contain a user-specified outline of the head and user-specified mask, whereas for the ascii layout file always the same circle with nose and ears will be used.

Standard layout files included in FieldTrip

The following standard layout files are included in FieldTrip. These figures were made using ft_layoutplot. The figures below show you the location and label of each channel and the width and height of the box for each channel that is used in ft_multiplotER and ft_multiplotTFR.

CTF layouts

Neuromag layouts

10-20 system layouts

Easycap layouts

Biosemi layouts

tutorial/layout.txt · Last modified: 2010/04/07 12:42 by timeng
Back to top
chimeric.de = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0