EEG channels name missing

  • MNE-Python version: 0.23.0
  • operating system: google colab
  • dataset - BCI-competition -iv(i) dataset

I was trying to plot the channels on scalp but montage creation is showing error. I have tried other kind also but standard_1005 giving the least number of channels as error.
Also i have the x,y coordinates of channels in the dataset , is there a way i can use them for plotting the channels on head?

I don’t have a great answer, but this might point you in the right direction…

I’ve had a similar error. What is the output of raw.ch_names? Have the channel names been passed to an info object?

I had to map the proper standard names (10/20 system in my case) to the info of my MNE raw data object. This is how I did it.

CHAN_MAP = {'1':'FP1','2':'FP2','3':'AF3','4':'AF4','5':'F7','6':'F3','7':'FZ','8':'F4','9':'F8','10':'FC5','11':'FC1',\

for number,name in list(CHAN_MAP.items())[0:31]:[int(number)-1] = name # remap the channel names to their 10/20 correlates

ch_types = ['eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg',
           'eeg', 'eeg', 'eeg', 'eeg','eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 'eeg', 
           'eeg', 'eeg', 'ecg']
info = mne.create_info(,sfreq=self.SFREQ,ch_types=ch_types) = info

montage = mne.channels.make_standard_montage('standard_1020'),match_case=False) # set the montage for connectivity

I’m by no means an MNE expert, but if I remember correctly this fixed my problem of missing labels. (Not sure if you need the ch_types part, I only needed it because I was doing both eeg and ecg)

To use something like plot_topomap and get a scalp topography, I believe you will need those x,y positions. Here’s my very crude use of the function (I later scrapped this to use plot_psd_topo but this still gave me a figure).

x_pos = [-29.76,29.76,-44.16,44.16,-77.76,-54.72,0,54.72,77.76,-84.48,-35.52,35.52,84.48,-96,-68.16,68.16,0,96,-84.48,-35.52,35.52,84.48,-77.76,-54.72,-0,54.72,77.76,-56.64,-44.16,44.16,56.64,-0]

y_pos = [91.2,91.2,82.56,82.56,56.64,67.2,68.16,67.2,56.64,34.56,39.36,39.36,34.56,0,0,0,0,0,-34.56,-39.36,-39.36,-34.56,-56.64,-67.2,-68.16,-67.2,-56.64,-77.76,-82.56,-82.56,-77.76,-96]

positions = np.array(list(zip(x_pos[0:31],y_pos[0:31]))) # exclude ecg channel

mne.viz.plot_topomap(np.average(data.get_data('eeg'),axis=1),positions) # data had to be averaged to be accepted by topomap

I abandoned this because I wanted topography in certain frequency bands rather than just voltage at a certain time period, but if you’re doing ERPs I think that should be fine (I think it’s standard to do that). I hope this helps!



Hello i checked the kinds like standard 1005 , 1020 and other on github. (mne-python/mne/channels/data/montages at main · mne-tools/mne-python · GitHub)
And it seems that these channels are missing , there data has not been included in the montages.

Thanks for giving me the idea for xpos and ypos , it really helped.

1 Like