You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: spec/header-files.md
+32-14Lines changed: 32 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,28 +21,35 @@ A header file contains:
21
21
22
22
Each line must be under 255 characters, and fields are separated by spaces or tabs (except where otherwise noted).
23
23
24
+
Detailed documentation on header files can be found at: [https://physionet.org/physiotools/wag/header-5.htm](https://physionet.org/physiotools/wag/header-5.htm)
25
+
24
26
---
25
27
26
28
## Record Line
27
29
28
30
The first non-comment line is the **record line**, which provides metadata about the overall record. It includes:
29
31
30
-
| Field | Description |
31
-
|:------|:------------|
32
-
| Record name | Identifier for the record (letters, digits, underscores only). |
33
-
| Number of segments (optional) | If present, appended as `/n`. Indicates a multi-segment record. |
34
-
| Number of signals | Number of signals described in the header. |
35
-
| Sampling frequency (optional) | Samples per second per signal. Defaults to 250 if omitted. |
36
-
| Counter frequency (optional) | Secondary clock frequency, separated from sampling frequency by a `/`. |
37
-
| Base counter value (optional) | Offset value for counter, enclosed in parentheses. |
38
-
| Number of samples (optional) | Total samples per signal. |
39
-
| Base time (optional) | Start time of the recording (`HH:MM:SS`). |
40
-
| Base date (optional) | Start date (`DD/MM/YYYY`). |
| Record name | Identifier for the record (letters, digits, underscores only). |
35
+
| Number of segments (optional) | If present, appended as `/n`. Indicates a multi-segment record. |
36
+
| Number of signals | Number of signals described in the header. |
37
+
| Sampling frequency (optional) | Samples per second per signal. Defaults to 250 if omitted. |
38
+
| Counter frequency (optional) | Secondary clock frequency, separated from sampling frequency by a `/`. |
39
+
| Base counter value (optional) | Offset value for counter, enclosed in parentheses. |
40
+
| Number of samples (optional) | Total samples per signal when `samps_per_frame`=1; total frames otherwise. |
41
+
| Base time (optional) | Start time of the recording (`HH:MM:SS`). |
42
+
| Base date (optional) | Start date (`DD/MM/YYYY`). |
41
43
42
44
**Example:**
43
45
```text
44
-
100 2 360 650000 12:00:00 01/01/2000
46
+
12345 3 62.5 625 30/01/1989
45
47
```
48
+
-`12345`: Record name (must match the filename prefix).
49
+
-`3`: Number of signals in the record.
50
+
-`62.5`: Sampling frequency in Hz.
51
+
-`625`: Total frames for each signal. When `samps_per_frame` = 1 (default), this will be the total samples.
52
+
-`30/01/1989`: The date (`base_date`).
46
53
47
54
---
48
55
@@ -69,9 +76,20 @@ Each signal has its own line immediately following the record line (for single-s
69
76
70
77
**Example:**
71
78
```text
72
-
100.dat 212 200 11 1024 995 0 MLII
73
-
100.dat 212 200 11 1024 995 0 V5
79
+
12345.dat 16x4 200/μV 12 0 0 2178 0 ECG
80
+
12345.dat 16x2 16/mmHg 12 0 0 3497 0 ICP
81
+
12345.dat 16x1 2500/Ohm 12 0 0 1366 0 RESP
74
82
```
83
+
-`12345.dat`: Filename of the signal file.
84
+
-`16`: Storage format (16-bit integers).
85
+
-`x4`,`x2`,`x1`: 4, 2, and 1 samples per frame, respectively. This indicates that the ECG signal has `157 * 4 = 628` samples while the ICP signal has 314 samples and the RESP signal has 157 samples.
86
+
-`200/μV`, `16/mmHg`, `2500/Ohm`: ADC gain (i.e., number of digital values per physical unit).
87
+
-`12`: ADC resolution (bits).
88
+
-`0`: ADC zero value.
89
+
-`0`: Initial value.
90
+
-`2178 `, `3497`, `1366`: Checksum (sum of all signal samples modulo 2^16).
91
+
-`0`: Block size.
92
+
-`ECG`, `ICP`, `RESP`: Signal labels (e.g., lead names).
0 commit comments