[FieldTrip] ft_sourcestatistics cannot find field 'pos'

Joram van Driel joramvandriel at gmail.com
Fri Jan 24 08:54:24 CET 2014

Hi all,

I'm getting stuck with ft_sourcestatistics.
I want to do a simple two-condition contrast on neuromag MEG data, where I
did frequency beamforming on a pre vs. post tf-window.

I followed the instructions of the tutorial, so for each subject and

1) ft_sourceanalysis with subject-specific vol and grid structures, where I
did the pre vs post contrast as follows:

        sourceAll = ft_sourceanalysis(cfg, freqAll(condi));

        cfg.grid.filter = sourceAll.avg.filter;
        sourcePre_con  = ft_sourceanalysis(cfg, freqPre(condi) );
        sourcePost_con = ft_sourceanalysis(cfg, freqPost(condi));

        sourceDiff(condi) = sourcePost_con;
        sourceDiff(condi).avg.pow = (sourcePost_con.avg.pow -
sourcePre_con.avg.pow) ./ sourcePre_con.avg.pow;

2) ft_sourceinterpolate with the subject-specific mri
3) ft_volumenormalize to MNI with coordsys 'neuromag'.
4) The output is stored in a subject-by-condition cell array, which I put
into ft_sourcestatistics with the following cfg:

cfg = [];
cfg.parameter = 'avg.pow';
cfg.method    = 'analytic';
cfg.statistic = 'depsamplesT';
cfg.correctm  = 'no';
cfg.alpha     = 0.05;

Nsub = 10;
cfg.design(1,1:2*Nsub) = [ones(1,Nsub) 2*ones(1,Nsub)];
cfg.design(2,1:2*Nsub) = [1:Nsub 1:Nsub];
cfg.tail             = 0; % number, -1, 1 or 0 (default = 0)
cfg.ivar             = 1; % number or list with indices, independent
cfg.uvar             = 2; % number or list with indices, unit variable(s)

stat = ft_sourcestatistics(cfg,sourceDiffNorm{:,1}, sourceDiffNorm{:,2});

This results in the error that it cannot find the field 'pos'; however this
field is only present in the result from ft_sourceanalysis (and differs for
each subject), but disappears as soon as ft_sourceinterpolate is applied. I
tried to put the result from ft_sourceanalysis straight into
ft_sourcestatistics (which according to the help should be possible), but
this doesn't recognize the input as volume data (and apart from that, the
subjects aren't spatially aligned this way).

I hope someone can help me with this; any help is much appreciated!


Joram van Driel, MSc.
PhD student @ University of Amsterdam
Brain & Cognition @ Department of Psychology
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20140124/739b5c73/attachment-0001.html>

More information about the fieldtrip mailing list