egi2besa2fieldtrip - topoplot layout

Christian Hesse c.hesse at FCDONDERS.RU.NL
Wed Jun 27 13:40:36 CEST 2007


Hi Virginie & Olga,

I have just done some tests using the PREPARE_LAYOUT function and EGI
files and the code seems to behave as it should. If you specify
cfg.rotate = 0 then the sensor positions come out with the nose
pointing upwards. Since the default specified in the code is
cfg.rotate = 90, not specifying cfg.rotate or setting cfg.rotate = 90
leaves you with the nose pointing to the right.

I would be grateful if you can confirm using your own files that
PREPARE_LAYOUT with cfg.rotate = 0 works as described above.

Many Thanks,
Christian


On 20 Jun 2007, at 18:29, Virginie van Wassenhove wrote:

> Hi Olga,
>
> thanks for your help, I think I got it working now!
>
> Virginie
>
> At 06:20 AM 6/20/2007, Olga Sysoeva wrote:
>> Dear Virginie,
>>
>> I had the same problem.
>> Actually, I not understand where the problem comes from, but solve
>> it by
>> multiplying the coordinates by cos (- 90) and sin (90). See the
>> script
>> below.
>> It works good for my data...
>>
>> Best Regards,
>> Olga.
>>
>>
>> %prepare layout
>> data.elec =
>> read_fcdc_elec('C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp');
>> cfg = [];
>> cfg.rotate = 90;
>> cfg.elecfile = 'C:\MATLAB7\work\fieldtrip-20070409\GSN64sag1.sfp';
>> mylay2 = prepare_layout(cfg);
>>
>> for i=1:69
>>     mylay2.width (i)= 0.5
>> end;
>>
>> for i=1:69
>>     mylay2.height (i)= 0.5
>> end;
>>
>> x=mylay.pos (:,1);
>> y=mylay.pos (:,2);
>> mylay2.pos (:,1)=y;
>> mylay2.pos (:,2)=-x;
>>
>>
>> -----Original Message-----
>> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL]
>> On Behalf
>> Of Virginie van Wassenhove
>> Sent: Tuesday, June 19, 2007 10:38 PM
>> To: FIELDTRIP at NIC.SURFNET.NL
>> Subject: [FIELDTRIP] egi2besa2fieldtrip - topoplot layout
>>
>> Hi Fieldtripers,
>>
>> below find the relevant sample code I am using to plot cluster
>> results with Fieldtrip release v. 20070514 (latest?).
>>
>> I have read previous posts in the discussion but I still bump into
>> this issue (not sure how old the discussions were).
>> The recordings were made with an egi system and preprocessed in besa.
>> Although I am using the prepare_layout function, the layout in
>> topoplotER (and other plotting tools) needs to be rotated by
>> 90degrees clockwise.
>> I have tried to use cfg.rotate (in the for loop below, commented
>> here) but that does not change anything.
>>
>> Do you have any suggestions on how to overcome this problem?
>> Thanks in advance for your help!
>>
>> Virginie
>>
>> % ==== plot results ====
>> cfg = [];
>> cfg.elecfile = '\CHANNELS_specs\fieldtrip_GSN128.sfp';
>> egilay = prepare_layout(cfg);
>>
>> diff_gdav = ill_gdav;
>> diff_gdav.av = ill_gdav.avg-noill_gdav.avg;
>>
>> figure;
>> % if cfg.latency = [0.3 0.8]; in cluster analysis
>> %j = [0:0.025:0.5];                              % (s), 0 = 1st onset
>> %m = [1:12:251];                                 % (samples)
>> % if cfg.latency = 'all'; in clusteranalysis
>> j = [0:0.05:1.1];                               % (s), 0 = -300ms
>> from1st
>> onset
>> m = [1:25:551];                                 % (samples)
>>
>> pos  = stat.posclusterslabelmat == 1;               % + clusters
>> neg  = (stat.negclusterslabelmat == 1)*(-1);        % - clusters
>>
>> for k = 1:length(j)-1;                     % 20 subplots
>>       subplot(4,5,k);
>>       cfg = [];
>>       cfg.xlim=[j(k) j(k+1)];
>>       cfg.zlim=[-3 3];
>>       pos_int = mean(pos(:,m(k):m(k+1))')';
>>       neg_int = mean(neg(:,m(k):m(k+1))')';
>>       cfg.highlight = find(pos_int ==1 | neg_int == -1);
>>       cfg.comment = 'xlim';
>>       cfg.commentpos = 'title';
>>       cfg.layout = egilay;
>>       %cfg.rotate =[90];                         % ?? rotate by 90
>> degrees clock-wise
>>       topoplotER(cfg,diff_gdav);
>> end
>> % ====================
>>
>> Virginie van Wassenhove, PhD
>>
>> :::::::::::: contact info  :::::::::::::
>> Caltech - Division of Biology
>> 1200 E. California Blvd M/C 139-74
>> Pasadena CA 91125 USA
>> :::::::::::::::::::::::::::::::::::::::::::::::::
>> vvw at caltech.edu
>> Virginie.van.Wassenhove at gmail.com
>> W: 626.395.8959
>> http://www.its.caltech.edu/~vvw
>>
>> :::::::::::::::::: extras ::::::::::::::::::::
>> http://www.kiva.org
>> http://www.thehungersite.com/
>> http://www.agloco.com/r/BBBS1539
>> :::::::::::::::::::::::::::::::::::::::::::::::::
>>
>> ----------------------------------
>> 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/fcdonders/fieldtrip.
>>
>> ----------------------------------
>> 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/
>> fcdonders/fieldtrip.
>
> Virginie van Wassenhove, PhD
>
> :::::::::::: contact info  :::::::::::::
> Caltech - Division of Biology
> 1200 E. California Blvd M/C 139-74
> Pasadena CA 91125 USA
> :::::::::::::::::::::::::::::::::::::::::::::::::
> vvw at caltech.edu
> Virginie.van.Wassenhove at gmail.com
> W: 626.395.8959
> http://www.its.caltech.edu/~vvw
>
> :::::::::::::::::: extras ::::::::::::::::::::
> http://www.kiva.org
> http://www.thehungersite.com/
> http://www.agloco.com/r/BBBS1539
> :::::::::::::::::::::::::::::::::::::::::::::::::
>
> ----------------------------------
> 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/fcdonders/fieldtrip.
>

----------------------------------------------------------------------
Christian Hesse, PhD, MIEEE

F.C. Donders Centre for Cognitive Neuroimaging
P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands

Tel.: +31 (0)24 36 68293
Fax: +31 (0)24 36 10989

Email: c.hesse at fcdonders.ru.nl
Web: www.fcdonders.ru.nl
----------------------------------------------------------------------





----------------------------------
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/fcdonders/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20070627/ee1494c0/attachment-0002.html>


More information about the fieldtrip mailing list