Adding montage to the raw BrainVision EEG data

I have to add montage information to the raw EEG data (.vhdr). I don’t have the coordinates file, but I know the channel names, and it is a standard 1020 electrode placement. I get the following error.

  • MNE-Python version: 0.24.0
  • operating system: Windows

montage = raw.set_montage(β€˜standard_1020’)

ValueError: DigMontage is only a subset of info. There are 32 channel positions not present in the DigMontage. The required channels are:

[β€˜1’, β€˜2’, β€˜3’, β€˜4’, β€˜5’, β€˜6’, β€˜7’, β€˜8’, β€˜9’, β€˜10’, β€˜11’, β€˜12’, β€˜13’, β€˜14’, β€˜15’, β€˜16’, β€˜17’, β€˜18’, β€˜19’, β€˜20’, β€˜21’, β€˜22’, β€˜23’, β€˜24’, β€˜25’, β€˜26’, β€˜27’, β€˜28’, β€˜29’, β€˜30’, β€˜31’, β€˜32’].

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.

channel_names =[β€˜Fp1’,β€˜Fp2’,β€˜F7’,β€˜F3’,β€˜Fz’,β€˜F4’,β€˜F8’,β€˜FC5’,β€˜FC1’,β€˜FC2’,β€˜FC6’,

Above are the channel names. Would you please give me a solution?

I believe there is the option to ignore the problem by setting on_missing as β€˜ignore’, but do inspect the result afterwards

You can circumvent this problem by reading a custom montage:
montage = mne.channels.read_custom_montage(β€˜Cap19coord_1020.csd’)`

1 Like

You need to rename the channels to match the 10-20 naming scheme. It appears currently they all just numbered.

You can use raw.rename_channels() for this.

Best wishes,


Thank you for the suggestion. I solved it by renaming the channels.