[FieldTrip] Symmetric Source Reconstruction

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Mon Feb 6 09:40:04 CET 2017


Hi Behzad,

You could try to do the following, before calling ft_sourceinterpolate:

sourceC.pos = sourceC.pos(:,1:3);

Best,
Jan-Mathijs




J.M.Schoffelen, MD PhD
Senior Researcher, VIDI-fellow
Telephone: +31-24-3614793
Physical location: room 00.028
Donders Centre for Cognitive Neuroimaging, Nijmegen, The Netherlands





> On 26 Jan 2017, at 17:36, Behzad Iravani <behzadiravani at gmail.com> wrote:
> 
> 
> 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
> 
> 
>   
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip






More information about the fieldtrip mailing list