# Importing EEGLAB or FieldTrip data to .fif

**URL:** <https://mne.discourse.group/t/importing-eeglab-or-fieldtrip-data-to-fif/482>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [September 3, 2012, 4:28pm UTC](https://mne.discourse.group/t/importing-eeglab-or-fieldtrip-data-to-fif/482 "2012-09-03T16:28:21Z")\
**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:** [September 3, 2012, 4:28pm UTC](https://mne.discourse.group/t/importing-eeglab-or-fieldtrip-data-to-fif/482/1 "2012-09-03T16:28:21Z")

</div>

Hello everyone,

I have EEG data which were preprocessed using EEGLAB, and I'm now  
interested in doing some exploratory source localization. Are there any  
functions available for importing EEGLAB data into .fif format? (Being able  
to import FieldTrip data would also work, since I can convert the EEGLAB  
data to FieldTrip.)

Best,  
Steve Politzer-Ahles

---

<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:** [September 3, 2012, 8:45pm UTC](https://mne.discourse.group/t/importing-eeglab-or-fieldtrip-data-to-fif/482/2 "2012-09-03T20:45:56Z")

</div>

hi Stephen,

EEGLAB has very likely lost the measurement info details required  
for source reconstruction. What I would do is convert the original  
EEG data to fif with one of the mne file converter (I don't know what  
was the original file format) then load the raw fif file with mne-python,  
then replace the content of the data of the raw object after reading  
the .set file with scipy.io.loadmat and finally save the data back  
to disk.

Regarding fieldtrip, due to the possible loss of the measurement info  
a converter won't help. However FYI we've discussed at Biomag with  
fieldtrip guys on how to write back a proper fif file from a fieldtrip  
dataset and that's something they are willing to do. Maybe you can  
poke them and offer your help.

Best,  
Alex
