- MNE version: 0.24.0
- operating system: Windows 11
I am trying to filter raw data which consists of 4 channels.
raw_data = Df[["RAW_TP9", "RAW_TP10", "RAW_AF7", "RAW_AF8"]]
raw_data = raw_data.to_numpy()
before_data = raw_data
low_freq, highFreq = 0.5, 50
s_freq = 256
filtered_data = mne.filter.filter_data(raw_data, s_freq, low_freq, highFreq)
This is the output with the warning:
FIR filter parameters
---------------------
Designing a one-pass, zero-phase, non-causal bandpass filter:
- Windowed time-domain design (firwin) method
- Hamming window with 0.0194 passband ripple and 53 dB stopband attenuation
- Lower passband edge: 0.50
- Lower transition bandwidth: 0.50 Hz (-6 dB cutoff frequency: 0.25 Hz)
- Upper passband edge: 50.00 Hz
- Upper transition bandwidth: 12.50 Hz (-6 dB cutoff frequency: 56.25 Hz)
- Filter length: 1691 samples (6.605 sec)
D:\..\general_filtering.py:84: RuntimeWarning: filter_length (1691) is longer than the signal (4), distortion is likely. Reduce filter length or filter a longer signal.
It seems as the signal_length is set to the amount of channels instead of the length of each channel. Reading the docs, my input parameters look right tho. Any tips what might have been gone wrong?