|
1 |
| -import numpy as np |
2 | 1 | import re
|
| 2 | + |
| 3 | +import numpy as np |
| 4 | + |
3 | 5 | import wfdb
|
4 | 6 |
|
5 | 7 | class test_annotation():
|
| 8 | + """ |
| 9 | + Testing read and write of wfdb annotations, including Physionet |
| 10 | + streaming. |
6 | 11 |
|
7 |
| - # Test 1 - Annotation file 100.atr |
8 |
| - # Target file created with: rdann -r sample-data/100 -a atr > ann-1 |
9 |
| - def test_1(self): |
| 12 | + Target files created using the original WFDB Software Package |
| 13 | + version 10.5.24 |
| 14 | + """ |
10 | 15 |
|
11 |
| - # Read data using WFDB python package |
| 16 | + def test_1(self): |
| 17 | + """ |
| 18 | + Target file created with: |
| 19 | + rdann -r sample-data/100 -a atr > ann-1 |
| 20 | + """ |
12 | 21 | annotation = wfdb.rdann('sample-data/100', 'atr')
|
13 | 22 |
|
14 | 23 |
|
@@ -66,11 +75,13 @@ def test_1(self):
|
66 | 75 | assert annotation.__eq__(pbannotation)
|
67 | 76 | assert annotation.__eq__(writeannotation)
|
68 | 77 |
|
69 |
| - # Test 2 - Annotation file 12726.anI with many aux_note strings. |
70 |
| - # Target file created with: rdann -r sample-data/100 -a atr > ann-2 |
71 | 78 | def test_2(self):
|
| 79 | + """ |
| 80 | + Annotation file with many aux_note strings. |
72 | 81 |
|
73 |
| - # Read data from WFDB python package |
| 82 | + Target file created with: |
| 83 | + rdann -r sample-data/100 -a atr > ann-2 |
| 84 | + """ |
74 | 85 | annotation = wfdb.rdann('sample-data/12726', 'anI')
|
75 | 86 |
|
76 | 87 | # Target data from WFDB software package
|
@@ -118,11 +129,13 @@ def test_2(self):
|
118 | 129 | assert annotation.__eq__(pbannotation)
|
119 | 130 | assert annotation.__eq__(writeannotation)
|
120 | 131 |
|
121 |
| - # Test 3 - Annotation file 1003.atr with custom annotation types |
122 |
| - # Target file created with: rdann -r sample-data/1003 -a atr > ann-3 |
123 | 132 | def test_3(self):
|
| 133 | + """ |
| 134 | + Annotation file with custom annotation types |
124 | 135 |
|
125 |
| - # Read data using WFDB python package |
| 136 | + Target file created with: |
| 137 | + rdann -r sample-data/1003 -a atr > ann-3 |
| 138 | + """ |
126 | 139 | annotation = wfdb.rdann('sample-data/1003', 'atr')
|
127 | 140 |
|
128 | 141 | # Target data from WFDB software package
|
|
0 commit comments