# converting EEGlab ICAed .set file to	MNE ICA object

**URL:** <https://mne.discourse.group/t/converting-eeglab-icaed-set-file-to-mne-ica-object/1451>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [March 10, 2018, 8:46pm UTC](https://mne.discourse.group/t/converting-eeglab-icaed-set-file-to-mne-ica-object/1451 "2018-03-10T20:46:03Z")\
**Posts on this page:** 2\
**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 10, 2018, 8:46pm UTC](https://mne.discourse.group/t/converting-eeglab-icaed-set-file-to-mne-ica-object/1451/1 "2018-03-10T20:46:03Z")

</div>

Hi,

I fitted ICA on EEGlab with EEG data, and generated some .set files. I want  
to try the MNE Python ICA functions, and want to try converting those .set  
files into MNE Python ICA objects. Is there a way to do that?

Thanks in advance!  
Ian  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20180310/cc969a3e/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180310/cc969a3e/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 11, 2018, 7:44am UTC](https://mne.discourse.group/t/converting-eeglab-icaed-set-file-to-mne-ica-object/1451/2 "2018-03-11T07:44:33Z")

</div>

Hi!

In principle this should be possible. You can load the .set file with scipy.io.loadmat (because it is a valid .mat file). The important ICA-related parts are stored in EEG.weights and EEG.sphering - these roughly correspond to MNE?s ICA.unmixing\_matrix\_ and ICA.pca\_components\_. You could create a new ICA object with ica = mne.preprocessing.ICA() and then set these two fields. However, you might need to set other attributes in order for this to work ([https://martinos.org/mne/stable/generated/mne.preprocessing.ICA.html#attributes](https://martinos.org/mne/stable/generated/mne.preprocessing.ICA.html#attributes)). Furthermore, EEGLAB and MNE handle these matrices slightly differently in terms of performed transformations. MNE performs a pre-whitening transform (which is usually a scaling to unit variance), and this is not included in the two matrices. I?m currently trying to simplify this process, so if it doesn?t work please feel free to contact me again.

Clemens
