[FieldTrip] Same Pattern but different scale by using ft_freqbaseline or choose baseline in ft_singleplotTFR

Yizhou Jiang jiang.yizhou.i at gmail.com
Thu Aug 17 13:03:08 CEST 2017


Dear all,

I am using two different way to plot the figure after baseline correction.
1) do the baseline correction using the function 'ft_freqbaseline', and the
plot the figure; 2) do not do baseline correction and add baseline when
plot the figure using 'ft_singleplotTFR'.

I am confused that two figures have similar pattern, but are different in z
scale. I wonder is any error with my code (below).

This is the code

% POWER
cfg = [];
cfg.channel    = 'all';%channels;
cfg.method    = 'wavelet';  %'wavelet'
cfg.keeptrials = 'yes';
cfg.output      = 'pow';   %'fourier';  %'pow';'powandcsd'
cfg.foi            = 5:2:200;  %2:2:80
cfg.toi            = -1:0.02:2;
cfg.pad = 'nextpow2';
cfg.width        = linspace(2,25,numel(cfg.foi));
%linspace(1,25,numel(cfg.foi))
POW = ft_freqanalysis(cfg, data);  %

*1)*
% baseline correction
cfg = [];
cfg.baseline = [-0.5 -0.1];
cfg.baselinetype ='db';
POW_db = ft_freqbaseline(cfg,POW);

figure;clf;cfg = [];
cfg.xlim=[-0.5 1.2];
cfg.parameter = 'powspctrm';
cfg.ylim          = 'maxmin';
cfg.linewidth     =2;
cfg.fontsize=12;
F=ft_singleplotTFR(cfg,POW_db);

[image: 内嵌图片 1]
or
*2)*
%no base line correction before
%
figure;clf;cfg = [];
cfg.xlim=[-0.5 1.2];
cfg.parameter = 'powspctrm';
cfg.ylim          = 'maxmin';
cfg.linewidth     =2;
cfg.fontsize=12;
cfg.baseline = [-0.5 -0.1];
cfg.baselinetype ='db';
F=ft_singleplotTFR(cfg,POW);
[image: 内嵌图片 2]


Best wishes,
Wendy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170817/1d0d1217/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 24423 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170817/1d0d1217/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 27743 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20170817/1d0d1217/attachment-0003.png>


More information about the fieldtrip mailing list