[FieldTrip] EEG data resampling with ft_resampledata

Valeria Mongelli valeria.mongelli2 at gmail.com
Thu Jul 4 17:46:09 CEST 2019


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);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190704/ecb0706b/attachment-0001.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