[FieldTrip] Why does ft_selectdata remove "pow" from sourcedata during statistics?
Schoffelen, J.M. (Jan Mathijs)
jan.schoffelen at donders.ru.nl
Wed May 4 11:17:53 CEST 2016
Hi Andreas,
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.
Best,
Jan-Mathijs
On 02 May 2016, at 15:27, Andreas Sauer <sauer.mpih at googlemail.com<mailto:sauer.mpih at googlemail.com>> wrote:
Dear Jan-Mathijs,
thanks for your reply!
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 :-) .
Best wishes,
Andreas
2016-05-01 18:52 GMT+02:00 Schoffelen, J.M. (Jan Mathijs) <jan.schoffelen at donders.ru.nl<mailto:jan.schoffelen at donders.ru.nl>>:
Dear Andreas,
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.
Best,
Jan-Mathijs
On 24 Apr 2016, at 18:36, Andreas Sauer <sauer.mpih at googlemail.com<mailto:sauer.mpih at googlemail.com>> wrote:
Dear all,
unfortunately, I am having problems to run source statistics on ERF mismatch negativity data (recorded with a 4D system).
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“
pow: [16x37696 double]
dim: [31 38 32]
inside: [37696x1 logical]
pos: [37696x3 double]
time: [1x900 double]
cfg: [1x1 struct]
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.
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.
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.
Any help with this (esp. why „pow“ is being removed) is highly appreciated!
Thanks and best wishes,
Andreas
--
Dipl.-Psych. Andreas Sauer
Max Planck Institute for Brain Research
Deutschordenstraße 46
60528 Frankfurt am Main
Germany
T: +49 69 96769 278<tel:%2B49%2069%2096769%20278>
F: +49 69 96769 327<tel:%2B49%2069%2096769%20327>
Email: sauer.mpih at gmail.com<mailto:sauer.mpih at gmail.com>
www.brain.mpg.de<http://www.brain.mpg.de/>
_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
--
Dipl.-Psych. Andreas Sauer
Max Planck Institute for Brain Research
Deutschordenstraße 46
60528 Frankfurt am Main
Germany
T: +49 69 96769 278
F: +49 69 96769 327
Email: sauer.mpih at gmail.com<mailto:sauer.mpih at gmail.com>
www.brain.mpg.de<http://www.brain.mpg.de/>
_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20160504/73a9bb69/attachment-0002.html>
More information about the fieldtrip
mailing list