<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p style="">Hey laura,<br>
</p>
<p style=""><br>
</p>
<p style="">Im not 100% sure of what I am about to tell you, as I am not an expert, but I think ft_sourceinterpolate is used in tutorials<br>
</p>
<p style="">to display results on an mri model basically. One such tutorial is: </p>
<p style="">http://fieldtrip.fcdonders.nl/tutorial/beamformingextended<br>
</p>
<p style=""><br>
</p>
<p style="">If you want to be consistent over subjects, I would use a sourcemodel when calculating your source variable, like in: <br>
</p>
<p style=""><a href="http://fieldtrip.fcdonders.nl/faq/how_can_i_map_source_locations_between_two_different_representations?s[]=atlas" id="NoLP">http://fieldtrip.fcdonders.nl/faq/how_can_i_map_source_locations_between_two_different_representations?s[]=atlas</a><br>
</p>
<p style="">and: <a href="http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=subject&s[]=grid&s[]=mni" id="NoLP">http://fieldtrip.fcdonders.nl/example/create_single-subject_grids_in_individual_head_space_that_are_all_aligned_in_mni_space?s[]=subject&s[]=grid&s[]=mni</a>​<br>
</p>
<p style=""><br>
</p>
<p style="">I really hope this helps, it helped me :)<br>
</p>
<p style=""><br>
</p>
<p style="">Tyler<br>
</p>
<p style=""><br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-size:13px">*************************
<div style="font-family:Tahoma"><br>
</div>
<div><font face="Arial"><i>Tyler Grummett ( BBSc, BSc(Hons I))</i></font></div>
<div><font face="Arial"><i>PhD Candidate</i></font></div>
<div><font face="Arial"><i>Brain Signals Laboratory</i></font></div>
<div><font face="Arial"><i>Flinders University</i></font></div>
<div><font face="Arial"><i>Rm 5A301</i></font></div>
<div><font face="Arial"><i>Ext 66124</i></font></div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> fieldtrip-bounces@science.ru.nl <fieldtrip-bounces@science.ru.nl> on behalf of Laura Rueda Delgado <Laura.Rueda@faber.kuleuven.be><br>
<b>Sent:</b> Friday, 25 July 2014 1:06 AM<br>
<b>To:</b> fieldtrip@science.ru.nl<br>
<b>Subject:</b> [FieldTrip] Group analysis at source level</font>
<div> </div>
</div>
<div>
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">Dear fieldtrip users,
<div><br>
</div>
<div>I'm working with source estimations of EEG data. At the moment, I have estimated the sources at the individual level with individual MRIs. I've used ft_sourceinterpolate and ft_volumenormalise to transform the resulting estimation maps into a template
 for comparison, and I do this for every subject: </div>
<div><br>
</div>
<div>
<div> cfg             = [];</div>
<div>    cfg.parameter   = 'avg.pow';</div>
<div>    source  = ft_sourceinterpolate(cfg, source, mri);</div>
<div><br>
</div>
<div>    cfg = [];</div>
<div>    cfg.template = '\spm8\templates\T1.nii';</div>
<div>    cfg.parameter = 'all';</div>
<div>    cfg.nonlinear = 'yes';</div>
<div>    cfg.coordsys = 'spm';</div>
<div>    source = ft_volumenormalise(cfg, source); </div>
</div>
<div><br>
</div>
<div>Once I have the estimated sources for all the subjects, I use ft_sourcestatistics:</div>
<div><br>
</div>
<div>
<div>cfg             = [];</div>
<div>cfg.dim         = sourcePre_con{1}.dim;</div>
<div>cfg.method      = 'montecarlo';</div>
<div>cfg.statistic   = 'depsamplesT';</div>
<div>cfg.parameter   = 'avg.pow';</div>
<div>cfg.correctm    = 'cluster';</div>
<div>cfg.numrandomization = 'all';</div>
<div>cfg.alpha       = 0.05;</div>
<div>cfg.tail        = 0;</div>
<div>cfg.design(1,:) = [1:num 1:num];</div>
<div>cfg.design(2,:) = [ones(1,num) ones(1,num)*2];</div>
<div>cfg.uvar        = 1;</div>
<div>cfg.ivar        = 2; </div>
<div>stat = ft_sourcestatistics(cfg,sourcePost_con{:},  sourcePre_con{:});</div>
</div>
<div><br>
</div>
<div>And I get this error:</div>
<div><br>
</div>
<div>
<div><font color="#ff0000">Reference to non-existent field 'pos'.</font></div>
<div><font color="#ff0000"><br>
</font></div>
<div><font color="#ff0000">Error in statistics_wrapper>get_source_avg (line 643)</font></div>
<div><font color="#ff0000">  fprintf('only selecting voxels inside the brain for statistics (%.1f%%)\n', 100*length(varargin{1}.inside)/size(varargin{1}.pos,1));</font></div>
<div><font color="#ff0000"><br>
</font></div>
<div><font color="#ff0000">Error in statistics_wrapper (line 206)</font></div>
<div><font color="#ff0000">    [dat, cfg] = get_source_avg(cfg, varargin{:});</font></div>
<div><font color="#ff0000"><br>
</font></div>
<div><font color="#ff0000">Error in ft_sourcestatistics (line 107)</font></div>
<div><font color="#ff0000">    [stat, cfg] = statistics_wrapper(cfg, varargin{:});</font></div>
</div>
<div><font color="#ff0000"><br>
</font></div>
<div>I check the data structure and the structure of the sources at the individual level, before interpolating and normalising has the pos field, but after these steps, it's gone. How can I work around this error? Do I have to keep the pos field and transform
 it according to the template?</div>
<div><br>
</div>
<div>Thank you in advance for your help.</div>
<div><br>
</div>
<div>Best regards,</div>
<div><br>
</div>
<div>Laura Rueda</div>
</div>
</div>
</div>
</body>
</html>