Runtime error - Not setting positions of misc channels found in montage-- eeg data in brainvision format

** I have a dataset in BrainVision Core Data Format which consists of the header file (.vhdr), marker file (.vmrk), raw EEG data (.eeg) file, channels and events (.tsv) file, for each subject. When I read the .vhdr file using mne.io.read_raw_brainvision(fname.vhdr, preload=True), I get the following errorPreformatted text**

# Import the BrainVision data into an MNE Raw object
    raw = mne.io.read_raw_brainvision(fname, preload=True)
C:\Users\bipva\AppData\Local\Temp/ipykernel_21412/3588581508.py:8: RuntimeWarning: Not setting positions of 101 misc channels found in montage:
["J'2", "J'3", "J'4", "J'5", "J'6", "J'7", "J'8", "B'2", "B'3", "B'4", "B'5", "B'6", "B'7", "B'8", "B'9", "B'10", "B'11", "B'12", "C'2", "C'3", "C'4", "C'5", "C'6", "C'7", "C'8", "C'9", "C'10", "C'11", "C'12", "D'2", "D'3", "D'4", "D'5", "D'6", "D'7", "D'8", "D'9", "D'10", "D'11", "D'12", "E'2", "E'3", "E'4", "E'5", "E'6", "E'7", "E'8", "E'9", "E'10", "E'11", "E'12", "T'2", "T'3", "T'4", "T'5", "T'6", "T'7", "T'8", "L'2", "L'3", "L'4", "L'5", "L'6", "L'7", "L'8", "L'9", "L'10", "L'11", "L'12", "H'2", "H'3", "H'4", "H'5", "H'6", "H'7", "H'8", "O'2", "O'3", "O'4", "O'5", "O'6", "O'7", "O'8", "O'9", "O'10", "O'11", "O'12", "O'13", "O'14", "O'15", 'B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8', 'B9', 'B10', 'B11', 'B12']
Consider setting the channel types to be of EEG/sEEG/ECoG/DBS/fNIRS using inst.set_channel_types before calling inst.set_montage, or omit these channels when creating your montage.
  raw = mne.io.read_raw_brainvision(fname, preload=True)

Please help.

What are those channels? By the way, this is a warning, not an error. It does not raise and interrupt execution. The warning is here to remind you that you have 101 channels of type 'misc' which do not have a montage (channel layout).

Depending on what they represents, and what you want to do with them, you should change their type with:

raw.set_channel_types: mne.io.Raw β€” MNE 0.24.1 documentation

And set a montage (channel locations) with:

raw.set_montage: mne.io.Raw β€” MNE 0.24.1 documentation


For instance, let’s consider that those 3 channels "J'2", "J'3", "J'4" are 'eeg' channels:

chs = ["J'2", "J'3", "J'4"]
mapping = {ch: 'eeg' for ch in chs}
raw.set_channel_types(mapping)

For the montage, either you provide yourself a DigMontage, or you use a standard montage which can be created with make_standard_montage.
However, a standard montage expects standard channel names, e.g. for a 'standard_1020' montage: 'Fp1', 'Fpz', 'Fp2', ....

You can rename channels with raw.rename_channels: mne.io.Raw β€” MNE 0.24.1 documentation

1 Like

Thanks for your reply. The data is in ieeg-BIDS where channels file is given separately. I made a dictionary of (channels, type) and used the set_channel_types function but again getting the runtime error. Due to runtime error, I am unable to process it further using other mne-python functions.