- MNE version: 1.6.1 in google colab
I am trying to plot topographical map for MI Physionet dataset. The channel names in the montage and dataset vary eventhough I tried changing I am having digitization points error or wrong electrode locations plotted.I have provided the code snippet
original_names = [‘Fp1’, ‘AF7’, ‘AF3’, ‘F1’, ‘F3’, ‘F5’, ‘F7’, ‘FT7’, ‘FC5’, ‘FC3’, ‘FC1’, ‘C1’, ‘C3’, ‘C5’, ‘T7’,
‘TP7’, ‘CP5’, ‘CP3’, ‘CP1’, ‘P1’, ‘P3’, ‘P5’, ‘P7’, ‘P9’, ‘PO7’, ‘PO3’, ‘O1’, ‘Iz’, ‘Oz’, ‘POz’,
‘Pz’, ‘CPz’, ‘Fpz’, ‘Fp2’, ‘AF8’, ‘AF4’, ‘AFz’, ‘Fz’, ‘F2’, ‘F4’, ‘F6’, ‘F8’, ‘FT8’, ‘FC6’, ‘FC4’,
‘FC2’, ‘FCz’, ‘Cz’, ‘C2’, ‘C4’, ‘C6’, ‘T8’, ‘TP8’, ‘CP6’, ‘CP4’, ‘CP2’, ‘P2’, ‘P4’, ‘P6’, ‘P8’,
‘P10’, ‘PO8’, ‘PO4’, ‘O2’]
selected_electrodes = [‘FC5’, ‘FC3’, ‘FC1’,‘FCz’,‘FC2’, ‘FC4’, ‘FC6’, ‘C5’, ‘C3’, ‘C1’, ‘Cz’, ‘C2’, ‘C4’, ‘C6’,‘CP5’, ‘CP3’, ‘CP1’,‘CPz’, ‘CP2’, ‘CP4’, ‘CP6’]
subset_montage = mne.channels.make_standard_montage(‘biosemi64’)
subset_montage.ch_names = selected_electrodes
print(subset_montage.ch_names)
import mne
Define your selected channels
selected_channels = [‘Fc5.’, ‘Fc3.’, ‘Fc1.’, ‘Fcz.’, ‘Fc2.’, ‘Fc4.’, ‘Fc6.’, ‘C5…’, ‘C3…’, ‘C1…’, ‘Cz…’, ‘C2…’, ‘C4…’, ‘C6…’,‘Cp5.’, ‘Cp3.’, ‘Cp1.’, ‘Cpz.’, ‘Cp2.’, ‘Cp4.’, ‘Cp6.’]
Load or create your montage, for example:
montage = mne.channels.make_standard_montage(‘biosemi64’)
Pick only the selected channels from the montage
selected_montage = montage.copy().pick_channels(selected_channels)
Print the selected channels from the new montage
print(“Selected channels from the montage:”, selected_montage.ch_names)