Which file format does BioSemi use ?
 
For the new ActiveTwo system, we use the BioSemi Data Format. BDF is a 24 bit version of the popular 16 bit EDF format, which was used on previous BioSemi models with 16 bit converters. BDF is almost the same as EDF (see the full specifications and differences of the BDF/EDF file formats in the 2 tables below. Although initially the EDF format was mainly used in sleep research, BDF/EDF is now quickly gaining popularity in other EEG applications, ECG body surface potential mapping as well as EMG.
BESA, Sourcesignal and Persyst are fully compatible with BDF.
 
The EDF format was designed and published in 1992 by Bob Kemp, Alpo Värri, Agostinho C. Rosa, Kim D. Nielsen and John Gade as "A simple format for exchange of digitized polygraphic recordings" in Electroencephalography and Clinical Neurophysiology, 82 (1992) 391-393. The original EDF specifications can be found here
 
Each BDF/EDF file starts with a header followed by the number of Data records indicated in the header.
 
       
Length in bytes BDF Header: EDF Header: Description
8 bytes Byte 1: "255" (non ascii) Byte 1: "0" (ASCII) Identification code
Bytes 2-8 : "BIOSEMI" (ASCII) Bytes 2-8 : " "(ASCII)
80 bytes
User text input (ASCII)
Local subject identification
80 bytes
User text input (ASCII)
Local recording identification
8 bytes
dd.mm.yy (ASCII)
Startdate of recording
8 bytes
hh.mm.ss (ASCII)
Starttime of recording
8 bytes
(ASCII)
Number of bytes in header record
44 bytes
"24BIT" (ASCII)
"BIOSEMI" (ASCII)
Version of data format.
8 bytes
(ASCII)
Number of data records "-1" if unknown
8 bytes
e.g.: "1" (ASCII)
Duration of a data record, in seconds
4 bytes
e.g.: "257" or "128" (ASCII)
Number of channels (N) in data record
N x 16 bytes
e.g.: "Fp1", "Fpz", "Fp2", etc (ASCII)
Labels of the channels
N x 80 bytes
e.g.: "active electrode", "respiration belt" (ASCII)
Transducer type
N x 8 bytes
e.g.: "uV", "Ohm" (ASCII)
Physical dimension of channels
N x 8 bytes e.g.: "-262144" (ASCII) e.g.: "-32768" (ASCII) Physical minimum in units of physical dimension
N x 8 bytes e.g.: "262143" (ASCII) e.g.: "32767" (ASCII) Physical maximum in units of physical dimension
N x 8 bytes e.g.: "-8388608" (ASCII) e.g.: "-32768" (ASCII) Digital minimum
N x 8 bytes e.g.: "8388607" (ASCII) e.g.: "32767" (ASCII) Digital maximum
N x 80 bytes e.g.: "HP:DC; LP:410" e.g.: "HP:0,16; LP:500" Prefiltering
N x 8 bytes
For example: "2048" (ASCII)
Number of samples in each data record
(Sample-rate if Duration of data record = "1")
N x 32 bytes
(ASCII)
Reserved
     
  Note1: Total header length (for BDF and EDF) is: {(N+1)*256} bytes, where N is number of channels (including the status channel).
  Note2: The "gain" of a specific channel can be calculated by: (Physical max - Physical min) / (Digital max - Digital min).
    The result is the LSB value in the specified Physical dimension of channels. (31,25nV / 1uV in the BDF/EDF example Header from above)
  Note3: The last 10 fields are defined for each fields separately. Each channel can be different.
     
 
Below follows an example of a BDF Data Record from a 16 channel system with 2048Hz samplerate.
(Duration of a data record has been set to "1")
 
Byte in file
Which part of 24 bit
Which channel
Which sample of data record
Which data record
1
2
3
Byte 1
Byte 2
Byte 3
Channel 1
1
Duration of data set has been set to "1". So this block will be filled with (1x2048) samples from only "Channel 1"
1
4
5
6
Byte 1
Byte 2
Byte 3
Channel 1
2
7
8
9
Byte 1
Byte 2
Byte 3
Channel 1
3
etc
etc
etc
etc
6136
6137
6138
Byte 1
Byte 2
Byte 3
Channel 1
2046
6139
6140
6141
Byte 1
Byte 2
Byte 3
Channel 1
2047
6142
6143
6144
Byte 1
Byte 2
Byte 3
Channel 1
2048
6145
6146
6147
Byte 1
Byte 2
Byte 3
Channel 2
1
Duration of data set has been set to "1". So this block will be filled with (1x2048) samples from only "Channel 2"
6148
6149
6150
Byte 1
Byte 2
Byte 3
Channel 2
2
6151
6152
6153
Byte 1
Byte 2
Byte 3
Channel 2
3
etc
etc
etc
etc
12280
12281
12282
Byte 1
Byte 2
Byte 3
Channel 2
2046
12283
12284
12285
Byte 1
Byte 2
Byte 3
Channel 2
2047
12286
12287
12288
Byte 1
Byte 2
Byte 3
Channel 2
2048
etc
etc
etc
etc
 
98302
98303
98304
Byte 1
Byte 2
Byte 3
Channel 16
2048
 
98305
98306
98307
Byte 1
Byte 2
Byte 3
Channel 1
2049
 
2
98308
98309
98310
Byte 1
Byte 2
Byte 3
Channel 1
2050
 
etc
etc
etc
etc
 
etc
 
A zip file with two BDF test files can be downloaded from here.
This zip file contains 2 DBF files each with 60 seconds of a 17 channels measurement (channels A1 to A16 + Status), one file has 2048 Hz sample rate, the other has 256 Hz. The files have a 3Hz sine test signal on all channels for easy checking (approx. 200 uVpp on channels A1, approx. 100 uV in opposite polarity on channels A2 to A16).