Skip to content

Commit 196d4d9

Browse files
committed
fix gain=0
1 parent d87355d commit 196d4d9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# Versions should comply with PEP440. For a discussion on single-sourcing
2121
# the version across setup.py and the project code, see
2222
# https://packaging.python.org/en/latest/single_source_version.html
23-
version='1.0.1',
23+
version='1.0.2',
2424

2525
description='The WFDB Python Toolbox',
2626
long_description=long_description,

wfdb/_headers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,9 @@ def read_sig_lines(siglines):
481481
d_sig[field][i] = int(d_sig[field][i])
482482
elif sigfieldspecs[field].allowedtypes is floattypes:
483483
d_sig[field][i] = float(d_sig[field][i])
484-
484+
# Special case: gain of 0 means 200
485+
if field == 'adcgain' and d_sig['adcgain'][i] == 0:
486+
d_sig['adcgain'][i] = 200
485487

486488
return d_sig
487489

0 commit comments

Comments
 (0)