[Mne_analysis] info channel name inconsistency detected, please notify mne-python developers

Dr. Rogene M. Eichler West, Ph.D. QEEGD dr.west at nwneuro.pro
Tue Nov 16 15:35:51 EST 2021
Search archives:

        External Email - Use Caution        

Hello!

I am reading in a data file produced by a BrainMaster Discovery amp. I removed suffix on the imported channel names to be consistent with the definitions used by the standard_1020 montage object. I am not sure why I would still be throwing this error.

I would appreciate any insights! Thanks!

electrodes = 20;
for electrode in range(electrodes):
plotdata[electrode] = random.random()
newname = rawdata.ch_names[electrode]
newname = newname.replace("-LE","",1)
rawdata.ch_names[electrode] = newname

montage = mne.channels.make_standard_montage("standard_1020")
print(montage.ch_names)
print(rawdata.ch_names)
rawdata.info.set_montage("standard_1020")

#mne.viz.plot_sensors(rawdata.info)
#mne.viz.plot_topomap(plotdata, pos=rawdata.info, vmin=-1, vmax=1)

['Fp1', 'Fpz', 'Fp2', 'AF9', 'AF7', 'AF5', 'AF3', 'AF1', 'AFz', 'AF2', 'AF4', 'AF6', 'AF8', 'AF10', 'F9', 'F7', 'F5', 'F3', 'F1', 'Fz', 'F2', 'F4', 'F6', 'F8', 'F10', 'FT9', 'FT7', 'FC5', 'FC3', 'FC1', 'FCz', 'FC2', 'FC4', 'FC6', 'FT8', 'FT10', 'T9', 'T7', 'C5', 'C3', 'C1', 'Cz', 'C2', 'C4', 'C6', 'T8', 'T10', 'TP9', 'TP7', 'CP5', 'CP3', 'CP1', 'CPz', 'CP2', 'CP4', 'CP6', 'TP8', 'TP10', 'P9', 'P7', 'P5', 'P3', 'P1', 'Pz', 'P2', 'P4', 'P6', 'P8', 'P10', 'PO9', 'PO7', 'PO5', 'PO3', 'PO1', 'POz', 'PO2', 'PO4', 'PO6', 'PO8', 'PO10', 'O1', 'Oz', 'O2', 'O9', 'Iz', 'O10', 'T3', 'T5', 'T4', 'T6', 'M1', 'M2', 'A1', 'A2']
['Fp1', 'Fp2', 'F3', 'F4', 'C3', 'C4', 'P3', 'P4', 'O1', 'O2', 'F7', 'F8', 'T3', 'T4', 'T5', 'T6', 'Fz', 'Cz', 'Pz', 'A2']

---------------------------------------------------------------------------

RuntimeError

Traceback (most recent call last)

<ipython-input-118-d108ab9261be>

in

<module>

11

print

(

montage

.

ch_names

)

12

print

(

rawdata

.

ch_names

)

---> 13

rawdata

.

info

.

set_montage

(

"standard_1020"

)

14

#mne.viz.plot_sensors(rawdata.info)

15

#mne.viz.plot_topomap(plotdata, pos=rawdata.info, vmin=-1, vmax=1)

<decorator-gen-24>

in

set_montage

(self, montage, match_case, match_alias, on_missing, verbose)

~\anaconda3\lib\site-packages\mne\io\meas_info.py

in

set_montage

(self, montage, match_case, match_alias, on_missing, verbose)

177

from

.

.

channels

.

montage

import

_set_montage

178

info

=

self

if

isinstance

(

self

,

Info

)

else

self

.

info

--> 179

_set_montage

(

info

,

montage

,

match_case

,

match_alias

,

on_missing

)

180

return

self

181

~\anaconda3\lib\site-packages\mne\channels\montage.py

in

_set_montage

(***failed resolving arguments***)

936

937

# only get the eeg, seeg, dbs, ecog channels

--> 938

picks = pick_types(

939

info

,

meg

=

False

,

eeg

=

True

,

seeg

=

True

,

dbs

=

True

,

ecog

=

True

,

940

exclude=())

~\anaconda3\lib\site-packages\mne\io\pick.py

in

pick_types

(info, meg, eeg, stim, eog, ecg, emg, ref_meg, misc, resp, chpi, exci, ias, syst, seeg, dipole, gof, bio, ecog, fnirs, csd, dbs, include, exclude, selection)

445

_validate_type

(

meg

,

(

bool

,

str

)

,

'meg'

)

446

--> 447

exclude

=

_check_info_exclude

(

info

,

exclude

)

448

nchan

=

info

[

'nchan'

]

449

pick

=

np

.

zeros

(

nchan

,

dtype

=

bool

)

~\anaconda3\lib\site-packages\mne\io\pick.py

in

_check_info_exclude

(info, exclude)

355

def

_check_info_exclude

(

info

,

exclude

)

:

356

_validate_type

(

info

,

"info"

)

--> 357

info

.

_check_consistency

(

)

358

if

exclude

is

None

:

359

raise

ValueError

(

'exclude must be a list of strings or "bads"'

)

~\anaconda3\lib\site-packages\mne\io\meas_info.py

in

_check_consistency

(self, prepend_error)

925

ch_1 != ch_2 for ch_1, ch_2 in zip(self['ch_names'], chs)) or \

926

self

[

'nchan'

]

!=

len

(

chs

)

:

--> 927

raise RuntimeError('%sinfo channel name inconsistency detected, '

928

'please notify mne-python developers'

929

% (prepend_error,))

RuntimeError

: info channel name inconsistency detected, please notify mne-python developers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20211116/78de0e2d/attachment-0001.html 


More information about the Mne_analysis mailing list