@@ -441,7 +441,6 @@ def read_rec_line(recline):
441441
442442# Extract fields from signal line strings into a dictionary
443443def read_sig_lines (siglines ):
444-
445444 # Dictionary for signal fields
446445 d_sig = {}
447446
@@ -471,6 +470,7 @@ def read_sig_lines(siglines):
471470 # that different channels can be present or missing.
472471 if d_sig [field ][i ] == '' :
473472 d_sig [field ][i ] = sigfieldspecs [field ].read_def
473+
474474 # Special case: missing baseline defaults to ADCzero if present
475475 if field == 'baseline' and d_sig ['adczero' ][i ] != '' :
476476 d_sig ['baseline' ][i ] = int (d_sig ['adczero' ][i ])
@@ -482,7 +482,7 @@ def read_sig_lines(siglines):
482482 d_sig [field ][i ] = float (d_sig [field ][i ])
483483 # Special case: gain of 0 means 200
484484 if field == 'adcgain' and d_sig ['adcgain' ][i ] == 0 :
485- d_sig ['adcgain' ][i ] = 200
485+ d_sig ['adcgain' ][i ] = 200.
486486
487487 return d_sig
488488
@@ -566,7 +566,7 @@ def __init__(self, allowedtypes, delimiter, dependency, write_req, read_def, wri
566566 ('sampsperframe' , WFDBheaderspecs (inttypes , 'x' , 'fmt' , False , None , None )),
567567 ('skew' , WFDBheaderspecs (inttypes , ':' , 'fmt' , False , None , None )),
568568 ('byteoffset' , WFDBheaderspecs (inttypes , '+' , 'fmt' , False , None , None )),
569- ('adcgain' , WFDBheaderspecs (floattypes , ' ' , 'fmt' , True , 200 , None )),
569+ ('adcgain' , WFDBheaderspecs (floattypes , ' ' , 'fmt' , True , 200. , None )),
570570 ('baseline' , WFDBheaderspecs (inttypes , '(' , 'adcgain' , True , 0 , None )),
571571 ('units' , WFDBheaderspecs ([str ], '/' , 'adcgain' , True , 'mV' , None )),
572572 ('adcres' , WFDBheaderspecs (inttypes , ' ' , 'adcgain' , False , None , 0 )),
0 commit comments