eegUtils icon indicating copy to clipboard operation
eegUtils copied to clipboard

how to notch filter with eegUtils

Open wenboyu0803 opened this issue 1 year ago • 2 comments

hi, i am new in analysis eeg data with R.

i want to make notch filter on my data, 50Hz. i know that it could be conducted by a function "notch_filter" with "mne" package in python. So, i wonder whether i could achieve the similar operation with eegUtils packages in R.

Great thanks.

wenboyu0803 avatar Jan 24 '24 02:01 wenboyu0803

See the second example here, where a band-stop filter is created. https://craddm.github.io/eegUtils/reference/eeg_filter.html

A notch filter is a band-stop filter with a very narrow range of frequencies. From looking at the MNE docs, they use a default of f/200, where f is the central frequency to-be-notched. At 50 Hz, that would be 50/200 = 0.25.

Something like eeg_filter(your_data, low_freq = 50.25, high_freq = 49.75, trans_bw = 1) should you get you something like the MNE defaults.

craddm avatar Jan 25 '24 14:01 craddm

ok thanks for your advise, i will try it right now.

wenboyu0803 avatar Jan 26 '24 01:01 wenboyu0803