[FieldTrip] Possible bug in mtmconvol padding option
TORRALBA CUELLO, MIREIA
mireia.torralba at upf.edu
Mon Feb 24 18:17:26 CET 2020
Hi,
I am a Fieldtrip user and I came across this error
ft_error('the specified padding is too short');
when calculating power spectrum using this code:
cfg=[];
cfg.method='mtmconvol';
cfg.foi=2:1:40;
cfg.t_ftimwin=0.5*ones(length(cfg.foi),1);
cfg.pad=1;
cfg.taper='hanning';
fLast=ft_freqanalysis(cfg,dataLast);
As I see it, the padding should work in each of my time windows (0.5
seconds length each) and therefore the error should not appear, but when I
inspected which is the segment padded by the function I saw
that what is being padded to 1 is the whole segment. I think this is not
right, as what I would like is to increase my frequency resolution by
padding each of the timewindows where I calculate the spectrum. The problem
I have is that I want to use as a baseline another segment which has 0.5
seconds length, and as the frequency extracted by mtmconvol depends on the
length of the segment, I am getting different frequency resolutions for the
baseline and the target data.
Can anyone help me?
Thanks and best regards.
Mireia
Mireia Torralba Cuello
Multisensory Research Group
Center for Brain and Cognition, Universitat Pompeu Fabra
Address: Edifici Mercè Rodoreda 24.313
c\ Ramon Trias Fargas, 25-27
08005 Barcelona
http://www.mrg.upf.edu
Tel +34 935422745
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20200224/0af9595a/attachment.htm>
More information about the fieldtrip
mailing list