11#!/usr/bin/env python
22# -*- coding: utf-8 -*-
33
4+
45class ScpRecord :
56 """Container for all SCP sections"""
67 def __init__ (self ):
@@ -50,8 +51,6 @@ class Section():
5051 def __init__ (self , scpHeader ):
5152 self .h = scpHeader
5253
53- # 16
54-
5554
5655class SectionHeader :
5756 """A section header for each section"""
@@ -100,13 +99,8 @@ def pointer_for_section(self, section_id):
10099 return None
101100
102101
103-
104-
105- # in section3
106-
107-
108102class LeadIdentification :
109- """LeadIdenticitation with information about sample count"""
103+ """LeadIdenticitation with information about sample count (Section 3) """
110104 def __init__ (self ):
111105 self .startsample = 0
112106 self .endsample = 0
@@ -120,8 +114,6 @@ def sample_count(self):
120114 return self .endsample - self .startsample + 1
121115
122116
123-
124-
125117class DataSamples :
126118 """
127119 Data samples for a lead, for Sections 5 (ref. beat samples) and Section 6 (samples)
@@ -139,12 +131,14 @@ def __init__(self, header, pointer):
139131 self .tags = []
140132 self .datalen = 0
141133
134+
142135class Section2 (Section ):
143136 """Section 2 - Huffman tables used in encoding of Ecg data"""
144137 def __init__ (self , header , pointer ):
145138 super ().__init__ (header )
146139 self .p = pointer
147-
140+
141+
148142class Section3 (Section ):
149143 """Section 3 - ECG Leads definition"""
150144 def __init__ (self , header , pointer ):
@@ -164,7 +158,8 @@ class Section4(Section):
164158 def __init__ (self , header , pointer ):
165159 super ().__init__ (header )
166160 self .p = pointer
167-
161+
162+
168163class Section5 (Section ):
169164 """Section 5 with samples"""
170165 def __init__ (self , header , pointer ):
@@ -218,26 +213,30 @@ def __init__(self, header, pointer):
218213 super ().__init__ (header )
219214 self .p = pointer
220215
216+
221217class Section9 (Section ):
222218 """Section 9 - Manufacturer Specific diagnostic and overreading data"""
223219 def __init__ (self , header , pointer ):
224220 super ().__init__ (header )
225221 self .p = pointer
226222
223+
227224class Section10 (Section ):
228225 """Section 10 - per Lead ECG Measurements"""
229226 def __init__ (self , header , pointer ):
230227 super ().__init__ (header )
231228 self .p = pointer
232229
230+
233231class Section11 (Section ):
234232 """Section 11 - Universal Statement Codes resulting from the interpretation"""
235233 def __init__ (self , header , pointer ):
236234 super ().__init__ (header )
237235 self .p = pointer
238236
237+
239238class Section12 (Section ):
240239 """Section 12 - Long-Term ECG Rythm data"""
241240 def __init__ (self , header , pointer ):
242241 super ().__init__ (header )
243- self .p = pointer
242+ self .p = pointer
0 commit comments