[FieldTrip] High pass filtering before epoching

Frans Nord fnorden at gmail.com
Wed Feb 15 11:33:05 CET 2023


Hello mailing-list,

I have a question regarding the comment about Fieldtrip in the recently
published paper "EEG is better left alone" [1]. While I don't agree with
the conclusions of the paper there is a specific comment regarding
Fieldtrip that I would like some comments about:

"We realized that the FieldTrip preprocessing function extracts data epochs
before filtering the data when provided with both filter settings and epoch
information. After consulting with FieldTrip developers, for all analyses
using FieldTrip, we used an alternate multi-step implementation allowing
us to extract epochs after the raw data had been filtered."

Looking through the code of ft_preprocessing and how the preproc function
is used in my own preprocessing pipeline i realized that I seem to do the
filtering on raw data epochs with this code:

cfg = [];
cfg.continuous ='yes';
cfg.trialfun = 'ft_trialfun_general';
cfg.trialdef.eventtype = 'STATUS';
cfg.trialdef.eventvalue = {1,2,3,4}; % Trigger values
cfg.trialdef.prestim =.5; % -500 ms before the stimulation
cfg.trialdef.poststim = 2; % +2000ms after the stimulation
cfg.dataset = path_to_dataset; % set the name of the dataset
cfg = ft_definetrial(cfg); % read the list of the specific stimulus
cfg.hpfilter = 'yes';
cfg.hpfreq = 1;[data] =ft_preprocessing(cfg);

I did however think that the code above would apply the high pass filter on
the continuous data and not on the epochs but it seems that I was wrong. Or
am I? So I'm now consulting the E-mail list to get some clarity about this
and a potential recommendation on what to do instead. Basically, how to
implement the "multi-step implementation" within Fieldtrip.

Thank you for providing the Fieldtrip toolbox
Best
Frans

[1] Delorme, A. EEG is better left alone. *Sci Rep* 13, 2372 (2023).
https://urldefense.com/v3/__https://doi.org/10.1038/s41598-023-27528-0__;!!HJOPV4FYYWzcc1jazlU!4hjKg111dQ7s9-L3G_ddKy01SDzvgiEvo8gLx_R-WDx6Qxj6JJS0HuEwuUx1atexqoHmVc8kvd5ouM4p4smQ$ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20230215/6f974619/attachment.htm>


More information about the fieldtrip mailing list