[FieldTrip] source analysis and simulation

PWW ww.peng0923 at gmail.com
Tue Jul 5 16:33:34 CEST 2011

Dear all,

I am a new comer for using fieldtrip toolbox.  I am a Mphil student of The
University of Hong Kong, and my research is about source analysis for EEG
At the moment, I confront some problems in simulation when using fieldtrip
to do source analysis.

Firstly, I have tried the matlab codes on the website of
When I change the  dipole position, such as [3 8 8], the reconstructed
source is also located at [0 0 4]. I have confirmed the simulation data,
which is right and varied accroding to the dipole position. However, for the
source analysis result, it doesn't change, and stills locates at the
position of [0 0 4]. It seems that the problems lies at the function of
ft_sourceanalysis ft_sourceanalysis. I am quite confused and hope to get a
clear explaination. And thanks very much.

Secondly, I have alligned my electrode file to the standard BEM head model.
Then I undertook source analysis for timelocked EEG activities for
simulation according to the following codes:

clear all
load headmodel.mat
cfg = [];
cfg.vol = vol;
cfg.elec = elec;
cfg.dip.pos = [0 -20 100];    % the dipole is located at about Cz channel
cfg.dip.mom = [0 0 1]';   % the dipole points along the x-axis
cfg.relnoise = 0;
cfg.ntrials = 20;
data = ft_dipolesimulation(cfg);
% compute the data covariance matrix, which will capture the activity of
% the simulated dipole
cfg = [];
cfg.covariance = 'yes';
timelock = ft_timelockanalysis(cfg, data);
% do the beamformer source reconstuction on a 10 mm grid
cfg = [];
cfg.vol = vol;
cfg.grid.resolution = 10;
cfg.method = 'lcmv';
source = ft_sourceanalysis(cfg, timelock);
cfg            = [];
cfg.downsample = 2;
sourcePostInt  = ft_sourceinterpolate(cfg, source , mri);
cfg = [];
cfg.method        = 'ortho';
cfg.funparameter  = 'avg.pow';
cfg.maskparameter = cfg.funparameter;
cfg.opacitymap    = 'rampup';
ft_sourceplot(cfg, sourcePostInt);

However, it still doesn't work, and the source is located at wrong position.
I have no idear and worked on it for several days. So I am writing to your
to ask for help, my headmodel file in the *.mat type can be downloaded in
http://www.sendspace.com/file/lars5j .
Thanks again for all your help.

Best regards,

Weiwei Peng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110705/12fb45ea/attachment-0001.html>

More information about the fieldtrip mailing list