The issue of converting EDF to FIF format

Hi all MEN users,

I used Net station to save recorded EEG data to EDF format. When I used
mne_edf2fiff to convert our EDF file to FIF file, I got this error message,

$ mne_edf2fiff --edf Recording_9_fil.edf --fif Recording_9_fil.fif

mne_edf2fiff version 1.6 compiled at Dec 21 2009 19:46:35

EDF/EDF+/BDF file (input) : Recording_9_fil.edf
No electrode position data specified.
fif file (output) : Recording_9_fil.fif

Parsing EDF/EDF+/BDF header...[failed]
Unequal sampling rates across data channels are not supported.

Best

Xiaoxiao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140702/929d5949/attachment.html

Hi Xiaoxiao,

What types of data are in there? The error message suggests that there is
data with different sampling rates. Do you have channels with different
sampling rates? If yes, can you re-export the data removing the data with
different sampling rates?

HTH,
D

Dear Dgw,

Thank you for you help. This file only includes signals of 128 channels
with same sample rate.

After that, I input EGI Net Station data into BrainVision and then save as
EDF file. This BrainVision EDF file can be converted to FIF file.

I used matlab toolbox to read this FIF file and its header information and
data are correct.

But I can not display it in the mne_browse_raw (see attached screenshot).

Best

Xiaoxiao

Hi Xiaoxiao,

What types of data are in there? The error message suggests that there is
data with different sampling rates. Do you have channels with different
sampling rates? If yes, can you re-export the data removing the data with
different sampling rates?

HTH,
D

Hi all MEN users,

I used Net station to save recorded EEG data to EDF format. When I used
mne_edf2fiff to convert our EDF file to FIF file, I got this error message,

$ mne_edf2fiff --edf Recording_9_fil.edf --fif Recording_9_fil.fif

mne_edf2fiff version 1.6 compiled at Dec 21 2009 19:46:35

EDF/EDF+/BDF file (input) : Recording_9_fil.edf
No electrode position data specified.
fif file (output) : Recording_9_fil.fif

Parsing EDF/EDF+/BDF header...[failed]
Unequal sampling rates across data channels are not supported.

Best

Xiaoxiao

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you
in error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

_______________________________________________
Mne_analysis mailing list
Mne_analysis at nmr.mgh.harvard.edu
Mne_analysis Info Page

The information in this e-mail is intended only for the person to whom it
is
addressed. If you believe this e-mail was sent to you in error and the
e-mail
contains patient information, please contact the Partners Compliance
HelpLine at
MyComplianceReport.com: Compliance and Ethics Reporting . If the e-mail was sent to you in
error
but does not contain patient information, please contact the sender and
properly
dispose of the e-mail.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140702/b52322e3/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2014-07-02 12:30:46.png
Type: image/png
Size: 78121 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140702/b52322e3/attachment.png

Hi Xiaoxiao,

we meanwhile have direct reading + conversion support for EGI data
in MNE-Python (development version),

Take a look at: mne.io.egi.read_raw_egi

It supports the native egi raw format.

Hope this helps,
Denis

Well, you will need to add a selection type to fit the Channel names. This
section describes what you need to do:

http://martinos.org/mne/stable/manual/browse.html?highlight=selection#caccjejd

HTH,
D

Dear Dgw,

Thank you for your help. I can display them.

Best

Xiaoxiao

Dear Denis,

I have installed MNE python. It can read EGI raw file.

Best

Xiaoxiao

Xiaoxiao, great!

Glad to hear it worked.

Best,
Denis

Dear Denis,

Thank you for your help. I have another simple question about saving elp
and EGI raw as a fif file.

I use raw = mne.io.egi.read_raw_egi() to read EGI raw data and elc =
mne.fiff.kit.read_elp() to read elp file.

How can I combine raw and elc and save them into one fif file?

Best

Xiaoxiao

Hi,

we currently only support that at the epochs stage:

http://martinos.org/mne/dev/generated/mne.epochs.add_channels_epochs.html

you need compatible sampling rates

HTH,
Denis

Dear Denis,

Thank you for your help.

elc = mne.fiff.kit.read_elp() get electrode locations acquired from
Polhemus system.

raw = mne.io.egi.read_raw_egi() get fif data object from EGI raw data file.

We want to add electrode locations elc into raw rather than epochs.

Best

Xiaoxiao

Hi

You can add the digitizer data from the raw kit data to the raw egi data. There are no built in functions for this but it shouldn't be too hard just be sure to match them up correctly. However currently raw data from one MEG and a different EEG system can't be combined because a lot of checks and potentially some corrections need to be done to combine these data. The kind of approximation the epic hung code makes is not safe to use on long stretches of data like you have in raw files.
Hth
D

Hi Xiaoxiao,

it turns out I misread your question.
If you want to add the electrode positions manually
you have to update the corresponding fields in the raw.info['chs'] for each
channel. It's the first three entries in the 'loc' and the the first row of
the matrix in 'eeg_loc'.

To give an example:

https://github.com/dengemann/mne-python/blob/montage/mne/montages/montage.py#L166

HTH,
Denis

HI Denis,

Thank you for your help.

Best

Xiaoxiao

Hi Dgw,

Thanks a lot.

Best

Xiaoxiao