<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Robert,<br>
<br>
thank you very much for the quick reply. I noticed that I supplied
insufficient information. I actually switched on the electrode labels
in the display and the peaks sit at the wrong electrodes. I therefore
assume it is not a problem of the layout file (alone). I actually took
into account that the data look heavily distorted and tried to check
wether it is just a projection problem by playing around with different
scalings of elec.pnt (albeit this didn't seem to affect the plot??).<br>
I should have also mentioned that I'm using version 20051113. However I
imported the electrode positions with read_fcdc_elec from the version
0.9.6 (there doesn't seem to be a read_fcdc_elec version supplied with
2005113..) - I hope this doesn't cause the trouble.<br>
Meanwhile I also tried to use the elec1010.lay layout file which works
fine.However, in fieldtrip I find a negative peak between electrodes P5
P3 PO7 PO3 and a positive central one at CPz Cz (which has no
counterpart in BESA, so contourlines don't match exactly), whereas in
BESA a positive peak is found on CP4. This looks like an inversion of
signs, an inversion of left/right and a difference in the interpolation
algorithm.<br>
<br>
Below you'll find the code I used (most of it is copied from the BESA
tfc sample page on the web site):<br>
<br>
% this is the list of BESA datafiles in one condition<br>
filename_AM = {<br>
  'AA_AMU2M.mul'<br>
  'AK_AMU2M.mul'<br>
  'CB_AMU2M.mul'<br>
  'HDR01_AMU2M.mul'<br>
  'KRT28_AMU2M.mul'<br>
  'KSN14_AMU2M.mul'<br>
  'LM_AMU2M.mul'<br>
  'MN_AMU2M.mul'<br>
  'MW_AMU2M.mul'<br>
  'MWA_AMU2M.mul'<br>
  };<br>
<br>
% this is the list of BESA datafiles in the other condition<br>
filename_vAM = {<br>
  'AA_vAMU2M.mul'<br>
  'AK_vAMU2M.mul'<br>
  'CB_vAMU2M.mul'<br>
  'HDR01_vAMU2M.mul'<br>
  'KRT28_vAMU2M.mul'<br>
  'KSN14_vAMU2M.mul'<br>
  'LM_vAMU2M.mul'<br>
  'MN_vAMU2M.mul'<br>
  'MW_vAMU2M.mul'<br>
  'MWA_vAMU2M.mul'<br>
  };<br>
<br>
nsubj = length(filename_AM);<br>
<br>
% collect all single subject data in a convenient cell-array<br>
for i=1:nsubj<br>
  AM{i} = besa2fieldtrip(filename_AM{i});<br>
  vAM{i} = besa2fieldtrip(filename_vAM{i});<br>
end<br>
<br>
% load electrode configuration<br>
elec= read_fcdc_elec('AA_AMU2M.sfp');<br>
elec.pnt = 10.*elec.pnt; % scale, doesn't seem to affect the plotting ?<br>
<br>
cfg = [];<br>
cfg.keepindividual = 'yes';<br>
AMdata = timelockgrandaverage(cfg, AM{:});<br>
vAMdata = timelockgrandaverage(cfg, vAM{:});<br>
<br>
DiffData=AMdata %create dummy structure to hold results of the
difference calculation<br>
%calculate grand average difference<br>
DiffData.individual=AMdata.individual-vAMdata.individual;<br>
cfg = [];<br>
DiffDataGA=timelockgrandaverage(cfg, DiffData);<br>
%plot the differences<br>
figure;<br>
cfg=[];<br>
plotdata1.elec=elec;<br>
plotdata1.time=DiffDataGA.time;<br>
plotdata1.label=DiffDataGA.label;<br>
plotdata1.data2plot=DiffDataGA.avg;<br>
cfg=[];<br>
cfg.layout=elec;<br>
cfg.showlabels   = 'yes' <br>
cfg.zparam='data2plot';<br>
cfg.colorbar='no';<br>
cfg.xlim=[0.5595:0.001:0.5605]; % to zoom in on 560ms, as BESA only
gives data a timepoints<br>
topoplotER(cfg,plotdata1);<br>
<br>
<br>
<br>
Best Regards,<br>
Michael<br>
<br>
<br>
<br>
M. Wibral <small><small>Dipl. Phys.</small></small><br>
Max Planck Institute for Brain Research <br>
Dept. Neurophysiology<br>
Deutschordenstrasse 46<br>
60528 Frankfurt am Main<br>
Germany<br>
<br>
Phone:       +49(0)69/6301-83849<br>
                 +49(0)173/4966728<br>
Fax:           +49(0)69/96769-327<br>
<br>
<br>
Robert Oostenveld schrieb:
<blockquote
 cite="mid28A6AA31-A895-4DCE-BFEF-645AECA62F63@fcdonders.ru.nl"
 type="cite">Hi Micahel
  <br>
  <br>
  <blockquote type="cite">I see in BESA (more like something
differentiated / inverted from  the BESA maps - the foci are clearly
shifted).
    <br>
  </blockquote>
  <br>
The projection of the 3D electrode locations towards the 2D plane (in 
which the color-coded data has to be represented on screen or paper) 
might be quite different. Fieldtrip uses layout files in which you  can
specify the location of each sensor in the 2D plane (have a look  at
one of the *.lay files). If you do not specify a layout file, the  2D
layout is constructed on the fly from the 3D electrode locations  that
are represented as NelecX3 matrix in data.elec.pnt.
  <br>
  <br>
I suggest that you turn on the electrodes in topoplotER 
(cfg.showlabels option) and see whether that makes sense.
  <br>
  <br>
If you are using standard labels of the extended 10-20 system in your 
EEG data, you can also try topoplotting with a predefined 2D layout, 
e.g.
  <br>
  <br>
cfg = ...
  <br>
cfg.layout = 'elec1020.lay'  % or elec1010.lay
  <br>
topoplotER(cfg, avg)
  <br>
  <br>
  <blockquote type="cite">Do I have to tell Fieldtrip somewhere that
this is EEG data, so  that it doesn't do the things it would when
dealing with MEG  gradiometer data?
    <br>
  </blockquote>
  <br>
No, the topoplotting of EEG data and MEG data is done just the same.
  <br>
  <br>
  <blockquote type="cite">Or is there something I have to do to let
fieldtrip know that the  data are average reference data. I can't find
anything in the  tutorials on this matter.
    <br>
  </blockquote>
  <br>
No, referencing of EEG data does not influence the spatial 
topographical distribution. It might change the global color 
(depending on the coloraxis), but not the pattern. Re-referencing  your
data at one timepoint just subtract a constant value (the  potential at
the reference electrode) from all electrodes. A  geographical map of
the Himalayas would also look the same if you  would express the height
with respect to the foot of the mountain  range instead of with respect
to the sea level.
  <br>
  <br>
best regards,
  <br>
Robert
  <br>
  <br>
.
  <br>
  <br>
</blockquote>
<br>
</body>
</html>