# ICA from EEGLAB to MNE Python

**URL:** <https://mne.discourse.group/t/ica-from-eeglab-to-mne-python/2059>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [January 31, 2020, 3:45pm UTC](https://mne.discourse.group/t/ica-from-eeglab-to-mne-python/2059 "2020-01-31T15:45:36Z")\
**Posts on this page:** 3\
**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:** [January 31, 2020, 3:45pm UTC](https://mne.discourse.group/t/ica-from-eeglab-to-mne-python/2059/1 "2020-01-31T15:45:36Z")

</div>

External Email - Use Caution

Hello,  
I have some epoched EEGLAB data (.set) where I computed ICA weights. I would need to extract those weights in MNE Python and then apply them to raw EEGLAB data (.set) already imported in MNE Python.  
What would be the best way to proceed?  
I have read [https://github.com/mne-tools/mne-python/issues/6917](https://github.com/mne-tools/mne-python/issues/6917) and [https://github.com/mne-tools/mne-python/pull/6938](https://github.com/mne-tools/mne-python/pull/6938) but I am not sure how to implement this.

Many thanks.  
Best wishes,  
Federica

[University of Central Lancashire]  
Please consider the environment before printing  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20200131/7ba0ee79/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200131/7ba0ee79/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:** [January 31, 2020, 5:02pm UTC](https://mne.discourse.group/t/ica-from-eeglab-to-mne-python/2059/2 "2020-01-31T17:02:27Z")

</div>

External Email - Use Caution

Hi Federica,  
The changes in #6938 have not yet been merged into the master version of MNE-Python. It would be great if you could test whether it works for you though! To do that, you would need to be using the development version of MNE-Python. If you're not already using the development version, follow the instructions here:  
[https://mne.tools/dev/install/contributing.html](https://mne.tools/dev/install/contributing.html)

Then you need to get the version of the code from #6938 that has the attempted fix. Run this in a terminal from within the MNE-Python folder:

git remote add christian-oreilly [https://github.com/christian-oreilly/mne-python.git](https://github.com/christian-oreilly/mne-python.git)  
git fetch christian-oreilly  
git checkout -b testing-branch christian-oreilly/import\_eeglab\_ica

At that point your local MNE-Python should be the modified version with the experimental EEGLAB ICA reading code, and you can try running mne.preprocessing.read\_ica\_eeglab() on your data.

If you do try this, please tell us whether or not it worked (and what went wrong if it failed) on the page for #6938. Note: don't forget to switch back to the development version once #6938 is merged in (git checkout master; git pull upstream/master).

-- dan  
Daniel McCloy  
[https://dan.mccloy.info](https://dan.mccloy.info)  
Research Scientist  
Institute for Learning and Brain Sciences  
University of Washington

??? Original Message ???

---

<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:** [January 31, 2020, 8:26pm UTC](https://mne.discourse.group/t/ica-from-eeglab-to-mne-python/2059/3 "2020-01-31T20:26:20Z")

</div>

External Email - Use Caution

hi,

this is now in master branch. You can use it with:

mne.preprocessing.read\_ica\_eeglab

let us know if it does not work

to install latest master do:

pip install -U [https://api.github.com/repos/mne-tools/mne-python/zipball/master](https://api.github.com/repos/mne-tools/mne-python/zipball/master)

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