[FieldTrip] Error while using ft_sensorrealign

"Jörn M. Horschig" jm.horschig at donders.ru.nl
Mon Jul 7 14:12:05 CEST 2014


Hey,

maybe we should look at that function more closely. Tyler Grummett also 
reported an issue with ft_sensorrealign a few days back, when specifying 
cfg.target as a file. His error was related to a missing field 
template.pnt. This could be since we recently changed the 
sensor-structures to contain .chanpos instead of .pnt.
Here, I could imagine that the existence of template.pnt and absence of 
template.chanpos and .elecpos are also part of this problem.

Best,
Jörn


On 7/7/2014 12:11 PM, f.chella at unich.it wrote:
> Hi Eelke,
> thanks for pointing out this oversight, but it seems not to depend on 
> that.
>
> Now, I specified both as column cell array (3x1).
> However, the error is still occurring.
>
> Federico
>
>
>
> Def. Quota Eelke Spaak <eelke.spaak at donders.ru.nl>:
>
>> Hi Federico,
>>
>> No idea whether this matters (haven't tested it), but perhaps the 
>> error is
>> due to sens.fid.label being a column cell array (3x1) and 
>> cfg.target.label
>> being a row (1x3)?
>>
>> Best,
>> Eelke
>> Op 7 jul. 2014 11:38 schreef <f.chella at unich.it>:
>>
>>> Hi everyone,
>>>
>>> I am getting an error when I use ft_sensorrealign to align my MEG 
>>> sensor
>>> (i.e., ITAB MEG sensor) with the subject mri using fiducials.
>>>
>>> Below is the code I am using.
>>> I first specified the fiducial location in the sensor space in the 
>>> field
>>> sens.fid:
>>>  sens.fid.pnt(1,:) = [0   101.5    0] ;
>>>  sens.fid.pnt(2,:) = [-69.9    -0.6    0.8];
>>>  sens.fid.pnt(3,:) = [69.9     0.6   -0.8];
>>>  sens.fid.label{1} = 'nasion';
>>>  sens.fid.label{2} = 'left';
>>>  sens.fid.label{3} = 'right';
>>>
>>> and then I called ft_sensorrealign:
>>>  cfg = [];
>>>  cfg.method   = 'fiducial';
>>>  cfg.fiducial = {'nasion', 'left', 'right'};
>>>  cfg.target.pnt(1,:) = [-0.5    86.5   -15.5];
>>>  cfg.target.pnt(2,:) = [-73.5   -7.5  -43.5];
>>>  cfg.target.pnt(3,:) = [69.5  -16.5  -44.5];
>>>  cfg.target.label    = {'nasion', 'left', 'right'};
>>>  sens_realigned = ft_sensorrealign(cfg,sens);
>>>
>>> Now, I get the following error:
>>>
>>>  ??? Subscripted assignment between dissimilar structures.
>>>  Error in ==> ft_sensorrealign at 235
>>>      tmp(i) = ft_convert_units(template(i), elec.unit); % ensure 
>>> that the
>>> units are consistent with the electrodes
>>>
>>> Does anyone know why this would be occurring and how to fix it?
>>> Thanks in advance for the help.
>>>
>>>
>>> Federico Chella, Ph.D.
>>> Dept. of Neuroscience, Imaging and Clinical Sciences
>>> ITAB ? Institute for advanced Biomedical Technologies
>>>  ?G. d'Annunzio? University of Chieti-Pescara, Chieti, Italy
>>>
>>> _______________________________________________
>>> fieldtrip mailing list
>>> fieldtrip at donders.ru.nl
>>> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>>>
>>
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip


-- 
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
Neuronal Oscillations Group
FieldTrip Development Team

P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands

Contact:
E-Mail: jm.horschig at donders.ru.nl
Tel:    +31-(0)24-36-68493
Web: http://www.ru.nl/donders

Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands




More information about the fieldtrip mailing list