Back to the main page.

Bug 2825 - ft_electrodrealign does not work with method='template' and using headshape

Status NEW
Reported 2015-02-05 10:16:00 +0100
Modified 2015-02-12 18:11:17 +0100
Product: FieldTrip
Component: core
Version: unspecified
Hardware: All
Operating System: Linux
Importance: P5 normal
Assigned to:
Depends on:
See also:

Johanna - 2015-02-05 10:16:17 +0100

Created attachment 697 headshape_elec_misalignment Although there are similarly titled bugs (bug 2042 and bug 2775), I have a different issue than in those. My problem is that cfg.warp='globalrescale' and 'traditional' give the same output as 'rigidbody'. cfg = []; cfg.method='template'; cfg.elec=elec_aligned; % aligned rigidly via fiducials cfg.headshape=voldipolimm.bnd(1); cfg.warp='rigidbody'; elec_headshape1=ft_electroderealign(cfg); cfg.warp='globalrescale'; elec_headshape2=ft_electroderealign(cfg); cfg.warp='traditional'; elec_headshape3=ft_electroderealign(cfg); For me, the 'rigidbody' and 'globalrescale' elecpos and chanpos are exactly identical. The 'traditional' is slightly different but only on the order of 1e-6, and not on the order of which it should make a difference. I attach a figure showing the misalignment of 'traditional' to the headshape (indicating that some rescaling should be going on, in my opinion). It seems the call to 'fminunc' in ft_warp_optim (line 137) produces a 'gf' identical to 'gi', meaning no update of globalrescaling. Furthermore, the test_ft_electroderealign has this option (of method=template and headshape) commented out (see bug 2042). It would be great to uncomment it once it's working.

Robert Oostenveld - 2015-02-12 18:11:17 +0100

in the figure the electrodes seem to be quite far off from the optimal location. Might it be that the optimisation procedure is in a local minimum and therefore does not know where to move the electrodes towards?