Skip to content

Commit dc4b1a1

Browse files
committed
Merge branch 'master' into docker
2 parents 802ef2d + 8d62f0b commit dc4b1a1

File tree

3 files changed

+24
-27
lines changed

3 files changed

+24
-27
lines changed

.gitattributes

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
* text=auto
1+
* text=auto
22

33
# batch files
44

5-
*.sh text eol=lf
6-
*.bat text eol=crlf
5+
*.sh text eol=lf
6+
*.bat text eol=crlf
77

88
# sensible defaults taken from https://github.com/alexkaratarakis/gitattributes
99

1010
# Documents
1111

12-
*.md text
13-
*.adoc text
14-
*.csv text
12+
*.md text
13+
*.adoc text
14+
*.csv text
1515
*.py text
1616
Makefile text eol=lf
1717
Dockerfile text eol=lf
1818

1919
# Graphics
2020

21-
*.png binary
22-
*.jpg binary
23-
*.jpeg binary
24-
*.gif binary
21+
*.png binary
22+
*.jpg binary
23+
*.jpeg binary
24+
*.gif binary
2525

2626
# Program files / Libraries
2727

28-
*.json text
29-
*.properties text
30-
*.tld text
31-
*.txt text
32-
*.xml text
28+
*.json text
29+
*.properties text
30+
*.tld text
31+
*.txt text
32+
*.xml text
3333

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ optional arguments:
3333

3434
# Docker
3535

36-
There is a python based Docker image `gitrust/scpinfo` to run scpinfo.
36+
There is a python based Docker image [gitrust/scpinfo](https://hub.docker.com/r/gitrust/scpinfo) to run scpinfo.
3737

3838
Run examples
3939

scp.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33

4+
45
class 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

5655
class 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-
108102
class 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-
125117
class 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+
142135
class 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+
245239
class 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+
251246
class 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+
257253
class 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+
263260
class 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

Comments
 (0)