[FieldTrip] different frequency bins

"Jörn M. Horschig" jm.horschig at donders.ru.nl
Mon Jul 22 14:50:16 CEST 2013


Dear Johanna,

the problem is that the trial length you put into freqanalysis differed 
across subjects, leading to a different frequency resolution across 
participants. FieldTrip realizes that and errors because 1.9998 is not 
2.0001 ;) I would propose you re-do the frequencyanalysis with the same 
time window/trial length for all participants.
Maybe you should first check why your trials have different lengths and 
if that is desired or you did another mistake somewhere in your 
analysis. If you want to different trial lengths, you can use a padding 
cfg option in ft_freqanalysis to pad trials to a fixed length.

Good luck ;)

Best,
Jörn

On 7/22/2013 2:40 PM, Johanna Fieß wrote:
> Dear all,
>
> whenever I try to compute the statistics for (MEG) time-frequency 
> data, this error message comes up:
>
> computing statistic over the frequency range [8.000 11.000]
> computing statistic over the time range [0.300 1.100]
> Error using ft_appendfreq (line 250)
> the input data structures have non-unique frequency bins, 
> concatenation across frequency is not possible
>
> Error in ft_appendfreq (line 139)
>       freq = ft_appendfreq(tmpcfg, varargin{:});
>
> Error in ft_freqstatistics (line 231)
>     data = ft_appendfreq(cfg, varargin{:});
>
> Out of 35 participants in total, (only) three show slightly different 
> frequency bins (starting point 2.0001 instead of 1.9998) -- if I 
> remove them from the average, the error message disappears.
> If renaming the freq-structure of those three participants, the error 
> message disappears, too.
>
> Could anyone tell me what causes this problem or how I should handle it?
>
> Thanks a lot in advance!
>
> Johanna
>
>
> PS: I'm running Matlab R2012b & fieldtrip-20130515
> %% stats
> design=[1:10,1:10; ones(1,10),ones(1,10)*2];
>
> cfg = [];
> cfg.frequency =  [8 11];
> cfg.latency =  [.3 1.1];
> cfg.method = 'montecarlo';
> cfg.statistic = 'indepsamplesT';
> cfg.correctm = 'cluster';
> cfg.clustertail =0;
> cfg.clusteralpha = 0.05;
> cfg.clusterstatistic = 'maxsum';
> cfg.numrandomization = 500;
> cfg.alpha  = 0.05;
>
> cfg.avgoverfreq     = 'yes';
> % cfg.avgovertime     = 'yes';
> cfg.design  = design;
> cfg.neighbours      = neighbours;
> cfg.ivar  = 2;
>
>
> stat = ft_freqstatistics (cfg,patUr{:}, konUr{:});
> cfg = [];
> cfg.alpha  = 0.3;
> cfg.parameter = 'stat';
> cfg.zlim   = [-3 2];
> cfg.layout = '4D148.lay';
> ft_clusterplot(cfg, stat);
>
>
>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip


-- 
Jörn M. Horschig
PhD Student
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognitive Neuroimaging
Radboud University Nijmegen
Neuronal Oscillations Group
FieldTrip Development Team

P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands

Contact:
E-Mail: jm.horschig at donders.ru.nl
Tel:    +31-(0)24-36-68493
Web: http://www.ru.nl/donders

Visiting address:
Trigon, room 2.30
Kapittelweg 29
NL-6525 EN Nijmegen
The Netherlands

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20130722/0da57a01/attachment.html>


More information about the fieldtrip mailing list