<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<br class="">
<div class=""><br class="">
<div class="">Hi Andreas,</div>
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class="">I think that the reason why ft_selectdata removes the ‘pow’-field is due to its overzealous bookkeeping. The data-structure you mentioned in a previous e-mail is not fully internally consistent (probably not your fault, by the way). Although it
 lacks a proper ‘dimord’ field, which specifies how the primary numeric data should be interpreted (in your case you probably want it to be: ‘subj_pos’), it also contains a ‘time’ field. In the absence of the dimord, FT is trying to create one from the data
 structure, and I suspect that the presence of the time-field will lead to something like ‘subj_pos_time’ or so. Subsequently, ft_seletdata only passes on those numeric data fields that are consistent with this dimord, which does not include pow. Anyway, my
 hunch is that if you do a rmfield(data,’time’), prior to calling ft_sourcestatistics the old-fashioned way (i.e. with the data being passed through ft_sourcegrandaverage), it may work as well.</div>
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On 02 May 2016, at 15:27, Andreas Sauer <<a href="mailto:sauer.mpih@googlemail.com" class="">sauer.mpih@googlemail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Dear Jan-Mathijs,
<div class=""><br class="">
</div>
<div class="">thanks for your reply! </div>
<div class=""><br class="">
</div>
<div class="">In the meantime, another colleague also suggested to use a different syntax and that worked! I still don't understand, why ft_selectdata removes the "pow" field, but I can go on calculating my stats :-) . </div>
<div class=""><br class="">
</div>
<div class="">Best wishes,</div>
<div class=""><br class="">
</div>
<div class="">Andreas</div>
<div class=""><br class="">
</div>
</div>
<div class="gmail_extra"><br class="">
<div class="gmail_quote">2016-05-01 18:52 GMT+02:00 Schoffelen, J.M. (Jan Mathijs)
<span dir="ltr" class=""><<a href="mailto:jan.schoffelen@donders.ru.nl" target="_blank" class="">jan.schoffelen@donders.ru.nl</a>></span>:<br class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word" class="">
<div class="">Dear Andreas,</div>
<div class=""><br class="">
</div>
Have you tried it with a more recent version? Also, I would recommend not to use ft_sourcegrandaverage, but to use the syntax ft_sourcestatistics(cfg, source1{:}, source2{:}), assuming you have the single subject data represented in a cell-array of structures,
 with source1 for condition 1 and source2 for condition 2.
<div class=""><br class="">
</div>
<div class="">Best,</div>
<div class="">Jan-Mathijs</div>
<div class=""><br class="">
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
<div class="">
<blockquote type="cite" class="">
<div class="">
<div class="h5">
<div class="">On 24 Apr 2016, at 18:36, Andreas Sauer <<a href="mailto:sauer.mpih@googlemail.com" target="_blank" class="">sauer.mpih@googlemail.com</a>> wrote:</div>
<br class="">
</div>
</div>
<div class="">
<div class="">
<div class="h5">
<div dir="ltr" class="">
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35)" class="">
<span class="">Dear all,</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35);min-height:15px" class="">
<span class=""></span><br class="">
</div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35)" class="">
<span class="">unfortunately, I am having problems to run source statistics on ERF mismatch negativity data (recorded with a 4D system). </span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35);min-height:15px" class="">
<span class=""></span><br class="">
</div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35)" class="">
<span class="">With the following data structure as input (output from ft_sourcegrandaverage), fieldtrip gives a warning that it „could not determine dimord of „pow“ in the following data“</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35);min-height:15px" class="">
<span class=""></span><br class="">
</div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35)" class="">
<span class="">pow: [16x37696 double]</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35)" class="">
<span class="">dim: [31 38 32]</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35)" class="">
<span class="">inside: [37696x1 logical]</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35)" class="">
<span class="">pos: [37696x3 double]</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35)" class="">
<span class="">time: [1x900 double]</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35)" class="">
<span class="">cfg: [1x1 struct]</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35);min-height:15px" class="">
<span class=""></span><br class="">
</div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35)" class="">
<span class="">and later throws an error that „field „pow“ (is) not present in data“. I checked the ft_sourcestatistic script step by step and found out that ft_selectdata removes it after being called by ft_sourcestatistics.</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35);min-height:15px" class="">
<span class=""></span><br class="">
</div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35)" class="">
<span class="">I am using the fieldtrip version from 15/05/2015. I also tried with older versions, one from late 2014 and late 2013, but nothing worked.</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35);min-height:15px" class="">
<span class=""></span><br class="">
</div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35)" class="">
<span class="">Unfortunately, since ft_selectdata removes the field "pow" from the data during the call to ft_sourcestatistic, I can’t put it back in to the structure. </span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35);min-height:15px" class="">
<span class=""></span><br class="">
</div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35)" class="">
<span class="">Any help with this (esp. why „pow“ is being removed) is highly appreciated!</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35);min-height:15px" class="">
<span class=""></span><br class="">
</div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35)" class="">
<span class="">Thanks and best wishes,</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35);min-height:15px" class="">
<span class=""></span><br class="">
</div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35)" class="">
<span class="">Andreas</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35)" class="">
<span class=""><br class="">
</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Arial;color:rgb(35,35,35)" class="">
<span class=""><br class="">
</span></div>
<div class="">
<div class=""><br class="">
</div>
-- <br class="">
<div class="">
<div class=""></div>
<div class="">Dipl.-Psych. Andreas Sauer</div>
<div class="">Max Planck Institute for Brain Research</div>
<div class="">Deutschordenstraße 46</div>
<div class="">60528 Frankfurt am Main</div>
<div class="">Germany</div>
<div class=""><br class="">
</div>
<div class="">T: <a href="tel:%2B49%2069%2096769%20278" value="+496996769278" target="_blank" class="">
+49 69 96769 278</a></div>
<div class="">F: <a href="tel:%2B49%2069%2096769%20327" value="+496996769327" target="_blank" class="">
+49 69 96769 327</a></div>
<div class="">Email: <a href="mailto:sauer.mpih@gmail.com" target="_blank" class="">
sauer.mpih@gmail.com</a></div>
<div class=""><a href="http://www.brain.mpg.de/" target="_blank" class="">www.brain.mpg.de</a></div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="mailto:fieldtrip@donders.ru.nl" target="_blank" class="">fieldtrip@donders.ru.nl</a><br class="">
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" target="_blank" class="">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
<br class="">
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="mailto:fieldtrip@donders.ru.nl" class="">fieldtrip@donders.ru.nl</a><br class="">
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank" class="">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br class="">
</blockquote>
</div>
<br class="">
<br clear="all" class="">
<div class=""><br class="">
</div>
-- <br class="">
<div class="gmail_signature">
<div class=""></div>
<div class="">Dipl.-Psych. Andreas Sauer</div>
<div class="">Max Planck Institute for Brain Research</div>
<div class="">Deutschordenstraße 46</div>
<div class="">60528 Frankfurt am Main</div>
<div class="">Germany</div>
<div class=""><br class="">
</div>
<div class="">T: +49 69 96769 278</div>
<div class="">F: +49 69 96769 327</div>
<div class="">Email: <a href="mailto:sauer.mpih@gmail.com" target="_blank" class="">
sauer.mpih@gmail.com</a></div>
<div class=""><a href="http://www.brain.mpg.de/" target="_blank" class="">www.brain.mpg.de</a></div>
</div>
</div>
_______________________________________________<br class="">
fieldtrip mailing list<br class="">
<a href="mailto:fieldtrip@donders.ru.nl" class="">fieldtrip@donders.ru.nl</a><br class="">
<a href="http://mailman.science.ru.nl/mailman/listinfo/fieldtrip" class="">http://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a></div>
</blockquote>
</div>
<br class="">
</div>
</div>
<br class="">
<br class="">
</div>
</div>
<br class="">
</body>
</html>