databrowser: change order in which channels appear?

Robert Oostenveld r.oostenveld at FCDONDERS.RU.NL
Thu Jul 1 18:17:14 CEST 2010


Dear Henning


On 25 Jun 2010, at 14:19, Henning Holle wrote:
> when looking at data with the databrowser (vertical viewmode), the
> channels
> appear in the order in which they happen to be in the dataset. Is
> there a
> way to define another order (so that, for instance, more anterior
> channels
> appear more on top of the screen, and more posterior channels at the
> bottom
> of the screen).

It is currently not possible without changing the code. But if you go
into ft_databrowser, line 926, you'll see

   case 'vertical'
     tmpcfg = [];
     tmpcfg.layout = 'vertical';
     tmpcfg.channel = opt.cfg.channel;
     tmpcfg.skipcomnt = 'yes';
     tmpcfg.skipscale = 'yes';
     laytime = ft_prepare_layout(tmpcfg, opt.orgdata);


In that part the layout is created with the vertical arrangement of
the channels, you can think of that as a set of boxes that are
vertically stacked on top opf each other, where each box contains one
timecourse. There you could change the code to create a custom layout.
Have a look here
http://fieldtrip.fcdonders.nl/tutorial/layout for an explanation of
layouts.

You could just change that code into

   case 'vertical'
     tmpcfg = [];
     tmpcfg.layout = 'yourlayoutfile.lay';
     tmpcfg.channel = opt.cfg.channel;
     tmpcfg.skipcomnt = 'yes';
     tmpcfg.skipscale = 'yes';
     laytime = ft_prepare_layout(tmpcfg, opt.orgdata);

and have the arrangement of the channels for the databrowser in an
"yourlayoutfile.lay" ascii file

best
Robert

PS a clean extension of teh code would be to allow for cfg.viewmode =
'yourlayoutfile.lay';

----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.



More information about the fieldtrip mailing list