[FieldTrip] EEG data resampling with ft_resampledata

Valeria Mongelli valeria.mongelli2 at gmail.com
Fri Jul 5 10:16:03 CEST 2019


Hi Jan-Mathijs,

thanks for your answer. I attach two examples (512 Hz vs. 500 Hz). The
timeline of my trial is the following (in ms): 300+*200*+67+33+67+500+700.
0 point, to which ERPs are time-locked, is 1200 ms before the end of the
trial. The baseline correction that I apply is -367 ms before 0, that is
the 200 ms time window highlighted in red.

Best,
Valeria

Il giorno ven 5 lug 2019 alle ore 09:27 Schoffelen, J.M. (Jan Mathijs) <
jan.schoffelen at donders.ru.nl> ha scritto:

> Hi Valeria,
>
> Your statement ’they do not look the same’ falls into the same category as
> the statement ‘it does not work’. Please provide a little bit extra
> information, e.g. by means of a figure.
>
> Jan-Mathijs
>
>
> > On 4 Jul 2019, at 17:46, Valeria Mongelli <valeria.mongelli2 at gmail.com>
> wrote:
> >
> > Dear Fieldtrip community,
> >
> > I am trying to resample my EEG data from 512 Hz to 500 Hz. I am
> performing the resampling after data epoching, artifact rejection, ICA and
> baseline correction, and before averaging my ERPs across conditions. I
> think something goes wrong there, because when I compare the 500 Hz data to
> the 512 Hz data they do not look the same. I past my code below. My first
> question is: is that ok to perform resampling after baseline correction? If
> yes, which are the correct parameters in this situation? I am talking in
> particular of the demean and detrend paramers.
> >
> > Any help will be much appreciated.
> > Best,
> > Valeria
> >
> > cfg                 = [];
> > cfg.channel         = 1:64;
> > cfg.lpfilter        = 'yes';
> > cfg.lpfreq          = 40; %
> > cfg.demean          = 'yes';
> > cfg.detrend         = 'yes';
> > cfg.baselinewindow  = baselinewindow;  % Baseline window
> >
> > data = ft_preprocessing(cfg,data);
> >
> > % Resample data at 500 Hz
> > cfg                 = [];
> > cfg.resamplefs      = 500;
> > cfg.demean          = 'no';
> > cfg.detrend         = 'yes';
> > cfg.baselinewindow  = baselinewindow;  % Baseline window
> > cfg.feedback        = 'text';
> > cfg.trials          = 'all';
> > cfg.sampleindex     = 'no';
> >
> > data = ft_resampledata(cfg,data);
> > _______________________________________________
> > fieldtrip mailing list
> > https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> > https://doi.org/10.1371/journal.pcbi.1002202
>
>
> _______________________________________________
> 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/20190705/6e6b6439/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: erp_500Hz.jpg
Type: image/jpeg
Size: 27719 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190705/6e6b6439/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: erp_512Hz.jpg
Type: image/jpeg
Size: 33569 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190705/6e6b6439/attachment-0005.jpg>
-------------- 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