craddm / eegUtils

An R package for processing and plotting of electroencephalography (EEG) data
https://craddm.github.io/eegUtils
Other
104 stars 26 forks source link

how to notch filter with eegUtils #141

Closed wenboyu0803 closed 5 months ago

wenboyu0803 commented 9 months ago

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.

craddm commented 9 months ago

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.

wenboyu0803 commented 9 months ago

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