high pass filter doesn't work?

Hey,

I’m trying to do EEG analysis and for some reason, I see that the high pass filter isn’t really filtering. And I still have low freq oscillations that I want to get rid of, why could this be happening?

The command:

raw = raw.filter(l_freq=0.3, h_freq=30, picks='eeg') 

This resulting psd:

  • MNE version: 0.234
  • operating system: Windows 11

Your PSD shows a dashed line at 0.3 - so the PSD is showing the low pass filter point. The problem with this visualization is that your power spectral density is low resolution. There is a datapoint at 0 and at 1.0Hz, so the resolution is too low to show the dropoff that would occur at the 0.3 highpass point. The PSD resolution can be improved by providing more data to the power spectral density.

Your best bet is to plot the PSD of the raw/unfiltered dataset and then the filtered dataset in two different plots. You will then be able to assess if it is filtering that region.

I still have low freq oscillations that I want to get rid of, why could this be happening? – you can still get a lot of “low frequency” noise above 0.3Hz. As a test, you can increase your highpass filter higher (maybe above 1Hz) to confirm that the filter is working. There are several reasons why you can have noise in your data - but this will at least confirm that the filter is working.

Also - I would probably update your MNE version – that is several years old. And I think that the devs have addressed a lot of Windows related problems in the past several years.

-Jeff

3 Likes