Dear Jason,<br/>
<br/>
the pos indicates where the original sources were (i.e. on a regular grid with a certain spacing or self-defined). After interpolation this information does not reflect the data anymore. I would suggest to use Ingrid nieuwenhuis famous reverse normalization technique to create individual subject grids taht all match in MNI space - the script is found on the ft website. Sourceinterpoltae should really only be used for plotting IMHO.<br/>
<br/>
Michael<br>
<br>
<div name="quote" style='margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;'>
<div style="margin:0 0 10px 0;">
<b>Gesendet:</b> Mittwoch, 14. März 2012 um 17:28 Uhr<br/>
<b>Von:</b> "Jason Chan" <chan@med.uni-frankfurt.de><br/>
<b>An:</b> fieldtrip@donders.ru.nl<br/>
<b>Betreff:</b> [FieldTrip] missing pos in beamforming
</div>
<div name="quoted-content">
<!--p.MsoNormal, li.MsoNormal, div.MsoNormal {
margin: 0.0cm;
font-size: 11.0pt;
font-family: Calibri , sans-serif;
}
a:link, span.MsoHyperlink {
color: blue;
text-decoration: underline;
}
a:visited, span.MsoHyperlinkFollowed {
color: purple;
text-decoration: underline;
}
span.EmailStyle17 {
font-family: Calibri , sans-serif;
color: windowtext;
}
*.MsoChpDefault {
font-family: Calibri , sans-serif;
}
div.WordSection1 {
page: WordSection1;
}
--><div><div class="WordSection1"><p class="MsoNormal"><span>Greetings,</span></p><p class="MsoNormal"><span>I am adapting the beamformer tutorial to my data. When I </span><span style="font-size: 10.0pt;font-family: "Courier New";color: black;">sourceinterpolate</span><span> the subtracted sourceA from sourceB data, the ‘pos’ disappears. This seems to be important for the volume normalization and Grand Average. I am running Fieldtrip version: 20110917. I have placed the code below.</span></p><p class="MsoNormal"><span> </span></p><p class="MsoNormal"><span>Many thanks in advance.</span></p><p class="MsoNormal"><span>Jason</span></p><p class="MsoNormal"><span> </span></p><p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Courier New";color: black;"> </span></p><p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Courier New";color: black;">Young_CombineFilter_sourceDiff_16_3={};</span><span style="font-size: 12.0pt;font-family: "Courier New";"></span></p><p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Courier New";color: black;"> </span><span style="font-size: 12.0pt;font-family: "Courier New";"></span></p><p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Courier New";color: blue;">for</span><span style="font-size: 10.0pt;font-family: "Courier New";color: black;"> i=1:length(Young_CombineFilter_beamform_16_3);</span><span style="font-size: 12.0pt;font-family: "Courier New";"></span></p><p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Courier New";color: black;"> cfg=[];</span><span style="font-size: 12.0pt;font-family: "Courier New";"></span></p><p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Courier New";color: black;"> Young_CombineFilter_sourceDiff_16_3{i} =Young_CombineFilter_beamform_16_3{i}.sourceA;</span><span style="font-size: 12.0pt;font-family: "Courier New";"></span></p><p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Courier New";color: black;"> Young_CombineFilter_sourceDiff_16_3{i}.avg.pow =(Young_CombineFilter_beamform_16_3{i}.sourceA.avg.pow - Young_CombineFilter_beamform_16_3{i}.sourceB.avg.pow)./Young_CombineFilter_beamform_16_3{i}.sourceB.avg.pow;</span><span style="font-size: 12.0pt;font-family: "Courier New";"></span></p><p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Courier New";color: black;"> </span><span style="font-size: 12.0pt;font-family: "Courier New";"></span></p><p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Courier New";color: black;"> cfg = [];</span><span style="font-size: 12.0pt;font-family: "Courier New";"></span></p><p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Courier New";color: black;"> cfg.downsample = 2;</span><span style="font-size: 12.0pt;font-family: "Courier New";"></span></p><p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Courier New";color: black;"> cfg.parameter = </span><span style="font-size: 10.0pt;font-family: "Courier New";color: rgb(160,32,240);">'avg.pow'</span><span style="font-size: 10.0pt;font-family: "Courier New";color: black;">;</span><span style="font-size: 12.0pt;font-family: "Courier New";"></span></p><p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Courier New";color: black;"> cfg.anatomy = mri{i};</span><span style="font-size: 12.0pt;font-family: "Courier New";"></span></p><p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Courier New";color: black;"> cfg.keepfilter=</span><span style="font-size: 10.0pt;font-family: "Courier New";color: rgb(160,32,240);">'yes'</span><span style="font-size: 10.0pt;font-family: "Courier New";color: black;">;</span><span style="font-size: 12.0pt;font-family: "Courier New";"></span></p><p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Courier New";color: black;"> cfg.interpmethod=</span><span style="font-size: 10.0pt;font-family: "Courier New";color: rgb(160,32,240);">'linear'</span><span style="font-size: 10.0pt;font-family: "Courier New";color: black;">;</span><span style="font-size: 12.0pt;font-family: "Courier New";"></span></p><p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Courier New";color: black;"> Young_CombineFilter_sourceDiffInt_16_3{i}=ft_sourceinterpolate(cfg,Young_CombineFilter_sourceDiff_16_3{i}, mri_young{i});</span><span style="font-size: 12.0pt;font-family: "Courier New";"></span></p><p class="MsoNormal"><span style="font-size: 10.0pt;font-family: "Courier New";color: blue;">end</span><span style="font-size: 10.0pt;font-family: "Courier New";color: black;">;</span><span style="font-size: 12.0pt;font-family: "Courier New";"></span></p></div></div>
</div>
</div>
<br/>