Hello MNE users!
I was working on eegbci dataset and was adviced to run mne_icalabel.label_components() before exluding any ICA components.
Before using mne_icalabel.label_components() the data should be filtered between 1 and 100 Hz. However, the data I’m using was recorded with sampling frequency of 160 Hz and, therefore, the upper pass-band edge for my data is 80 Hz, which is not enough if I want to use mne_icalabel.label_components().
Is there anything to do about it or it just means that I cannot use this method? If it’s impossible to use mne_icalabel.label_components(), are there any alternatives to this method?
Thank you.
Here is my code:
from mne.datasets import eegbci
eegbci.load_data(3, 1, path);
raw = mne.io.read_raw_edf(path, preload = True)
# preprocessing
raw_f = raw.copy().filter(l_freq=1.0, h_freq=100)
At this point the error occurs:
ValueError: h_freq ([100.]) must be less than the Nyquist frequency 80.0
raw_avg_ref = raw_f.copy().set_eeg_reference(ref_channels='average');
If I set the h_freq = 79, then another error occurs:
ica = mne.preprocessing.ICA(
n_components=15,
max_iter='auto',
method="infomax",
random_state=97,
fit_params=dict(extended=True)
)
ica.fit(raw_avg_ref);
ic_labels = label_components(raw_avg_ref, ica, method="iclabel")
RuntimeWarning: The provided Raw instance is not filtered between 1 and 100 Hz.
ICLabel was designed to classify features extracted from an EEG dataset bandpass
filtered between 1 and 100 Hz (see the 'filter()' method for Raw and Epochs instances).
I will be grateful for any help
- MNE version: 1.6.1
- operating system: Windows 11