|
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) |
|
|||
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 16 electrodes at 2048Hz samplerate. (BDF file is 16+1 channels) (16 electrodes + Trigger/Status channel) |
(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 |
||
|
|||||
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
|
||
|
|||||
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 |
||
|
This block will be filled with (13x2048) samples from "Channels 3-15" | ||||
92161 92162 92163 |
Byte
1
Byte
2
Byte
3 |
Channel 16 | 1 | This block will be filled with (1x2048) samples from "Channel 16" | |
92164 92165 92166 |
Byte
1
Byte
2
Byte
3 |
Channel 16 | 2 | ||
92167 92168 92169 |
Byte
1
Byte
2
Byte
3 |
Channel 16 | 3 | ||
|
|||||
98296
98297
98298 |
Byte
1
Byte
2
Byte
3 |
Channel 16 |
2046 |
||
98299
98300
98301 |
Byte
1
Byte
2
Byte
3 |
Channel
16 |
2047 |
||
98302
98303
98304 |
Byte
1
Byte
2
Byte
3 |
Channel
16 |
2048 |
||
98305 | Byte
1 |
Trigger LowByte |
1 | This block will be filled with (1x2048) samples from the Trigger/Status Channel | |
98306 | Byte
2 |
Trigger HighByte | |||
98307 | Byte
3 |
StatusByte | |||
98308 | Byte
1 |
Trigger LowByte |
2 | ||
98309 | Byte
2 |
Trigger HighByte | |||
98310 | Byte
3 |
StatusByte | |||
98311 | Byte
1 |
Trigger LowByte |
3 | ||
98312 | Byte
2 |
Trigger HighByte | |||
98313 | Byte
3 |
StatusByte | |||
|
|||||
104440 | Byte
1 |
Trigger LowByte |
2046 | ||
104441 | Byte
2 |
Trigger HighByte | |||
104442 | Byte
3 |
StatusByte | |||
104443 | Byte
1 |
Trigger LowByte |
2047 | ||
104444 | Byte
2 |
Trigger HighByte | |||
104445 | Byte
3 |
StatusByte | |||
104446 | Byte
1 |
Trigger LowByte |
2048 | ||
104447 | Byte
2 |
Trigger HighByte | |||
104448 | Byte
3 |
StatusByte | |||
104448
104449
104450 |
Byte
1
Byte
2
Byte
3 |
Channel
1 |
1 |
This block will be filled with (1x2048) samples from only "Channel 1" | 2 |
104451
104452
104453 |
Byte
1
Byte
2
Byte
3 |
Channel
1 |
2 |
||
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). |
|