[FieldTrip] Issue with DFT filter used to remove power line noise at 50 Hz

AGOURAM Hasnae hasnae.AGOURAM at univ-amu.fr
Wed Jul 10 14:25:38 CEST 2024


Hello everyone,

I am having a small issue with the DFT filter used to remove power line noise at 50 Hz. Even after applying the filter, I still observe line noise in the power spectral density.

I am using the ft_preproc_dftfilter<https://www.fieldtriptoolbox.org/reference/preproc/ft_preproc_dftfilter> function from the Fieldtrip toolbox, which applies a narrow-band notch filter to eliminate the 50 Hz noise.


Here is the snippet of code I am using


%filtre the data
       cfg                = [];
       cfg.hpfilter       = 'yes'; % High-pass filter
       cfg.hpfreq         = 1 ;    % High-pass frequency
       cfg.dftfilter      = 'yes'; % enable notch filtering to eliminate power line noise
       cfg.dftfreq        = [50]; %set frequencies for notch filtre
       dataContinuousResampled_filtred = ft_preprocessing(cfg,dataContinuousResampled);


If you have any suggestions, please let me know.

Hasnae Agouram
PhD student
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20240710/cb324ed7/attachment.htm>


More information about the fieldtrip mailing list