[FieldTrip] Is dB baseline normalization following ft_freqanalysis appropriate?

Eelke Spaak e.spaak at donders.ru.nl
Sun Sep 23 16:23:09 CEST 2018


Dear Paul,

dB values (10*log10(a/b)) will be complex if and only if the values a
or b are negative. ft_freqanalysis should not output negative power
values (power is strictly positive). So, my hunch is that something
somewhere else in your pipeline is doing this. To track down where the
negative/complex numbers occur, it might help if you give your
variables distinct names (e.g. "data" for raw data, "freq" for output
of ft_freqanalysis, and "freq_bsl" after baseline correction, etc.).

(Another hunch, in case it really is just the two snippets you posted:
does it matter if you use cfg.output = 'pow' instead of cfg.output =
'powandcsd'?)

Hope that helps, cheers,
Eelke
On Sat, 22 Sep 2018 at 16:53, Paul Dhami <pdhami06 at gmail.com> wrote:
>
> Dear Fieldtrip community,
>
> I am ultimately hoping to perform the cluster-based permutation testing for comparing potential power differences between two groups.
>
> From my understanding, to facilitate statistical comparisons, baseline normalization is warranted.
>
> Would it be appropriate (if at all) to do this baseline normalization right after  following ft_freqanalysis?
>
> My current frequency preprocessing looks like this for a single subject:
>
>
>
>         % 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, dataSPfreq);
>
>
>         %baseline correction
>
>         cfg = [];
>
>         cfg.baseline = [-0.4 -0.1];
>
>         cfg.baselinetype = 'db';
>
>         dataSPfreq = ft_freqbaseline(cfg, dataSPfreq);
>
>
> From here, I then was hoping to submit my two structures, each containing the single subject preprocessed data from their respective group, to freq_statistics.
>
>
> I initially thought this was fine, but when trying to use ft_singleplotTFR, I ran into this error: Complex values are not supported, which only occurred when I did the baseline correction (I also ran it without any baseline correction and it worked fine).
>
>
> Any insight would be greatly appreciated.
>
>
> Thank you,
>
> Paul
>
>
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202




More information about the fieldtrip mailing list