[FieldTrip] inconsistent results from dipolefitting and beamforming

jan-mathijs schoffelen jan.schoffelen at donders.ru.nl
Mon Mar 26 21:52:11 CEST 2012


Dear Kathrin,

Note that you cannot just mix geometrical objects which are defined in different coordinate systems within a simulation / source reconstruction.
The code cannot make the distinction about the coordinate systems, and assumes that all geometrical objects that go into a function are defined within the same coordinate system (i.e. x,y,z position mean the same in all objects). This also goes for the mri used for the interpolation. You should use an MRI volume that has a transformation matrix attached to it that transforms from voxel space into CTF coordinate system, rather than into MNI space. The result of a faulty interpolation would lead among others to the x and y axis being exchanged. I think you should look into this direction for a solution. 
By the way, (5,2,3) is indeed in the right hemisphere, but how it shows up on the screen depends on whether the anatomy is shown in radiological or neurological convention.

Best,

Jan-Mathijs

On Mar 26, 2012, at 6:45 PM, Kathrin Müsch wrote:

> Hi Fieldtrip users,
> 
> I am trying to apply a beamformer to simulated data to check whether my headmodels are correct. While ft_dipolefit localizes the dipole in the original position, the beamformer results in a source at a totally different position (see figure 1). I kept everything as similar as possible to the example scripts (forward simulation & dipole fit, forward simulation & beamformer) but used individual gradiometer positions, grid and volume of a single subject (CTF space) and plotted the source in a template grid (SPM space). If I run the dipolesimulation with the individual gradiometer structure and the template headmodel vol and template grid, the dipole and the source result in the same position, although the grad and vol are not in the same coordinate system (figure 2). And importantly, shouldn't the dipole be in the right hemisphere anyway with the coordinates 5/2/3? I appended the code below.
> 
> Could the different coordinate systems lead to the inconsistent results of dipolefitting and beamforming? Will the dipolesimulation be in the same coordinate system as the volume or gradiometer structure I feed in (CTF space, in my case)? How could I use the dipolesimulation, dipolefitting and beamforming to properly check my headmodels?
> 
> I tried so many things now but I couldn't find the error. Any help is very appreciated.
> 
> Best,
> Kathrin
> 
> 
> 
> These are the variables I used:
> 
> vol = headmodel of individual subject in CTF space (cm)
> data.grad = gradiometer structure of individual subject in CTF space (cm)
> mnigrid = grid of individual subject in CTF space (cm)
> template_grid = grid of template brain in SPM space (cm)
> mri = spm8 template brain in SMP space
> 
> 
> %% compute forward simulated data + apply diplole fit
> cfg     = [];
> cfg.vol = vol;
> cfg.grad = data.grad;
> cfg.channel = 'MEG';
> cfg.dip.pos = [5 2 3]; % pos of dipole in cm
> cfg.dip.mom = [1 0 0]';
> cfg.dip.frequency = 10;
> cfg.ntrials = 20;
> cfg.relnoise = 10;
> raw = ft_dipolesimulation(cfg);
>  
> % compute the data covariance matrix, which will capture the activity of
> % the simulated dipole
> cfg = [];
> cfg.covariance = 'yes';
> avg = ft_timelockanalysis(cfg, raw);
>  
> % apply dipolefit
> cfg = [];
> cfg.vol = vol;
> cfg.grad = data.grad;
> cfg.dip.pos = [0 0 0];
> cfg.gridsearch = 'no';
> dip = ft_dipolefitting(cfg, avg);
>  
> cfg = [];
> cfg.location = dip.dip.pos *10;
> figure, ft_sourceplot(cfg,mri)
> 
>  
> % do the beamformer source reconstuction on a 1 cm grid
> cfg = [];
> cfg.channel = 'MEG';
> cfg.vol = vol;
> cfg.grad = data.grad;
> cfg.grid  = mnigrid;
> cfg.method = 'lcmv';
> cfg.projectnoise = 'yes'; 
> source = ft_sourceanalysis(cfg, avg);
> 
> % compute the neural activity index, i.e. projected power divided by
> % projected noise
> cfg = [];
> cfg.powmethod = 'none'; % keep the power as estimated from the data covariance, i.e. the induced power
> source = ft_sourcedescriptives(cfg, source);
>  
> interp = ft_sourceinterpolate([], source, mri);
>  
> cfg = [];
> cfg.method = 'ortho';
> cfg.interactive = 'yes';
> cfg.funparameter = 'nai';
> cfg.funcolorlim = [1.5 4];  % the voxel in the center of the volume conductor messes up the autoscaling
> figure, ft_sourceplot(cfg, interp);
>  
> 
> <individual.png>
> 
> 
> <template.png>
> 
> 
> _____________________________________
> Kathrin Müsch
> 
> Dept. of Neurophysiology and Pathophysiology
> University Medical Center Hamburg-Eppendorf
> Martinistr. 52
> 20246 Hamburg
> Germany
> Phone: +49-40-7410-54680
> Fax: +49-40-7410-57752
> E-Mail: k.muesch at uke.uni-hamburg.de
> _____________________________________
> 
> 
> --
> Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG):
> 
> Universitätsklinikum Hamburg-Eppendorf; Körperschaft des öffentlichen Rechts; Gerichtsstand: Hamburg
> 
> Vorstandsmitglieder: Prof. Dr. Guido Sauter (Vertreter des Vorsitzenden), Dr. Alexander Kirstein, Joachim Prölß, Prof. Dr. Dr. Uwe Koch-Gromus
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

Jan-Mathijs Schoffelen, MD PhD 

Donders Institute for Brain, Cognition and Behaviour, 
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands

Max Planck Institute for Psycholinguistics,
Nijmegen, The Netherlands

J.Schoffelen at donders.ru.nl
Telephone: +31-24-3614793

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120326/3f83dc86/attachment.html>


More information about the fieldtrip mailing list