@@ -441,7 +441,6 @@ def read_rec_line(recline):
441
441
442
442
# Extract fields from signal line strings into a dictionary
443
443
def read_sig_lines (siglines ):
444
-
445
444
# Dictionary for signal fields
446
445
d_sig = {}
447
446
@@ -471,6 +470,7 @@ def read_sig_lines(siglines):
471
470
# that different channels can be present or missing.
472
471
if d_sig [field ][i ] == '' :
473
472
d_sig [field ][i ] = sigfieldspecs [field ].read_def
473
+
474
474
# Special case: missing baseline defaults to ADCzero if present
475
475
if field == 'baseline' and d_sig ['adczero' ][i ] != '' :
476
476
d_sig ['baseline' ][i ] = int (d_sig ['adczero' ][i ])
@@ -482,7 +482,7 @@ def read_sig_lines(siglines):
482
482
d_sig [field ][i ] = float (d_sig [field ][i ])
483
483
# Special case: gain of 0 means 200
484
484
if field == 'adcgain' and d_sig ['adcgain' ][i ] == 0 :
485
- d_sig ['adcgain' ][i ] = 200
485
+ d_sig ['adcgain' ][i ] = 200.
486
486
487
487
return d_sig
488
488
@@ -566,7 +566,7 @@ def __init__(self, allowedtypes, delimiter, dependency, write_req, read_def, wri
566
566
('sampsperframe' , WFDBheaderspecs (inttypes , 'x' , 'fmt' , False , None , None )),
567
567
('skew' , WFDBheaderspecs (inttypes , ':' , 'fmt' , False , None , None )),
568
568
('byteoffset' , WFDBheaderspecs (inttypes , '+' , 'fmt' , False , None , None )),
569
- ('adcgain' , WFDBheaderspecs (floattypes , ' ' , 'fmt' , True , 200 , None )),
569
+ ('adcgain' , WFDBheaderspecs (floattypes , ' ' , 'fmt' , True , 200. , None )),
570
570
('baseline' , WFDBheaderspecs (inttypes , '(' , 'adcgain' , True , 0 , None )),
571
571
('units' , WFDBheaderspecs ([str ], '/' , 'adcgain' , True , 'mV' , None )),
572
572
('adcres' , WFDBheaderspecs (inttypes , ' ' , 'adcgain' , False , None , 0 )),
0 commit comments