using ft_sourcegrandaverage with spatio-temporal source reconstructions

jan-mathijs schoffelen jan.schoffelen at DONDERS.RU.NL
Fri Sep 24 15:19:22 CEST 2010

Dear Andreas,

> Hi,
> I have a question concerning the usage of ft_sourcegrandaverage:
> Feeding the ft_sourcegrandaverage function with spatio-temporal
> source reconstruction data (MNE) resulted in the following error
> message:
> ??? Subscripted assignment dimension mismatch.
> Error in ==> ft_sourcegrandaverage at 159
>  dat(:,i) = tmp(:);
> I used the following settings:
> cfg = [];
> cfg.parameter = 'pow';
> cfg.keepindividual = 'yes';
> and called
> ft_sourcegrandaverage(cfg, src1, src2)
> The two source reconstructions (MNE) I generated using
> ft_sourceanalysis.
> Looking into the matlab code (ft_sourcegrandaverage at 159) I
> realized that the problem seems to be that the matrices src1.avg.pow
> and src2.avg.pow are two dimensional [Nsources x Nsamples].
> By diminishing the source power matrix (avg.pow) to one dimension
> (Nsources) I succedded using ft_sourcegrandaverage.
> To perform a source statistic (ft_ft_sourcestatistics) later on it
> would be nice to have the option to include time information as well
> (e.g. like in timelockstatistics).
> Please let me know whether generally it is impossible to use spatio-
> temporal solutions in ft_sourcegrandaverage (and ft_sourcestatistics).
> Thanks,
> Andreas
> --

Yes, I totally agree that the functionality you would like to have is
very useful. At present it is however not yet possible. At the moment
we are in the process of restructuring the code dealing with source-
level data in order to implement exactly this. However, we are not
really proficient in using MNE as inverse method, and are not used to
looking at source level time courses (which is exactly the reason why
it is not yet implemented). It would be really helpful if you could
send us some example data (such as your variables src1 and src2). Have
a look here:
  to see how to send your data.

Best wishes,


Dr. J.M. (Jan-Mathijs) Schoffelen
Donders Institute for Brain, Cognition and Behaviour,
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands
J.Schoffelen at
Telephone: 0031-24-3668063

The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also and

More information about the fieldtrip mailing list