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,6 +131,7 @@ 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 ):
@@ -242,26 +235,30 @@ def __init__(self, header, pointer):
242235 super ().__init__ (header )
243236 self .p = pointer
244237
238+
245239class Section9 (Section ):
246240 """Section 9 - Manufacturer Specific diagnostic and overreading data"""
247241 def __init__ (self , header , pointer ):
248242 super ().__init__ (header )
249243 self .p = pointer
250244
245+
251246class Section10 (Section ):
252247 """Section 10 - per Lead ECG Measurements"""
253248 def __init__ (self , header , pointer ):
254249 super ().__init__ (header )
255250 self .p = pointer
256251
252+
257253class Section11 (Section ):
258254 """Section 11 - Universal Statement Codes resulting from the interpretation"""
259255 def __init__ (self , header , pointer ):
260256 super ().__init__ (header )
261257 self .p = pointer
262258
259+
263260class Section12 (Section ):
264261 """Section 12 - Long-Term ECG Rythm data"""
265262 def __init__ (self , header , pointer ):
266263 super ().__init__ (header )
267- self .p = pointer
264+ self .p = pointer
0 commit comments