[FieldTrip] Time Frequency parameters for <5hz with a 3 second epoch

Ketan Jaltare ketan.jaltare at kuleuven.be
Mon Jan 23 10:07:46 CET 2023


Dear Fieldtrippers,

My name is Ketan Jaltare, and I am a PhD scholar at KU Leuven. I have been studying the impact of the social context on markers of chronic pain. I am fairly new to time frequency analysis with Fieldtrip and dont really know if im doing the right things for a Time Frequency analysis on some epoched EEG data.


I have 3 second Epochs and I am interested in frequencies between 1 to 5Hz (although I want to compute the TF representation for up to 30 Hz). After a lot of trial and error, I finally arrived at the following parameters for mtmconvol with a single taper, but this way I am losing ~250ms of data on each end of the 3 second epoch (see figure):


cfg = [];
cfg.output = 'pow';
cfg.channel = 'all';
cfg.method = 'mtmconvol';
cfg.taper = 'hanning';
cfg.toi = -1 : 0.01 : 2;
cfg.foi = 1:30;
cfg.pad = 10;
cfg.t_ftimwin = ones(size(cfg.foi))*.5;
dataout = ft_freqanalysis(cfg, datain);
% Now plot the data at Cz
cfg = [];
cfg.baseline = [-.5 -.2];
cfg.baselinetype = 'absolute';
%cfg.zlim = [0 2];
cfg.channel = 'E129';
cfg.layout = 'GSN-HydroCel-129.mat';
figure
ft_singleplotTFR(cfg, data out);?


I have also tried wavelet convolution, but there again I am losing data at the low frequencies (I think due to the length of the wavelets required to capture these low frequencies). Here is the code I used for wavelet convolution:


    cfg = [];
cfg.output = 'pow';
cfg.channel = 'E129';
cfg.method = 'wavelet';
cfg.toi = -1 : 0.01 : 2;
cfg.foi = 1:30;
cfg.width = linspace(1.5,.3,length(cfg.foi));
%cfg.gwidth = linspace(2,.3,length(cfg.foi));
cfg.pad = 5;
T0Conttfr = ft_freqanalysis(cfg, T0Cont);
cfg = [];
cfg.baseline = [-.5 -.2];
cfg.baselinetype = 'absolute';
cfg.maskstyle = 'saturation';
cfg.channel = 'E129';
cfg.layout = 'GSN-HydroCel-129.mat';
figure
ft_singleplotTFR(cfg, T0Conttfr);


With wavelet convolution, I am also getting a lot of smoothing/stretching in the frequency domain at  frequencies above ~3 Hz and Im not sure what the right parameters are to avoid this.


I have also attached example figures from both implementations (MTM and Wavelet convolution) for your reference.


Here are my questions:

1) Is there any way to avoid the loss of the data at the edges with mtmconvol? Also, do the parameters that I have used seem to be okay for what I am trying to do?


2) With wavelet convolution, is it just that my epochs are not long enough to get at these low frequencies? Or am I getting the parameters wrong? Any help would be greatly appreciated.?


3) How can I avoid the smearing that I am getting for the higher frequencies using wavelet convolution?


and finally,


4) At the moment, I am only doing the baseline normalisation when plotting the output of ft_freqanalysis. Is there any way to perform this baseline normalisation using ft_freqanalysis? itself?


Thank you in advance for your help!


Regards,


Ketan Jaltare, M.Sc. | PhD Student
Research Group Health Psychology
KU Leuven, Belgium
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20230123/ccc5fe65/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Figure_mtm.jpg
Type: image/jpeg
Size: 37356 bytes
Desc: Figure_mtm.jpg
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20230123/ccc5fe65/attachment.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Figure_wavelet.jpg
Type: image/jpeg
Size: 53699 bytes
Desc: Figure_wavelet.jpg
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20230123/ccc5fe65/attachment-0001.jpg>


More information about the fieldtrip mailing list