# Error position electrodes when doing ICA

**URL:** <https://mne.discourse.group/t/error-position-electrodes-when-doing-ica/10489>\
**Category:** Support & Discussions\
**Tags:** preprocessing, eeg, visualization\
**Created:** [November 5, 2024, 5:30pm UTC](https://mne.discourse.group/t/error-position-electrodes-when-doing-ica/10489 "2024-11-05T17:30:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![SilvanaHuertas](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/silvanahuertas/32/3030_2.png) [@SilvanaHuertas](https://mne.discourse.group/u/SilvanaHuertas)\
**Post date:** [November 5, 2024, 5:30pm UTC](https://mne.discourse.group/t/error-position-electrodes-when-doing-ica/10489/1 "2024-11-05T17:30:04Z")

</div>

Hi everyone,

I’m preprocessing my data but I have an issue when I do the ICA analysis. Before I do the ica, I plot the montage using this code:

`raw.plot_sensors(kind='topomap', show_names=True, show=False,sphere='auto')`

I have created a montage with the code:

`mne.channels.make_dig_montage(ch_pos=channel_positions, nasion=nas, lpa=lpa, rpa=rpa)`

When I plot this montage I get what you see in the first figure

 ![image](https://global.discourse-cdn.com/free1/uploads/mne/original/2X/7/760bfa649d49c9efb9acb185987315a532829c6c.png)

However, after I do that plot, I ran the ICA and I get the IC with the positions of the electrodes incorrect. Why are the electrodes in the IC positioned differently that in the `raw.plot_sensors()`? And how can I make them be in the same positions as in the sensor plot? Thank you

 ![image](https://global.discourse-cdn.com/free1/uploads/mne/original/2X/0/05badaaae39df2cbc9042b2b732db85a13b1aa48.png)

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [November 5, 2024, 7:01pm UTC](https://mne.discourse.group/t/error-position-electrodes-when-doing-ica/10489/2 "2024-11-05T19:01:07Z")

</div>

Which code do you use for plotting either figure?

---

<div class="post-metadata">

**Author:** ![SilvanaHuertas](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/silvanahuertas/32/3030_2.png) [@SilvanaHuertas](https://mne.discourse.group/u/SilvanaHuertas)\
**Post date:** [November 5, 2024, 8:11pm UTC](https://mne.discourse.group/t/error-position-electrodes-when-doing-ica/10489/3 "2024-11-05T20:11:04Z")

</div>

For plotting the topoplot I used raw.plot\_sensors(kind=‘topomap’, show\_names=True, show=False,sphere=‘auto’) and for plotting the ICs from the ICA I used ICA.plot\_components()

---

<div class="post-metadata">

**Author:** ![sappelhoff](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/sappelhoff/32/3276_2.png) [@sappelhoff](https://mne.discourse.group/u/sappelhoff)\
**Post date:** [November 5, 2024, 8:13pm UTC](https://mne.discourse.group/t/error-position-electrodes-when-doing-ica/10489/4 "2024-11-05T20:13:24Z")

</div>

> [@SilvanaHuertas](#):
>
> mne.channels.make\_dig\_montage(ch\_pos=channel\_positions, nasion=nas, lpa=lpa, rpa=rpa)

You are passing your own channel positions – did you make sure that they are in units of ~~millimeters~~ meters?

---

<div class="post-metadata">

**Author:** ![SilvanaHuertas](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/silvanahuertas/32/3030_2.png) [@SilvanaHuertas](https://mne.discourse.group/u/SilvanaHuertas)\
**Post date:** [November 5, 2024, 8:14pm UTC](https://mne.discourse.group/t/error-position-electrodes-when-doing-ica/10489/5 "2024-11-05T20:14:12Z")

</div>

I just saw that I should also put sphere= ‘auto’ in the ICA.plot\_components().

So never mind 🙂

---

<div class="post-metadata">

**Author:** ![SilvanaHuertas](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/silvanahuertas/32/3030_2.png) [@SilvanaHuertas](https://mne.discourse.group/u/SilvanaHuertas)\
**Post date:** [November 5, 2024, 8:16pm UTC](https://mne.discourse.group/t/error-position-electrodes-when-doing-ica/10489/6 "2024-11-05T20:16:06Z")

</div>

Yes, I made sure the units are correct.

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [November 5, 2024, 8:26pm UTC](https://mne.discourse.group/t/error-position-electrodes-when-doing-ica/10489/7 "2024-11-05T20:26:34Z")

</div>

I would say it still suggests that something is not quite right about those coordinates…

---

<div class="post-metadata">

**Author:** ![mscheltienne](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/mscheltienne/32/827_2.png) [@mscheltienne](https://mne.discourse.group/u/mscheltienne)\
**Post date:** [November 7, 2024, 3:36pm UTC](https://mne.discourse.group/t/error-position-electrodes-when-doing-ica/10489/9 "2024-11-07T15:36:39Z")

</div>

`sphere="auto"` automatically fits the sphere to your digitization points; which by-passes any scaling (unit) issue. But the fact that the topographic plot on a sphere of radius 0.095 m (default of MNE) yields the ICA plot you see shows that there is a scaling issue somewhere.

Mathieu
