[FieldTrip] Problem with interpn function in ft_sourceinterpolate

"Jörn M. Horschig" jm.horschig at donders.ru.nl
Fri Mar 22 16:00:39 CET 2013


Dear Tadeusz,

does it work when you leave out cfg.downsample or with another 
interpolation method?

Best,
Jörn


On 3/21/2013 7:23 PM, T.W. Kononowicz wrote:
> Dear FieldTrip users,
>
> I am trying to do some source reconstruction on ERF data (version: 
> fieldtrip-20130320). Everything seems to work quite well up to 
> ft_sourceinterpolate.
>
>
> cfg        = [];
>
> cfg.method = 'mne';
>
> cfg.grid   = grid;
>
> cfg.vol    = template_vol;
>
> cfg.grad     = grad;
>
> cfg.projectnoise = 'yes';
>
> cfg.reducerank     = 'no';
>
> cfg.mne.lambda = 1e8;
>
> repr2_mne = ft_sourceanalysis(cfg, repr2_cov);
>
>
> The repr2_mne structure looks as follows:
> >> repr2_mne
> repr2_mne =
>   dim: [15 15 14]
>  time: [1x1751 double]
>   pos: [3150x3 double]
>  inside: [1x1613 double]
> outside: [1x1537 double]
>  method: 'average'
>   avg: [1x1 struct]
>   cfg: [1x1 struct]
>
> >> repr2_mne.avg
> ans =
>    mom: {1x3150 cell}
>    pow: [3150x1751 double]
> noisecov: {1x3150 cell}
>
>
> As the next step I call the ft_sourceinterpolate:
>
> cfg=[];
>
> cfg.interpmethod='linear';
>
> cfg.parameter='avg.pow';
>
> cfg.downsample = 2;
>
> cfg.feedback='yes';
>
> repr2_interp=ft_sourceinterpolate(cfg, repr2_mne,template);
>
>
> Then I get the following display message.
>
> the input is source data with 3150 positions on a [15 15 14] grid
>
> the input is volume data with dimensions [91 109 91]
>
> updating homogenous coordinate transformation matrix
>
> downsampling anatomy
>
> downsampling inside
>
> the call to "ft_volumedownsample" took 0 seconds and required the 
> additional allocation of an estimated 0 MB
>
> selecting subvolume of 34.7%
>
> reslicing and interpolating avg.pow
>
>
> After that the code crashes and I get the error:
>
>
> ??? Error using ==> interpn at 155
>
> Wrong number of input arguments or some dimension of V is less than 2.
>
>
> Error in ==> ft_sourceinterpolate>my_interpn at 494
>
>   av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);
>
>
> Error in ==> ft_sourceinterpolate at 397
>
>           av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), 
> cfg.interpmethod,
>
>           cfg.feedback);
>
>
> Just before crush in line 397 of ft_sourceinterpolate:  av( sel) = 
> my_interpn(fv, ax(sel), ay(sel), az(sel), cfg.interpmethod, 
> cfg.feedback); argument's size are:
>
> size(fv)
> ans =
>         3150    1751
>
> ax, ay, az, are:
>
> size(ay)
>
> ans =
>
>     46    55    46
>
>
> size(sel)
>
> ans =
>
>       116380     1
>
>
> I found one similar post on the list, however its not helpful in that 
> case. Does anyone can spot what I'm missing here?
>
>
> Thank you in advance for you help,
>
>
> Tadeusz W. Kononowicz
>
>
>
> _______________________________________________
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130322/a7384d8a/attachment-0001.html>


More information about the fieldtrip mailing list