The EDF format

This is the description of the European Data Format like it was publiced
in "Electroencephalography and clinical Neurophysiology" in 1992.

One data file contains one uninterrupted digitized polygraphic
recording. A data file consists of a header record followed by data
records. The variable-length header record identifies the patient and
specifies the technical characteristics of the recorded signals. The
data records contain consecutive fixed-duration epochs of the poly-
graphic recording.
The first 256 bytes of the header record specify the version
number of this format, local patient and recording identification,
time information about the recording, the number of data records
and finally the number of signals (ns) in each data record. Then for
each signal another 256 bytes follow in the header record, each
specifying the type of signal (e.g. EEG, body temperature, etc),
amplitude calibration and the number of samples in each data record
(from which the sampling frequency can be derived since the dura-
tion of a data record is also known). In this way the format allows
for different gains and sampling frequencies for each signal. The
header record contains 256 + (ns x 256) bytes. Fig. 1 shows it's de-
tailed format and fig. 2 shows an example.
The information in the ASCII strings must be left justified and
filled out with spaces. Midnight time is 00 00 00. The duration of
each data record is recommended to be a whole number of seconds
and its size (number of bytes) is recommended not to exceed 61,440.
Only if a 1 sec data record exceeds this size limit, the duration is
recommended to be smaller than 1 sec (e.g. 0.01).
The digital minimum and maximum of each signal should specify
the extreme values that can occur in the data records. These often
are the extreme output values of the A/D converter. The physical
(usually also physiological) minimum and maximum of this signal
should correspond to these digital extremes and be expressed in the
also specified physical dimension of the signal. These 4 extreme
values specify offset and amplification of the signal.
Following the header record, each of the subsequent data records
contains 'duration' seconds of 'ns' signals, with each signal being
represented by the specified (in the header) number of samples. In
order to reduce data size and adapt to commonly used software for
acquisition, processing and graphical display of polygraphic signals,
each sample value is represented as a 2-byte integer in 2's comple-
ment format. Fig. 1 shows the detailed format of each data record.
See also the example in Fig. 2.
Gains, electrode montages and filters should remain fixed during
the recording. Ofcourse, these may all be digitally modified during
replay of the digitized recording.


8 ascii version of this data format (0)
80 ascii local patient identification
80 ascii local recording identification
8 ascii startdate of recording (
8 ascii starttime of recording (
8 ascii number of bytes in header record
44 ascii reserved
8 ascii number of data records (-1 if unknown)
8 ascii duration of a data record, in seconds
4 ascii number of signals (ns) in data record
ns * 16 ascii ns * label (e.g. EEG FpzCz or Body temp)
ns * 80 ascii ns * transducer type (e.g. AgAgCI electrode)
ns * 8 ascii ns * physical dimension(e.g. uV or degree C)
ns * 8 ascii ns * physical minimum (e.g. -500 or 34)
ns * 8 ascii ns * physical maximum (e.g. 500 or 40)
ns * 8 ascii ns * digital minimum (e.g. -2048)
ns * 8 ascii ns * digital maximum (e.g. 2047)
ns * 80 ascii ns * prefiltering (e.g. HP:0.1Hz LP:75Hz)
ns * 8 ascii ns * nr of samples in each data record
ns * 32 ascii ns * reserved


nr of samples[1] * integer first signal in the data record
nr of samples[2] * integer second signal
nr of samples[ns] * integer last signal

Fig. 1 Detailed digital format of the header record (upper block,
ascii's only) and of each subsequent data record (lower block, inte-
gers only). Note that each one of the ns signals is characterized
separately in the header.

  |0       |
  |Free local patient identification: take care of privacy regulations!            |
  |Free local recording identification                                             |
  |768     |
  |Reserved                                    |
  |2880    |
  |30      |
  |2   |
  |EEG FpzCz       |
  |Body temperature|
  |Ag-AgCl cup electrodes                                                          |
  |Rectal thermistor                                                               |
  |uV      |
  |Degree C|
  |-440    |
  |34.4    |
  |510     |
  |40.2    |
  |-2048   |
  |-2048   |
  |2047    |
  |2047    |
  |Time constant 1s, First order lowpass at 75Hz                                   |
  |DC to 0.1Hz (first-order)                                                       |
  |15000   |
  |3       |
  |Reserved                        |
  |Reserved                        |

Fig. 2 Header record of a 24 h recording of EEG and body
temperature sampled at 500 Hz and 0.1 Hz, respectively. Note that
the offsets of EEG and body temperature are 35 uV and 37.3°C,
while the gains are 4.31/uV and 706.2/°C, respectively. In this
example, each 30 sec data record contains 15,000 samples of the
EEG followed by 3 samples of the body temperature signal.

Gains, electrode montages and filters should remain fixed during
the recording. Of course, these may all be digitally modified during
replay of the digitized recording.