[FieldTrip] Padding Error

Stephen Whitmarsh stephen.whitmarsh at gmail.com
Mon Feb 1 11:45:49 CET 2021


Hi Yanki,

I suspect something is off with your sampling frequency / triallength;

Try debugging:

type: dbstop if error

then run again, and see what is happening on line 102-103;

if round(pad * fsample) < ndatsample
  ft_error('the padding that you specified is shorter than the data');
end

Are the values of sample & ndatsample what you would expect?

Hope this helps,
Stephen




Op ma 1 feb. 2021 om 11:29 schreef Yankı Tandırcıoğlu <
yankitandircioglu at gmail.com>:

> Dear community,
>
> My name is Yankı Tandırcıoğlu and I am a student at Middle East Technical
> University. Currently I am analyzing MEG dataset.
>
> I tried using ft_freqanalysis to obtain TFR. However, when I call
> ft_freqanalysis, I receive the following error message:
>
> Error using ft_specest_mtmconvol (line 103)
> the padding that you specified is shorter than the data
>
> The cfg and data I use are as follows:
>
> cfg                         = [];
> cfg.channel      = {'megplanar'};
> cfg.lpfilter = 'yes'
> cfg.lpfreq = 150
> cfg.continuous = 'yes'
> RestCondition_1 = ft_preprocessing(cfg, temp);
>
>
> cfg            = [];
>
> cfg.output    = 'pow';
>
> cfg.channel    = 'megplanar';
>
> cfg.method     = 'mtmconvol';
>
> cfg.taper      = 'hanning';
>
> cfg.foi        = 2:1:40;
>
> cfg.toi        = [0:0.05:2];
>
> cfg.trials     = 'all';
>
> cfg.t_ftimwin  = ones(length(cfg.foi),1).*0.5;
>
> cfg.keeptrials= 'yes'; %% we keep the single trials
>
> freq_Rest1    = ft_freqanalysis(cfg,RestCondition_1);
>
> Can someone tell me if there is something wrong with the cfg settings I
> use or if I am doing something wrong at any other place? T Any help would
> be appreciated.
>
> Best,
>
> Yankı Tandırcıoğlu
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210201/66e8a247/attachment.htm>


More information about the fieldtrip mailing list