[FieldTrip] EEG data resampling with ft_resampledata

Schoffelen, J.M. (Jan Mathijs) jan.schoffelen at donders.ru.nl
Fri Jul 5 09:27:11 CEST 2019


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


More information about the fieldtrip mailing list