Back to the main page.
Bug 1812 - ft_electroderealign doesn't work (probably because of ft_datatype_sens)
Status | CLOSED FIXED |
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: | |
URL: | |
Tags: | |
Depends on: | |
Blocks: | |
See also: |
Lilla Magyari - 2012-11-06 15:21:41 +0100
the tutorial script gives an error when ft_electroderealign is called http://fieldtrip.fcdonders.nl/development/headmodel_tutorial_eeg 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