<div dir="ltr">Dear Stephen Whitmarsh,<div><br></div><div>Thank you for your kind and rapid response. </div><div><br></div><div>I tried to run your advice, however the problem remains the same. :(</div><div><br></div><div>May there any other possible solutions?</div><div><br></div><div>Thank you.</div><div><br></div><div>Yankı Tandırcıoğlu</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr"><<a href="mailto:fieldtrip-request@science.ru.nl">fieldtrip-request@science.ru.nl</a>> adresine sahip kullanıcı 1 Şub 2021 Pzt, 14:15 tarihinde şunu yazdı:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Send fieldtrip mailing list submissions to<br>
<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
or, via email, send a message with subject or body 'help' to<br>
<a href="mailto:fieldtrip-request@science.ru.nl" target="_blank">fieldtrip-request@science.ru.nl</a><br>
<br>
You can reach the person managing the list at<br>
<a href="mailto:fieldtrip-owner@science.ru.nl" target="_blank">fieldtrip-owner@science.ru.nl</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of fieldtrip digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Padding Error (Yankı Tandırcıoğlu)<br>
2. Re: Padding Error (Stephen Whitmarsh)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Mon, 1 Feb 2021 13:21:59 +0300<br>
From: Yankı Tandırcıoğlu <<a href="mailto:yankitandircioglu@gmail.com" target="_blank">yankitandircioglu@gmail.com</a>><br>
To: <a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a><br>
Subject: [FieldTrip] Padding Error<br>
Message-ID:<br>
<<a href="mailto:CAExVZ1hKdGZH7zjj-xHjC545EdxK7JRAm0nWf9zbMzpXTPn_xA@mail.gmail.com" target="_blank">CAExVZ1hKdGZH7zjj-xHjC545EdxK7JRAm0nWf9zbMzpXTPn_xA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Dear community,<br>
<br>
My name is Yankı Tandırcıoğlu and I am a student at Middle East Technical<br>
University. Currently I am analyzing MEG dataset.<br>
<br>
I tried using ft_freqanalysis to obtain TFR. However, when I call<br>
ft_freqanalysis, I receive the following error message:<br>
<br>
Error using ft_specest_mtmconvol (line 103)<br>
the padding that you specified is shorter than the data<br>
<br>
The cfg and data I use are as follows:<br>
<br>
cfg = [];<br>
cfg.channel = {'megplanar'};<br>
cfg.lpfilter = 'yes'<br>
cfg.lpfreq = 150<br>
cfg.continuous = 'yes'<br>
RestCondition_1 = ft_preprocessing(cfg, temp);<br>
<br>
<br>
cfg = [];<br>
<br>
cfg.output = 'pow';<br>
<br>
cfg.channel = 'megplanar';<br>
<br>
cfg.method = 'mtmconvol';<br>
<br>
cfg.taper = 'hanning';<br>
<br>
cfg.foi = 2:1:40;<br>
<br>
cfg.toi = [0:0.05:2];<br>
<br>
cfg.trials = 'all';<br>
<br>
cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5;<br>
<br>
cfg.keeptrials= 'yes'; %% we keep the single trials<br>
<br>
freq_Rest1 = ft_freqanalysis(cfg,RestCondition_1);<br>
<br>
Can someone tell me if there is something wrong with the cfg settings I use<br>
or if I am doing something wrong at any other place? T Any help would be<br>
appreciated.<br>
<br>
Best,<br>
<br>
Yankı Tandırcıoğlu<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210201/719a039b/attachment-0001.htm" rel="noreferrer" target="_blank">http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210201/719a039b/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Mon, 1 Feb 2021 11:45:49 +0100<br>
From: Stephen Whitmarsh <<a href="mailto:stephen.whitmarsh@gmail.com" target="_blank">stephen.whitmarsh@gmail.com</a>><br>
To: FieldTrip discussion list <<a href="mailto:fieldtrip@science.ru.nl" target="_blank">fieldtrip@science.ru.nl</a>><br>
Subject: Re: [FieldTrip] Padding Error<br>
Message-ID:<br>
<CAFrxm=<a href="mailto:w2Ws7c9-Ys7yHOhHL56Kkp_ovRHLCBhTyM8fTGXCQQvw@mail.gmail.com" target="_blank">w2Ws7c9-Ys7yHOhHL56Kkp_ovRHLCBhTyM8fTGXCQQvw@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi Yanki,<br>
<br>
I suspect something is off with your sampling frequency / triallength;<br>
<br>
Try debugging:<br>
<br>
type: dbstop if error<br>
<br>
then run again, and see what is happening on line 102-103;<br>
<br>
if round(pad * fsample) < ndatsample<br>
ft_error('the padding that you specified is shorter than the data');<br>
end<br>
<br>
Are the values of sample & ndatsample what you would expect?<br>
<br>
Hope this helps,<br>
Stephen<br>
<br>
<br>
<br>
<br>
Op ma 1 feb. 2021 om 11:29 schreef Yankı Tandırcıoğlu <<br>
<a href="mailto:yankitandircioglu@gmail.com" target="_blank">yankitandircioglu@gmail.com</a>>:<br>
<br>
> Dear community,<br>
><br>
> My name is Yankı Tandırcıoğlu and I am a student at Middle East Technical<br>
> University. Currently I am analyzing MEG dataset.<br>
><br>
> I tried using ft_freqanalysis to obtain TFR. However, when I call<br>
> ft_freqanalysis, I receive the following error message:<br>
><br>
> Error using ft_specest_mtmconvol (line 103)<br>
> the padding that you specified is shorter than the data<br>
><br>
> The cfg and data I use are as follows:<br>
><br>
> cfg = [];<br>
> cfg.channel = {'megplanar'};<br>
> cfg.lpfilter = 'yes'<br>
> cfg.lpfreq = 150<br>
> cfg.continuous = 'yes'<br>
> RestCondition_1 = ft_preprocessing(cfg, temp);<br>
><br>
><br>
> cfg = [];<br>
><br>
> cfg.output = 'pow';<br>
><br>
> cfg.channel = 'megplanar';<br>
><br>
> cfg.method = 'mtmconvol';<br>
><br>
> cfg.taper = 'hanning';<br>
><br>
> cfg.foi = 2:1:40;<br>
><br>
> cfg.toi = [0:0.05:2];<br>
><br>
> cfg.trials = 'all';<br>
><br>
> cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5;<br>
><br>
> cfg.keeptrials= 'yes'; %% we keep the single trials<br>
><br>
> freq_Rest1 = ft_freqanalysis(cfg,RestCondition_1);<br>
><br>
> Can someone tell me if there is something wrong with the cfg settings I<br>
> use or if I am doing something wrong at any other place? T Any help would<br>
> be appreciated.<br>
><br>
> Best,<br>
><br>
> Yankı Tandırcıoğlu<br>
><br>
> _______________________________________________<br>
> fieldtrip mailing list<br>
> <a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
> <a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210201/66e8a247/attachment-0001.htm" rel="noreferrer" target="_blank">http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20210201/66e8a247/attachment-0001.htm</a>><br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
_______________________________________________<br>
fieldtrip mailing list<br>
<a href="https://mailman.science.ru.nl/mailman/listinfo/fieldtrip" rel="noreferrer" target="_blank">https://mailman.science.ru.nl/mailman/listinfo/fieldtrip</a><br>
<a href="https://doi.org/10.1371/journal.pcbi.1002202" rel="noreferrer" target="_blank">https://doi.org/10.1371/journal.pcbi.1002202</a><br>
<br>
<br>
------------------------------<br>
<br>
End of fieldtrip Digest, Vol 123, Issue 1<br>
*****************************************<br>
</blockquote></div>