[FieldTrip] Subject: Re: Is dB baseline normalization following ft_freqanalysis appropriate?

Paul Dhami pdhami06 at gmail.com
Mon Sep 24 14:16:34 CEST 2018


Dear Eelke,

thank you for your response.

Here is my full preprocessing for one subject:

%%%%%%%%%%%%%%%

cfg = []

cfg.dataset                 =
[myTMSEEGs(numSubj).SinglePulse.(curSubjSP{SPnum}).filepath '/'
myTMSEEGs(numSubj).SinglePulse.(curSubjSP{SPnum}).filename];

EEG                         = pop_loadset('filename',
myTMSEEGs(numSubj).SinglePulse.(curSubjSP{SPnum}).filename, 'filepath',
[myTMSEEGs(numSubj).SinglePulse.(curSubjSP{SPnum}).filepath '/']);



% adding trialdef information to configuration file

cfg.trialdef.eventtype      = 'trigger';

cfg.trialdef.eventvalue     = 128; % TMS trigger

cfg.trialdef.prestim        = 1;

cfg.trialdef.poststim       = 1;



% defining trial

cfg                         = ft_definetrial(cfg);



% freq analysis prep

dataSP             = eeglab2fieldtrip(EEG, 'preprocessing');

dataSP.cfg          = cfg;



% interpolating NaN values before frequency analysis

cfg                 = [];

cfg.prewindow       = 0.995; % -5 ms

cfg.postwindow      = 0.990; % 10 ms

cfg.method          = 'linear';

dataSP         = ft_interpolatenan(cfg, dataSP);



% frequency analysis

cfg                 = [];

cfg.output          = 'powandcsd';

cfg.method          = 'mtmconvol';

cfg.foi             = 2:1:40;

cfg.t_ftimwin       =  2 ./ cfg.foi;

cfg.tapsmofrq       = 0.4 *cfg.foi;

cfg.toi             = -0.4:0.01:0.4;



dataSPfreq = ft_freqanalysis(cfg, dataSP);



%baseline correction

cfg = [];

cfg.baseline = [-0.4 -0.1];

cfg.baselinetype = 'db';

dataSPfreq_bl = ft_freqbaseline(cfg, dataSPfreq);


%%%%%%%%%%%%%%%%%%%%%%%%


I tried a few things as you suggested:


1. my ft_freqanalysis is only outputting positive values (variable
dataSPfreq) and baseline db correction has both positive and negatives (as
to be expected)

2. the error was the same between powandcsd


3. I believe the mistake is related to calling for the baseline
normalization a second time (cfg.baseline = [-0.4 -0.1] and
cfg.baselinetype = 'db'). Once removing these configurations, I was able to
use singleplotTFR fine. Would this produce the errors reported earlier?


Finally, if the error was related to the aforementioned seconding calling
of baseline normalization, and assuming removing it is the correct
solution, is it best to perform a baseline normalization following
ft_freqanalysis if the goal is to eventually move onto group-differences
using the permutation method?


Thank you again for your help.

Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20180924/20cce207/attachment-0001.html>


More information about the fieldtrip mailing list