[FieldTrip] Calculating ERPs with tf_timelockbaseline

Stephen Whitmarsh stephen.whitmarsh at gmail.com
Tue Apr 9 10:22:48 CEST 2019


Dear Luca,

1) Have you tried not using a baseline correction, just to make sure that a
baseline correction is applied at all? (if not, that would explain the lack
of differences between different baselines :-)).
2) Have you tried replacing cfg.channel = {'all'}; with cfg.channel =
'all';?

HTH,
Stephen

On Tue, 9 Apr 2019 at 10:13, Luca Moretti <moretti.l1991 at gmail.com> wrote:

> Dear Fieldtrippers,
>
> I have a problem concerning the calculation of ERPs with
> ft_timelockbaseline. After I have preprocessed the data (re-referenced,
> filtered, cleaned from artifact), this is what I have done:
>
> inputfile = (strcat('Subject_2_clean.mat'));
> load (inputfile);
> layout = 'easycapM1';
>
> %% Calculating ERP
>
> cfg = [];
> cfg.trials = find(data_clean_2.trialinfo==60);
> Color_C = ft_timelockanalysis(cfg, data_clean_2);
>
> %% Plotting
>
> cfg = [];
> cfg.baseline = [-.3 0];
> cfg.channel = {'all'};
> cfg.parameter = 'avg';
> ERP = ft_timelockbaseline(cfg, Color_C);
>
> figure
> cfg = [];
> cfg.layout = layout;
> cfg.interactive = 'yes';
> cfg.showoutline = 'yes';
> ft_multiplotER(cfg, ERP)
>
> %%
>
> My problem is that it doesn't matter what kind of baseline period I am
> chosing, the figure Always turn out the same for each electrode. I have
> even tried to set the baseline to the Whole trial period, but the figure I
> get from plotting individual channels from the multiplot is Always the same.
>
> Can someone find something wrong with my code?
>
> Many thanks!
> Luca
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190409/6635f2d3/attachment-0002.html>
-------------- next part --------------
_______________________________________________
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