[FieldTrip] mtmfft vs. mtmconvol

Pomper, Ulrich u.pomper at ucl.ac.uk
Wed Aug 10 12:44:06 CEST 2016


Dear all,

Below please find some code which illustrates the issue I'm having.

Example data can be found here: https://www.dropbox.com/s/5bgpawph49vkgoo/data_fft_vs_conv.mat?dl=0


The code results in a plot of the PSD, showing how both mtmfft and mtmconvol  yield (more or less) similar results, but only after the results from mtmfft are multiplied by 10.

Again, I'd be grateful for any clarification on why this might be!
Cheers,
Ulrich


%%%%%%%%%%%%% MTMFFT code %%%%%%%%%%%%%%%%%%%%%%%%%

                cfg = [];
                cfg.continuous = 'no';
                cfg.channel      = {'all', '-VEOG', '-HEOG'}
                cfg.output = 'pow';
                cfg.method       = 'mtmfft';
                cfg.foi          =  1:0.5:30;
                cfg.taper   = 'hanning';
                cfg.tapsmofrq = 2 +(0*(cfg.foi));
                cfg.keeptapers = 'no';
                cfg.keeptrials   = 'no';
                cfg.pad        = 5;
                freq_fft = ft_freqanalysis(cfg, data);


%%%%%%%%%%%%% MTMCONVOL code %%%%%%%%%%%%%%%%%%%%%%%%%

                taplen = 695;
                cfg = [];
                cfg.continuous = 'no';
                cfg.channel      = {'all', '-VEOG', '-HEOG'}
                cfg.output = 'pow';
                cfg.method       = 'mtmconvol';
                cfg.foi          =  1:0.5:30;
                cfg.toi          =  0.25;
                cfg.taper   = 'hanning';
                cfg.tapsmofrq = 2 +(0*(cfg.foi));                   cfg.t_ftimwin    = ones(length(cfg.foi),1).* (taplen /1000); %
                cfg.keeptapers = 'no';
                cfg.keeptrials   = 'no';
                cfg.pad        = 5;
                freq_conv = ft_freqanalysis(cfg, data);

%%%%%%%%%% plot the two different results for comparison %%%%%%%%%%%%%%%%%

CH1_mean_fft = freq_fft.powspctrm(1,:);
CH1_mean_conv = freq_conv.powspctrm(1,:);

% mtmfft data multiplied by 10, which puts them in a similar order of  magnitude  as the results from mtmconvol
CH1_mean_fft10 = freq_fft.powspctrm(1,:) * 10;



figure; plot(CH1_mean_conv); hold on; plot(CH1_mean_fft10); hold on; plot(CH1_mean_fft);




________________________________
From: fieldtrip-bounces at science.ru.nl <fieldtrip-bounces at science.ru.nl> on behalf of Schoffelen, J.M. (Jan Mathijs) <jan.schoffelen at donders.ru.nl>
Sent: 10 August 2016 11:01
To: FieldTrip discussion list
Subject: Re: [FieldTrip] mtmfft vs. mtmconvol

Dear Bumper,

It may be helpful to provide the list with some example code + data, should anybody be keen to look into this.

Best,
Jan-Mathijs



On 09 Aug 2016, at 19:19, Pomper, Ulrich <u.pomper at ucl.ac.uk<mailto:u.pomper at ucl.ac.uk>> wrote:

bump....
Has anybody encountered this issue before?
Any suggestion would be highly appreciated!
Many Thanks!


________________________________
From: fieldtrip-bounces at science.ru.nl<mailto:fieldtrip-bounces at science.ru.nl> <fieldtrip-bounces at science.ru.nl<mailto:fieldtrip-bounces at science.ru.nl>> on behalf of Pomper, Ulrich <u.pomper at ucl.ac.uk<mailto:u.pomper at ucl.ac.uk>>
Sent: 05 August 2016 17:25
To: fieldtrip at science.ru.nl<mailto:fieldtrip at science.ru.nl>
Subject: [FieldTrip] mtmfft vs. mtmconvol

Dear all,

I have a question regarding different results I get from spectral analysis using mtmfft versus mtmconvol.
In short, the spectral power across frequencies is very similar for both methods, but for some reason my results are an order of magnitude larger when using mtmconvol. In other words, the power spectral density plots for both methods are highly overlapping, but only after I multiply the results of mtmfft by 10.

Is there any evident reason for this? Are the two methods just outputting different units/ scales?

(I ran both using almost identical settings. For mtmconvol I used a single timepoint at the center of my data period, with a taper length identical to the length of the data period used in mtmfft. All other parameters are the same).

Cheers,
Ulrich




_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip


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


More information about the fieldtrip mailing list