egi2besa2fieldtrip - topoplot layout

Olga Sysoeva olga at GRAPHICMIND.INFO
Wed Jun 20 15:20:00 CEST 2007


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.



More information about the fieldtrip mailing list