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?
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). 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.