Hi everyone, I’m working on preprocessing the EEG CHB-MIT database (CHB-MIT Scalp EEG Database v1.0.0). I’m trying to plot ICA components, however i always get a error message. I’ve already set the montage to the standard 10-20 system but still doesn’t work.
My code:
pip install mne
from google.colab import drive
drive.mount('/content/drive')
cd /content/drive/MyDrive/EDFfiles/Paciente_24
fname = 'chb24_01_edited.edf'
import mne
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
raw = mne.io.read_raw_edf(fname, preload=True, verbose=False)
from mne.preprocessing import (ICA, create_eog_epochs, create_ecg_epochs,
corrmap)
montage = mne.channels.make_standard_montage('standard_1020')
raw.set_montage(montage, on_missing='ignore')
print(raw.ch_names)
filt_raw = raw.copy().filter(l_freq=1., h_freq=None)
ica = ICA(n_components=15, max_iter='auto', random_state=97)
ica.fit(filt_raw)
ica
raw.load_data()
ica.plot_sources(raw, show_scrollbars=False)
raw.plot_sensors(ch_type='eeg', show_names=True)
RuntimeError: No valid channel positions found
ica.plot_components()
RuntimeError: Did not find any digitization points of kind FIFFV_POINT_EEG (3) in the info.