[FieldTrip] Symmetric Source Reconstruction

Behzad Iravani behzadiravani at gmail.com
Thu Jan 26 17:36:28 CET 2017


Dear FieldTrip experts ,

I'm interested to perform symmetric source reconstruction on time lock
data. However I encountered an error. here is my code:

cfg                         = [];
cfg.grid.unit            = 'mm';
cfg.grid.resolution   = 5;
cfg.grid.tight           = 'yes';
cfg.inwardshift        = -2;
cfg.headmodel        = vol;
cfg.symmetric        ='y';  % symmetric sources

grid                = ft_prepare_sourcemodel(cfg);


% timelock data for two conditions

load timelockA     %co-variance computed
load timelockB     %co-variance computed
load timeloackAB %co-variance computed

load elecfile.mat   % sensor positions
load vol.mat         % pre-compute head model

cfg                     = [];
cfg.method         = 'lcmv';
cfg.grid               = grid;
cfg.headmodel     = vol;
cfg.elec               = elecfile;
cfg.keepfilter        = 'yes';
source                = ft_sourceanalysis(timeloackAB); % compute common
filter

cfg.keepfilter        = 'no';
cfg.grid.filter         =source.avg.filter
sourceA               = ft_sourceanalysis(timeloackA); % compute common
filter

sourceB               = ft_sourceanalysis(timeloackA); % compute common
filter


% Contrast Condition A versus B
cfg           = [];
cfg.parameter = 'pow';
cfg.operation = '(x1./x2-1)';
SourceC= ft_math(cfg,sourceA ,sourceB);

load mri.mat       % load anatomical image

cfg            = [];
cfg.parameter  = 'pow';
sourcePostInt  = ft_sourceinterpolate(cfg,  SourceC ,mri);

here I get error in ft_warp_apply because the grid.pos is 6*n which it is
supposed to be 3*n, since I chose the symmetric option it turned to 6*n.

How can I solve this problem?

Thanks in advance
Best

Behzad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170126/9432023d/attachment.html>


More information about the fieldtrip mailing list