# Loading the montage on mne-python

**URL:** <https://mne.discourse.group/t/loading-the-montage-on-mne-python/2116>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [March 19, 2020, 8:35am UTC](https://mne.discourse.group/t/loading-the-montage-on-mne-python/2116 "2020-03-19T08:35:45Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 19, 2020, 8:35am UTC](https://mne.discourse.group/t/loading-the-montage-on-mne-python/2116/1 "2020-03-19T08:35:45Z")

</div>

External Email - Use Caution

Hi, I'm running some tests with the EEGBCI  
\<[https://physionet.org/content/eegmmidb/1.0.0/](https://physionet.org/content/eegmmidb/1.0.0/)\> dataset  
\<[https://physionet.org/content/eegmmidb/1.0.0/](https://physionet.org/content/eegmmidb/1.0.0/)\>, the database format is EDF  
and I'm using version 0.19.2 of mne-python.

I'm trying to make an ICA, the problem is that when I call the method:  
ica.plot\_properties(raw, picks=[0, 1])

I get this error back in the console:  
WARNING:root:Did not find any electrode locations (in the info object),  
will attempt to use digitization points instead. However, if digitization  
points do not correspond to the EEG electrodes, this will lead to bad  
results. Please verify that the sensor locations in the plot are accurate.

I probably have to load the montage. How do I do that? I tried to look  
carefully at the documentation but I didn't reach a conclusion. Could  
someone help me?  
Thank you for your support,

Francesco Mattioli

I'm trying to work without distractions. If I do not respond immediately,  
drink a cup of tea and be patient. Great ideas need deep work!  
?  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20200319/5c8c0c66/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200319/5c8c0c66/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 19, 2020, 8:49am UTC](https://mne.discourse.group/t/loading-the-montage-on-mne-python/2116/2 "2020-03-19T08:49:33Z")

</div>

External Email - Use Caution

hi,

if you go this page at the bottom you'll see all examples that use this  
dataset:

[https://mne.tools/stable/generated/mne.datasets.eegbci.load\_data.html](https://mne.tools/stable/generated/mne.datasets.eegbci.load_data.html)

you'll see that one example makes topographies.

[https://mne.tools/stable/auto\_examples/decoding/plot\_decoding\_csp\_eeg.html#sphx-glr-auto-examples-decoding-plot-decoding-csp-eeg-py](https://mne.tools/stable/auto_examples/decoding/plot_decoding_csp_eeg.html#sphx-glr-auto-examples-decoding-plot-decoding-csp-eeg-py)

at the bottom you'll see it uses a layout. Now if you switch to current code  
version it will use set\_montage.

[https://mne.tools/dev/auto\_examples/decoding/plot\_decoding\_csp\_eeg.html#sphx-glr-auto-examples-decoding-plot-decoding-csp-eeg-py](https://mne.tools/dev/auto_examples/decoding/plot_decoding_csp_eeg.html#sphx-glr-auto-examples-decoding-plot-decoding-csp-eeg-py)

HTH  
Alex

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 19, 2020, 10:55am UTC](https://mne.discourse.group/t/loading-the-montage-on-mne-python/2116/3 "2020-03-19T10:55:00Z")

</div>

External Email - Use Caution

I think he will have the same problem as me with sfp for montage.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 21, 2020, 11:15am UTC](https://mne.discourse.group/t/loading-the-montage-on-mne-python/2116/4 "2020-03-21T11:15:13Z")

</div>

External Email - Use Caution

Thank you for your help. The code you suggested is from another version of  
mne-python (0.20.dev0), I'm using 0.19.2. Do you suggest to upgrade the  
library to version 0.20.dev0?  
Regards,  
Francesco Mattioli

I'm trying to work without distractions. If I do not respond immediately,  
drink a cup of tea and be patient. Great ideas need deep work!

?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 21, 2020, 12:50pm UTC](https://mne.discourse.group/t/loading-the-montage-on-mne-python/2116/5 "2020-03-21T12:50:00Z")

</div>

External Email - Use Caution

hi,

I gave you 2 links. The first one:

[https://mne.tools/stable/auto\_examples/decoding/plot\_](https://mne.tools/stable/auto_examples/decoding/plot_)  
decoding\_csp\_eeg.html#sphx-glr-auto-examples-decoding-  
plot-decoding-csp-eeg-py

uses the stable 0.19.2 code.

Alex

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 21, 2020, 4:59pm UTC](https://mne.discourse.group/t/loading-the-montage-on-mne-python/2116/6 "2020-03-21T16:59:54Z")

</div>

External Email - Use Caution

Thank you for your patience. In this code a layout is loaded i, on the  
other hand, have to load a montage.  
If I go to the third link you sent in the first email, the syntax used is  
this one:

eegbci.standardize(raw) # set channel names  
montage = make\_standard\_montage('standard\_1020')  
raw.set\_montage(montage)

The output is:

File "\<ipython-input-14-90c82492d6c4\>", line 4, in \<module\>  
&nbsp;&nbsp;&nbsp;&nbsp;eegbci.standardize(raw) # set channel names  
AttributeError: module 'mne.datasets.eegbci' has no attribute 'standardize'

Do you have any suggestion?

Francesco Mattioli

I'm trying to work without distractions. If I do not respond immediately,  
drink a cup of tea and be patient. Great ideas need deep work!

?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 21, 2020, 5:15pm UTC](https://mne.discourse.group/t/loading-the-montage-on-mne-python/2116/7 "2020-03-21T17:15:48Z")

</div>

External Email - Use Caution

Please copy code from this page :

[https://mne.tools/stable/auto\_examples/decoding/plot\_decoding\_csp\_eeg.html#sphx-glr-auto-examples-decoding-plot-decoding-csp-eeg-py](https://mne.tools/stable/auto_examples/decoding/plot_decoding_csp_eeg.html#sphx-glr-auto-examples-decoding-plot-decoding-csp-eeg-py)

if you use 0.19.2

eegbci.standardize(raw)

if from the dev version.

Alex  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20200321/6d61db4e/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200321/6d61db4e/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 21, 2020, 5:30pm UTC](https://mne.discourse.group/t/loading-the-montage-on-mne-python/2116/8 "2020-03-21T17:30:07Z")

</div>

External Email - Use Caution

I have already tried, that does not solve my problem, I have to apply an  
ICA and display the independent components on the scalp. With the function:

ica.plot\_properties(raw, picks=[x,y])

But when i run I get this error back in the console:  
WARNING:root:Did not find any electrode locations (in the info object),  
will attempt to use digitization points instead. However, if digitization  
points do not correspond to the EEG electrodes, this will lead to bad  
results. Please verify that the sensor locations in the plot are accurate.

Francesco Mattioli

I'm trying to work without distractions. If I do not respond immediately,  
drink a cup of tea and be patient. Great ideas need deep work!

?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [March 22, 2020, 10:03am UTC](https://mne.discourse.group/t/loading-the-montage-on-mne-python/2116/9 "2020-03-22T10:03:36Z")

</div>

External Email - Use Caution

I solved the problem! I leave the solution in case anyone needs it.

map = {  
&nbsp;&nbsp;&nbsp;&nbsp;'Fc5.': 'FC5', 'Fc3.': 'FC3', 'Fc1.': 'FC1', 'Fcz.': 'FCz', 'Fc2.': 'FC2',  
&nbsp;&nbsp;&nbsp;&nbsp;'Fc4.': 'FC4', 'Fc6.': 'FC6', 'C5..': 'C5', 'C3..': 'C3', 'C1..': 'C1',  
&nbsp;&nbsp;&nbsp;&nbsp;'Cz..': 'Cz', 'C2..': 'C2', 'C4..': 'C4', 'C6..': 'C6', 'Cp5.': 'CP5',  
&nbsp;&nbsp;&nbsp;&nbsp;'Cp3.': 'CP3', 'Cp1.': 'CP1', 'Cpz.': 'CPz', 'Cp2.': 'CP2', 'Cp4.': 'CP4',  
&nbsp;&nbsp;&nbsp;&nbsp;'Cp6.': 'CP6', 'Fp1.': 'Fp1', 'Fpz.': 'Fpz', 'Fp2.': 'Fp2', 'Af7.': 'AF7',  
&nbsp;&nbsp;&nbsp;&nbsp;'Af3.': 'AF3', 'Afz.': 'AFz', 'Af4.': 'AF4', 'Af8.': 'AF8', 'F7..': 'F7',  
&nbsp;&nbsp;&nbsp;&nbsp;'F5..': 'F5', 'F3..': 'F3', 'F1..': 'F1', 'Fz..': 'Fz', 'F2..': 'F2',  
&nbsp;&nbsp;&nbsp;&nbsp;'F4..': 'F4', 'F6..': 'F6', 'F8..': 'F8', 'Ft7.': 'FT7', 'Ft8.': 'FT8',  
&nbsp;&nbsp;&nbsp;&nbsp;'T7..': 'T7', 'T8..': 'T8', 'T9..': 'T9', 'T10.': 'T10', 'Tp7.': 'TP7',  
&nbsp;&nbsp;&nbsp;&nbsp;'Tp8.': 'TP8', 'P7..': 'P7', 'P5..': 'P5', 'P3..': 'P3', 'P1..': 'P1',  
&nbsp;&nbsp;&nbsp;&nbsp;'Pz..': 'Pz', 'P2..': 'P2', 'P4..': 'P4', 'P6..': 'P6', 'P8..': 'P8',  
&nbsp;&nbsp;&nbsp;&nbsp;'Po7.': 'PO7', 'Po3.': 'PO3', 'Poz.': 'POz', 'Po4.': 'PO4', 'Po8.': 'PO8',  
&nbsp;&nbsp;&nbsp;&nbsp;'O1..': 'O1', 'Oz..': 'Oz', 'O2..': 'O2', 'Iz..': 'Iz'}

raw.rename\_channels(map)  
raw.set\_montage('standard\_1005')

Thank you for your patience,

Francesco Mattioli

I'm trying to work without distractions. If I do not respond immediately,  
drink a cup of tea and be patient. Great ideas need deep work!

?
