Back to the main page.

Bug 2803 - major localization differences in two versions of ft_dipolefitting

Reported 2015-01-07 16:47:00 +0100
Modified 2015-02-11 10:40:19 +0100
Product: FieldTrip
Component: inverse
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P5 major
Assigned to: Robert Oostenveld
Depends on:
See also:

Luis - 2015-01-07 16:47:54 +0100

Created attachment 690 cfg and data variables Hello developer, The revision of ft_dipolefitting '$Id: ft_dipolefitting 5439 2012-03-12 13:17:15Z giopia $'; produce excellent dipole localization and residual variance. >> disp(source.dip) pos: [51.7641 24.5471 -35.4362] mom: [3x1 double] pot: [27x1 double] rv: 0.0218 However the current version ('$Id$') produce a totally off localization and poor residual variance. >> disp(source.dip) pos: [-45.2455 -86.2421 -15.2132] mom: [3x1 double] pot: [27x1 double] rv: 0.5848 I/you can run both versions using the attached file that contains cfg and data. While debugging the function myself I found out that the behaviour of the function "prepare_headmodel" is quite different in both versions. This happens in line aprox 236 of ft_dipolefitting. In particular the electrode positions of the variable "sens" are very distorted in the current version of the function but not in the old one. However although changing that variable for the correct electrode position alters the result it did not produced the right localization. Maybe some other distortions are produce in the cfg or data variables as well. In order to reproduce the apparent bug load cfg&data.mat file attached, change the cfg.hdmfile path to the standard_bem.mat in your system, and run >> source = ft_dipolefitting(cfg, data); Thank you for creating a great toolbox!

Robert Oostenveld - 2015-01-07 17:03:00 +0100

Hi Luis, Thanks for the detailled report plus test data (and the compliments of course). I suspect that you are suffering from the same problem that was reported by Vladimir in bug #2800. Right now I am busy at the MEG-UK workshop and meeting in Birmingham, but perhaps I have some time in one of the coming evenings. If not, I'll get it resolved early next week. cheers Robert *** This bug has been marked as a duplicate of bug 2800 ***

Robert Oostenveld - 2015-02-11 10:40:19 +0100

Closed several bugs that were recently resolved. Please reopen if you are not happy with the resolution.