<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">hi tadeusz,<div><br></div><div>I believe that interpolation from a 3D grid onto another 3D grid is not supported when the input contains multiple time points.</div><div><br></div><div>Best</div><div><br></div><div>Jan-Mathijs</div><div><br></div><div><br></div><div><div><div>On Mar 21, 2013, at 7:23 PM, T.W. Kononowicz wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; font-size: 14px; font-family: Cambria, sans-serif; "><div><div><font face="Consolas">Dear FieldTrip users,</font></div><div><font face="Consolas"><br></font></div><div><font face="Consolas">I am trying to do some source reconstruction on ERF data (version: </font><span style="font-family: Monaco; ">fieldtrip-20130320)</span><span style="font-family: Consolas; ">. Everything seems to work quite well up to ft_sourceinterpolate. </span></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"><br></font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"><br></font></div><div style="color: rgb(0, 0, 128); "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">cfg = [];</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">cfg.method = <span style="color: rgb(178, 69, 243); ">'mne'</span>;</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">cfg.grid = grid;</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">cfg.vol = template_vol;</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">cfg.grad = grad;</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">cfg.projectnoise = <span style="color: rgb(178, 69, 243); ">'yes'</span>;</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">cfg.reducerank = <span style="color: rgb(178, 69, 243); ">'no'</span>;</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">cfg.mne.lambda = 1e8;</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; color: rgb(37, 153, 45); "><span style="color: rgb(0, 0, 128); "><font face="Consolas">repr2_mne = ft_sourceanalysis(cfg, repr2_cov);</font></span></div></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"><br></font></div><div><font face="Consolas">The repr2_mne structure looks as follows:</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas">>> repr2_mne</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas">repr2_mne = </font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"> dim: [15 15 14]</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"> time: [1x1751 double]</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"> pos: [3150x3 double]</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"> inside: [1x1613 double]</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"> outside: [1x1537 double]</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"> method: 'average'</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"> avg: [1x1 struct]</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"> cfg: [1x1 struct]</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"><br></font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas">>> repr2_mne.avg</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas">ans = </font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"> mom: {1x3150 cell}</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"> pow: [3150x1751 double]</font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"> noisecov: {1x3150 cell} </font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"><br></font></div><div style="color: rgb(0, 0, 128); "><font face="Consolas"><br></font></div><div><font face="Consolas">As the next step I call the ft_sourceinterpolate:</font></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">cfg=[];</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">cfg.interpmethod=<span style="color: rgb(178, 69, 243); ">'linear'</span>;</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas"><font color="#1f497d">cfg.parameter=</font><span style="color: rgb(178, 69, 243); ">'avg.pow'</span><span style="color: rgb(0, 0, 0); ">; </span></font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">cfg.downsample = 2;</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">cfg.feedback=<span style="color: rgb(178, 69, 243); ">'yes'</span>;</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">repr2_interp=ft_sourceinterpolate(cfg, repr2_mne,template);</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas"><br></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">Then I get the following display message. </font></div><p style="margin: 0px; "></p><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">the input is source data with 3150 positions on a [15 15 14] grid</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">the input is volume data with dimensions [91 109 91]</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">updating homogenous coordinate transformation matrix</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">downsampling anatomy</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">downsampling inside</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">the call to "ft_volumedownsample" took 0 seconds and required the additional allocation of an estimated 0 MB</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">selecting subvolume of 34.7%</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">reslicing and interpolating avg.pow</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas"><br></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">After that the code crashes and I get the error:</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas"><br></font></div><p style="color: rgb(0, 0, 128); margin: 0px; "></p><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">??? Error using ==> interpn at 155</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">Wrong number of input arguments or some dimension of V is less than 2.</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas"><br></font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">Error in ==> ft_sourceinterpolate>my_interpn at 494</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas"> av(sel) = interpn(fv, ax(sel), ay(sel), az(sel), interpmethod);</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas"><br></font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">Error in ==> ft_sourceinterpolate at 397</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas"> av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), cfg.interpmethod,</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas"> cfg.feedback);</font></div><div style="color: rgb(0, 0, 128); "><br class="webkit-block-placeholder"></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas"><br></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">Just before crush in line 397 of ft_sourceinterpolate: av( sel) = my_interpn(fv, ax(sel), ay(sel), az(sel), cfg.interpmethod, cfg.feedback); a</font><span style="font-family: Consolas; ">rgument's size are:</span></div><div style="color: rgb(0, 0, 128); "><div><font color="#1f497d" face="Consolas">size(fv)</font></div><div><font color="#1f497d" face="Consolas">ans =</font></div><div><font color="#1f497d" face="Consolas"> 3150 1751</font></div></div><p style="color: rgb(0, 0, 128); margin: 0px; "></p><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">ax, ay, az, are:</font></div><p style="color: rgb(0, 0, 128); margin: 0px; "></p><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">size(ay)</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">ans =</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas"> 46 55 46</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas"><br></font></div><p style="color: rgb(0, 0, 128); margin: 0px; "></p><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">size(sel)</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">ans =</font></div><div style="color: rgb(0, 0, 128); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas"> 116380 </font><font face="Monaco"> 1</font></div><div style="color: rgb(0, 0, 128); font-family: Monaco; "><br></div><div style="color: rgb(0, 0, 128); "><br class="webkit-block-placeholder"></div><div style="color: rgb(0, 0, 128); "><br class="webkit-block-placeholder"></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">I found one similar post on the list, however its not helpful in that case. Does anyone can spot what I'm missing here?</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas"><br></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">Thank you in advance for you help,</font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas"><br></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Consolas">Tadeusz W. Kononowicz</font></div></div></div></div>
_______________________________________________<br>fieldtrip mailing list<br><a href="mailto:fieldtrip@donders.ru.nl">fieldtrip@donders.ru.nl</a><br>http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Jan-Mathijs Schoffelen, MD PhD </div><div><br></div><div>Donders Institute for Brain, Cognition and Behaviour, <br>Centre for Cognitive Neuroimaging,<br>Radboud University Nijmegen, The Netherlands</div><div><br></div><div>Max Planck Institute for Psycholinguistics,</div><div>Nijmegen, The Netherlands</div><div><br></div><div><a href="mailto:J.Schoffelen@donders.ru.nl">J.Schoffelen@donders.ru.nl</a></div><div>Telephone: +31-24-3614793</div></div></span></div></span></div></span></div></span></div></span></span>
</div>
<br></div></body></html>