Back to the main page.

Bug 1812 - ft_electroderealign doesn't work (probably because of ft_datatype_sens)

Reported 2012-11-06 15:21:00 +0100
Modified 2019-08-10 11:56:15 +0200
Product: FieldTrip
Component: forward
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P3 normal
Assigned to:
Depends on:
See also:

Lilla Magyari - 2012-11-06 15:21:41 +0100

the tutorial script gives an error when ft_electroderealign is called This is probably caused by ft_datatype_sens. elec = ft_read_sens('standard_1020.elc') % in FT template dir mri = ft_read_mri('Subject01.mri'); % tutorial mri nas=mri.hdr.fiducial.mri.nas; lpa=mri.hdr.fiducial.mri.lpa; rpa=mri.hdr.fiducial.mri.rpa; transm=mri.transform; nas=warp_apply(transm,nas, 'homogenous'); lpa=warp_apply(transm,lpa, 'homogenous'); rpa=warp_apply(transm,rpa, 'homogenous'); % create a structure similar to a template set of electrodes fid.chanpos = [nas; lpa; rpa]; % ctf-coordinates of fiducials fid.label = {'Nz','LPA','RPA'}; % same labels as in elec fid.unit = 'mm'; % same units as mri % alignment cfg = []; cfg.method = 'fiducial'; cfg.template = fid; % see above cfg.elec = elec; cfg.fiducial = {'Nz', 'LPA', 'RPA'}; % labels of fiducials in fid and in elec elec_aligned = ft_electroderealign(cfg); Lilla

Lilla Magyari - 2012-11-06 18:48:05 +0100

I think I have found a problem. I am testing the corrected function now. lilla

Lilla Magyari - 2012-11-06 18:49:06 +0100

correction of earlier comment: "the" problem

Lilla Magyari - 2012-11-07 10:30:31 +0100

r6884 the problem was in line 174: ft_datatype_sens is chaning the order of the fields, therefore the same variable can not be input as also output of the function

Lilla Magyari - 2012-11-07 10:31:01 +0100

(In reply to comment #3) correction: "and" also output

Robert Oostenveld - 2019-08-10 11:56:15 +0200

This closes a whole series of bugs that have been resolved (either FIXED/WONTFIX/INVALID) for quite some time. If you disagree, please file a new issue describing the issue on