Next: EDR(1) Up: WFDB Applications Guide Previous: ECGPUWAVE(1)On This Page

Name

edf2mit, mit2edf - convert between EDF and WFDB-compatible formats

Synopsis

edf2mit -i edffile [ options ... ]
mit2edf -r record [ options ... ]

Description

These programs convert EDF (European Data Format) files into WFDB-compatible files (as used in PhysioBank) and vice versa. European Data Format was originally designed for storage of polysomnograms.

edf2mit reads the specified edffile and creates WFDB-compatible signal and header files containing the same data. Options for edf2mit include:

-b
Input is in big-endian byte order (default: little-endian).
-h
Print a brief usage summary.
-r record
Create the specified record (default: use the patient ID field from the input file as the record name).
-s signal-list
Copy only the signals named in the signal-list (one or more input signal numbers, separated by spaces; default: copy all signals). Signals are numbered consecutively beginning with zero. This option may be used to re-order or duplicate signals.
-v
Verbose mode (print debugging output).

mit2edf reads the specified WFDB-format record (header and signal files) and creates an EDF file containing the same data. Output from mit2edf is always in the standard little-endian format. Options for mit2edf include:

-h
Print a brief usage summary.
-o file
Write output to the specified file (default: record.edf).
-v
Verbose mode (print debugging output).

Note that WFDB format does not include a standard way to specify the transducer type or the prefiltering specification; these parameters are not preserved by these conversion programs. Also note that use of the standard signal and unit names specified for EDF is permitted but not enforced by mit2edf.

Many EDF files contain signals at widely varying sampling frequencies. edf2mit handles these properly, but the default behavior of most WFDB applications is to read such data in low-resolution mode (in which all signals are resampled at the lowest sampling frequency used for any signal in the record). This is almost certainly not what you want if, for example, the record contains EEG signals sampled at 200 Hz and body temperature sampled at 1 Hz; by default, applications such as rdsamp and wave will resample the EEGs (and any other signals in the record) at 1 Hz. To avoid this behavior, you can use the -H (high resolution) option provided by rdsamp, wave, and a few other WFDB applications, or you can set the environment variable WFDBGVMODE to 1 (or any non-zero value) to specify that signals are to be read in high-resolution mode (in which all signals are resampled at the highest frequency used for any signal in the record). Setting WFDBGVMODE works with all WFDB applications, not only those that support the -H option. For further information, see the section titled "Multi-Frequency Records" in chapter 5 of the WFDB Programmer’s Guide.

Note that applications built using version 10.4.5 and later versions of the WFDB library can read EDF files directly, so that the conversion performed by edf2mit is no longer necessary. The native WFDB files produced by edf2mit can be read more efficiently and with lower latency and memory requirements than the EDF files; in most cases, however, the difference will not be noticeable.

Environment

It may be necessary to set and export the shell variable WFDB (see setwfdb(1) ).

Availability

These programs are provided in the convert directory of the WFDB Software Package. Run make in that directory to compile and install them if they have not been installed already.

The PhysioNet ATM (http://physionet.org/cgi-bin/ATM) provides web access to mit2edf (select Export signals as EDF from the Toolbox).

See Also

a2m(1) , rdedfann(1) , snip(1) , xform(1) , wfdb(3) , header(5)
Bob Kemp, Alpo V[:a]rri, Agostinho C. Rosa, Kim D. Nielsen and John Gade.
A simple format for exchange of digitized polygraphic recordings. Electroencephalography and Clinical Neurophysiology 82:391-393 (1992).
Bob Kemp’s EDF web site (http://www.edfplus.info/).
The definitive reference on the format; it includes the full specification of EDF from the 1992 paper, sample EDF files, software for reading and viewing them, FAQs, and much more.

Author

George B. Moody (george@mit.edu)

Sources

http://www.physionet.org/physiotools/wfdb/convert/edf2mit.c
http://www.physionet.org/physiotools/wfdb/convert/mit2edf.c


Table of Contents

Up: WFDB Applications Guide


Please e-mail your comments and suggestions to webmaster@physionet.org, or post them to:

PhysioNet
MIT Room E25-505A
77 Massachusetts Avenue
Cambridge, MA 02139 USA

Updated 10 June 2022