[FieldTrip] Problem with TFR calculation using multitaper

Frederic Roux f.roux at bcbl.eu
Fri Nov 16 14:51:24 CET 2012


Dear Andreas,

if you used a 50 Hz notch filter in your
preprocessing, that is probably the reason
why you are seeing the 'artificial' cut
between 30 and 70 Hz.

My guess is that you ran your notch filter
on segmented epochs of a few seconds (resulting
in a low spectral resolution for your notch filter).
This will wipe out a ~10Hz box (in your case I'm just guessing)
around the line noise frequency.

Running the multitaper on top of that may explain
the pattern you are observing.
 

Best,

Fred
----- Original Message -----
From: "Andreas Sauer" <sauer.mpih at googlemail.com>
To: "FieldTrip discussion list" <fieldtrip at science.ru.nl>
Sent: Friday, November 16, 2012 2:36:01 PM
Subject: [FieldTrip] Problem with TFR calculation using multitaper


Dear all, 

I have encountered a problem when trying to calculate the power spectrum of my data and I was wondering if anyone could help me to determine the origin of this problem. 

For the analysis I used multitapers (dpss) with a 11 Hz freq-smoothing and a time window with a length of 500 ms ending up with 10 tapers for the TFR calculation (the freq range is 20 - 200 Hz): 


cfg = []; 
cfg.output = 'pow'; 
cfg.channel = 'MEG'; 
cfg.method = 'mtmconvol'; 
cfg.taper = 'dpss'; 
cfg.keeptrials = 'no'; 
cfg.foi = [20:1:200]; 
cfg.toi = [-0.5:0.05:1.0]; % the preprocessed data length is 2 sec, from -0.8 to 1.2 s 
cfg.tapsmofrq = ones(length(cfg.foi),1).*11; % spectral smoothing = +/- 11 Hz 
cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5; % length of time window = 500 ms 
cfg.pad = 'maxperlen'; 

TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz = ft_freqanalysis(cfg,DataOut); 

After calculation I did a baseline normalization: 


cfg = []; 
cfg.baseline = [-0.4 -0.1]; 
cfg.baselinetype = 'relchange'; 

TFR_HighGamma{subject,condition} = ft_freqbaseline(cfg,TFR_file.TFR_Mult_DPSS_10tapers_fmin20Hz_fmax200Hz); 

averaged: 


cfg = []; 
cfg.channel = 'ParOcc'; % parietal and occipital channels 
GA_TFR_HighGamma{condition} = ft_freqgrandaverage(cfg,TFR_HighGamma{:,condition}); 

and finally plotted the spectrum: 


time(1) = 3; % -400 ms 
time(2) = 27; % 800 ms 
indFreq = [20 200]; 
freq = find(ismember(GA_TFR_HighGamma{i}.freq, indFreq) == 1); 

power = squeeze(mean(GA_TFR_HighGamma{i}.powspctrm,1)); 
power = mean(GA_TFR_HighGamma{i}.powspctrm(:,:,time(1):time(2)),1); 
power = mean(power,1); 

fig = figure; 
set(fig,'PaperUnits','centimeters'); 
set(fig,'Units','centimeters'); 
set(fig,'PaperSize',[15 15]); 
set(fig,'PaperPosition',[0 0 14 14]); 
set(gcf,'Color',[1 1 1]); 

ha = gca; 
pcolor(GA_TFR_HighGamma{i}.time(time(1):time(2)),GA_TFR_HighGamma{i}.freq,squeeze(power)); 
set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); 
shading interp; 
xlim([-0.4 0.8]); 
ylim([40 120]); 
caxis([-.2 .2]); 
hold on; 
ha = gca; 
plot([0 0],[40 120],'k--','LineWidth',1); 
set(ha,'FontName','Arial','FontSize',10,'LineWidth',1.5); 
set(ha,'YTick',[40 60 80 100 120]); 
colorbar('SouthOutside'); 
xlabel('Time [sec]'); 
ylabel('Frequency [Hz]'); 

The resulting plot looks strange to me since there is this artifical "cut" at 70 Hz and at 50 Hz. I checked the FAQs but my plot looks different from the "strange" ones described there. 
I also attached a screenshot of the MultiplotTFR and there you can see the strange "effect" clearly in channels MLO22 or MRO22 for example. 

Is something wrong with my TFR calculation? Or does the problem arise from an earlier step in the preprocessing? 

Any help or advice would be greatly appreciated! 

Best, 

Andreas 

-- 


Andreas Sauer 
Max Planck Institute for Brain Research 
Deutschordenstraße 46 
60528 Frankfurt am Main 
Germany 


T: +49 69 96769 278 
F: +49 69 96769 327 
Email: sauer.mpih at gmail.com 
www.brain.mpg.de 

_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl
http://mailman.science.ru.nl/mailman/listinfo/fieldtrip




More information about the fieldtrip mailing list