[FieldTrip] High pass filtering before epoching

Alain de Cheveigne alain.de.cheveigne at ens.psl.eu
Thu Jun 22 23:32:55 CEST 2023


I also didn't agree with their conclusions, so I wrote up a commentary for Scientific Reports. It was rejected without review so I put it on bioRxiv: https://urldefense.com/v3/__https://www.biorxiv.org/content/10.1101/2023.06.19.545602v1__;!!HJOPV4FYYWzcc1jazlU!4wikriMIK6eAqGLhSfwIO-To6fCuRwxt5XCTp_CBJrtTdwFfA7Zc44WjnX8WBD1RjYH9S9RLO2NO__OYhfmcStONak-mk_W3kOM$ .
Alain


> On 15 Feb 2023, at 10:33, Frans Nord via fieldtrip <fieldtrip at science.ru.nl> wrote:
> 
> 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 stimuluscfg.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!4wikriMIK6eAqGLhSfwIO-To6fCuRwxt5XCTp_CBJrtTdwFfA7Zc44WjnX8WBD1RjYH9S9RLO2NO__OYhfmcStONak-mmQWUCUQ$ 
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://urldefense.com/v3/__https://doi.org/10.1371/journal.pcbi.1002202__;!!HJOPV4FYYWzcc1jazlU!4wikriMIK6eAqGLhSfwIO-To6fCuRwxt5XCTp_CBJrtTdwFfA7Zc44WjnX8WBD1RjYH9S9RLO2NO__OYhfmcStONak-mfMZ1DDI$ 




More information about the fieldtrip mailing list