Also when I’m setting montage by:
montage = mne.channels.make_standard_montage("biosemi32")
raw.set_montage(montage)
I get such error:
ValueError: DigMontage is only a subset of info. There are 32 channel positions not present in the DigMontage. The channels missing from the montage 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.rename_channels to match the montage nomenclature, or 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.
It’s like all channels are now available. In the topic it was suggested to use rename_channels
:
raw.rename_channels({'BrainVision': 'BrainVision'})
and error:
ValueError: Invalid channel name(s) {'BrainVision'} is not present in info
so via direct renaming:
info = raw.info
for ch in range(0, 32):
mne.rename_channels(info, {info["ch_names"][ch]: montage.ch_names[ch]})
I got such results:
default montage from standard biosemi32 - ['Fp1', 'AF3', 'F7', 'F3', 'FC1', 'FC5', 'T7', 'C3', 'CP1', 'CP5', 'P7', 'P3', 'Pz', 'PO3', 'O1', 'Oz', 'O2', 'PO4', 'P4', 'P8', 'CP6', 'CP2', 'C4', 'T8', 'FC6', 'FC2', 'F4', 'F8', 'AF4', 'Fp2', 'Fz', 'Cz']
final montage - ['Fp1', 'AF3', 'F7', 'F3', 'FC1', 'FC5', 'T7', 'C3', 'CP1', 'CP5', 'P7', 'P3', 'Pz', 'PO3', 'O1', 'Oz', 'O2', 'PO4', 'P4', 'P8', 'CP6', 'CP2', 'C4', 'T8', 'FC6', 'FC2', 'F4', 'F8', 'AF4', 'Fp2', 'Fz', 'Cz', 'x_dir', 'y_dir', 'z_dir']