raw.set_montage() can't indentify the midline electrodes

I’m getting a value error when I run raw.set_montage()

  • operating system: Windows 10
raw_cropped.set_montage('standard_1020',match_alias = True,on_missing = 'warn')
fig = raw_cropped.plot_sensors(show_names=True)


C:\Users\lyj\AppData\Local\Temp\ipykernel_2800\4085220102.py:1: RuntimeWarning: DigMontage is only a subset of info. There are 14 channel positions not present in the DigMontage. The required channels are:

['FP1', 'FPZ', 'FP2', 'FZ', 'FCZ', 'CZ', 'CPZ', 'PZ', 'POZ', 'CB1', 'OZ', 'CB2', 'HEO', 'VEO'].

Consider using inst.set_channel_types if these are not EEG channels, or use the on_missing parameter if the channel positions are allowed to be unknown in your analyses.
  raw_cropped.set_montage('standard_1020',match_alias = True,on_missing = 'warn')

Can someone help me resolve this error?


Hello @Left_handed_pola_bea, and welcome to the forum!

The spelling (capitalization) of the channel names in your data does not conform to the 10-20 standard. You can ask MNE to ignore the casing by passing match_case=False to set_montage().

In addition to that, please consider:
CB1, CB2, HEO, and VEO are to my knowledge no standardized channel names. HEO and VEO are probably EOG channels, so you should set their channel type accordingly (and not treat them as EEG).

CB1 and CB2 are aliases for POO7 and POO8, respectively. But these channels are only present in the standard_1005 montage, not in the standard_1020 you’re currently using.

So in summary, what you’ll want to do is something like:

    'HEO': 'eog',
    'VEO': 'eog'

I hope this helps,

Thank you fir your kind help! the method successfully solved my problem.