<div dir="ltr">Hi Jörn,<div><div class="gmail_extra"><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hi Joram,<br>
<br>
you probably need to interpolate to a template and then put the pos and dim field from the template you used in the source structure.</blockquote><div><br></div><div>With source structure you mean the result from ft_sourcegrandaverage? That already has a pos and dim field. Or the subject individual source structures, <b>after</b> ft_sourceinterpolate but <b>before</b> ft_volumenormalise?</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"> You do not have to interpolate, but then make sure that the dimensions of your anatomy match the dimensions of your sourcemodel.<br>
</blockquote><div><br></div><div>I'm not sure what you mean here. I did for each subject ft_sourceinterpolate and ft_volumenormalise. Shouldn't then ft_sourcegrandaverage give me something that I could plot with ft_sourceplot? Or am I asking too much of FieldTrip right now :) According to the regular beamforming tutorial this should be possible.</div>
<div><br></div><div>But I will try the steps from the extended tutorial (and this one might be useful as well: <a href="http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space">http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space</a>) and see how far that brings me! </div>
<div><br></div><div>Thanks,</div><div>Joram</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Not sure if you followed any tutorial, but this is a good one:<br>
<a href="http://fieldtrip.fcdonders.nl/tutorial/beamformingextended" target="_blank">http://fieldtrip.fcdonders.nl/<u></u>tutorial/beamformingextended</a><br>
<br>
Best,<br>
Jörn<div class="im"><br>
<br>
<br>
On 2/3/2014 9:59 AM, Joram van Driel wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">
Hi Jörn,<br>
Not a stupid question at all, because indeed there isn't. I thought that was the problem too; I already tried putting the .anatomy field of one of the (normalized) subjects into the grandavg structure, but that resulted in a bunch of errors due to an error in the cornerpoints function.<br>
This is how the grandavg structure looks like after ft_sourcegrandaverage (fieldtrip version 20140127):<br>
<br>
pos: [7109137x3 double]<br>
dim: [181 217 181]<br>
avg: [1x1 struct]<br>
var: [1x1 struct]<br>
dimord: 'voxel'<br>
inside: [1550519x1 double]<br>
outside: [5558618x1 double]<br>
df: [7109137x1 double]<br>
cfg: [1x1 struct]<br>
<br>
This my cfg:<br>
<br>
grandavg = cell(1,2);<br>
cfg = [];<br>
cfg.parameter = 'avg.pow';<br>
cfg.keepindividual = 'no';<br>
grandavg{1} = ft_sourcegrandaverage(cfg,<u></u>sourceDiffAll{:,1}); % condition 1<br>
grandavg{2} = ft_sourcegrandaverage(cfg,<u></u>sourceDiffAll{:,2}); % condition 2<br>
<br>
Hope you can find out what the problem is..!<br>
<br>
Thanks a lot,<br>
Joram<br>
<br>
<br>
<br></div><div><div class="h5">
On Mon, Feb 3, 2014 at 9:10 AM, "Jörn M. Horschig" <<a href="mailto:jm.horschig@donders.ru.nl" target="_blank">jm.horschig@donders.ru.nl</a> <mailto:<a href="mailto:jm.horschig@donders.ru.nl" target="_blank">jm.horschig@donders.<u></u>ru.nl</a>>> wrote:<br>
<br>
Hi Joram,<br>
<br>
this might be a stupid question, but is there a<br>
grandavg{1}.anatomy field at all?<br>
<br>
Best,<br>
Jörn<br>
<br>
<br>
On 1/31/2014 12:44 PM, Joram van Driel wrote:<br>
<br>
Hi all,<br>
<br>
I'm trying to plot the grand average of a source analysis.<br>
However no matter what I try, the result of<br>
ft_sourcegrandaverage keeps giving me only the functional<br>
data, no anatomy.<br>
<br>
My cfg for ft_sourceplot is:<br>
<br>
cfg = [];<br>
cfg.method = 'ortho';<br>
cfg.interactive = 'no';<br>
cfg.funparameter = 'avg.pow';<br>
cfg.maskparameter = cfg.funparameter;<br>
cfg.funcolorlim = [0 0.2];<br>
cfg.opacitylim = [0 0.2];<br>
cfg.opacitymap = 'rampup';<br>
<br>
ft_sourceplot(cfg,grandavg{1})<br>
<br>
I thus created my own grandaverage, like this (where<br>
sourceDiffAll{:,:} is a subject-by-condition cell structure):<br>
<br>
temp = zeros([length(nsubjects)<br>
size(sourceDiffAll{1,1}.avg.<u></u>pow)]);<br>
for s=1:length(nsubjects)<br>
temp(s,:,:,:) = sourceDiffAll{s,2}.avg.pow -<br>
sourceDiffAll{s,1}.avg.pow; % create condition contrast<br>
end<br>
customavg = sourceDiffAll{1,1}; % just copy one subject one<br>
condition<br>
customavg.avg.pow = squeeze(mean(temp,1)); % and replace power<br>
with the grand average power condition-contrast<br>
<br>
Now using ft_sourceplot on customavg works just fine.<br>
Any idea of what's going wrong with ft_sourceplot on<br>
ft_sourcegrandaverage?<br>
Thanks!<br>
<br>
- Joram<br>
<br>
<br>
-- Joram van Driel, MSc.<br>
PhD student @ University of Amsterdam<br>
Brain & Cognition @ Department of Psychology<br>
<br>
<br>
______________________________<u></u>_________________<br>
fieldtrip mailing list<br></div></div>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a> <mailto:<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.<u></u>nl</a>><div class="im"><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/<u></u>mailman/listinfo/fieldtrip</a><br>
<br>
<br>
<br>
-- Jörn M. Horschig<br>
PhD Student<br>
Donders Institute for Brain, Cognition and Behaviour<br>
Centre for Cognitive Neuroimaging<br>
Radboud University Nijmegen<br>
Neuronal Oscillations Group<br>
FieldTrip Development Team<br>
<br>
P.O. Box 9101<br>
NL-6500 HB Nijmegen<br>
The Netherlands<br>
<br>
Contact:<br></div>
E-Mail: <a href="mailto:jm.horschig@donders.ru.nl" target="_blank">jm.horschig@donders.ru.nl</a> <mailto:<a href="mailto:jm.horschig@donders.ru.nl" target="_blank">jm.horschig@donders.<u></u>ru.nl</a>><br>
Tel: <a href="tel:%2B31-%280%2924-36-68493" value="+31243668493" target="_blank">+31-(0)24-36-68493</a> <tel:%2B31-%280%2924-36-68493><div class="im"><br>
Web: <a href="http://www.ru.nl/donders" target="_blank">http://www.ru.nl/donders</a><br>
<br>
Visiting address:<br>
Trigon, room 2.30<br>
Kapittelweg 29<br>
NL-6525 EN Nijmegen<br>
The Netherlands<br>
<br>
______________________________<u></u>_________________<br>
fieldtrip mailing list<br></div>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a> <mailto:<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.<u></u>nl</a>><div><div class="h5"><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/<u></u>mailman/listinfo/fieldtrip</a><br>
<br>
<br>
<br>
<br>
-- <br>
Joram van Driel, MSc.<br>
PhD student @ University of Amsterdam<br>
Brain & Cognition @ Department of Psychology<br>
<br>
<br>
______________________________<u></u>_________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/<u></u>mailman/listinfo/fieldtrip</a><br>
</div></div></blockquote><div class=""><div class="h5">
<br>
<br>
-- <br>
Jörn M. Horschig<br>
PhD Student<br>
Donders Institute for Brain, Cognition and Behaviour<br>
Centre for Cognitive Neuroimaging<br>
Radboud University Nijmegen<br>
Neuronal Oscillations Group<br>
FieldTrip Development Team<br>
<br>
P.O. Box 9101<br>
NL-6500 HB Nijmegen<br>
The Netherlands<br>
<br>
Contact:<br>
E-Mail: <a href="mailto:jm.horschig@donders.ru.nl" target="_blank">jm.horschig@donders.ru.nl</a><br>
Tel: <a href="tel:%2B31-%280%2924-36-68493" value="+31243668493" target="_blank">+31-(0)24-36-68493</a><br>
Web: <a href="http://www.ru.nl/donders" target="_blank">http://www.ru.nl/donders</a><br>
<br>
Visiting address:<br>
Trigon, room 2.30<br>
Kapittelweg 29<br>
NL-6525 EN Nijmegen<br>
The Netherlands<br>
<br>
______________________________<u></u>_________________<br>
fieldtrip mailing list<br>
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank">fieldtrip@donders.ru.nl</a><br>
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank">http://mailman.science.ru.nl/<u></u>mailman/listinfo/fieldtrip</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Joram van Driel, MSc.<div>PhD student @ University of Amsterdam</div><div>Brain & Cognition @ Department of Psychology</div></div>
</div></div></div>