@@ -376,9 +376,9 @@ def wrheaderfile(self, writefields):
376
376
[
377
377
"(?P<filename>[\w]*\.?[\w]*~?)[ \t ]+(?P<fmt>\d+)x?"
378
378
"(?P<sampsperframe>\d*):?(?P<skew>\d*)\+?(?P<byteoffset>\d*)[ \t ]*" ,
379
- "(?P<adcgain>-?\d*\.?\d*e?[\+-]?\d*)\(?(?P<baseline>-?\d*)\)?/?(?P<units>[\w\^/-]*)[ \t ]*" ,
379
+ "(?P<adcgain>-?\d*\.?\d*e?[\+-]?\d*)\(?(?P<baseline>-?\d*)\)?/?(?P<units>[\w\^/-\?% ]*)[ \t ]*" ,
380
380
"(?P<adcres>\d*)[ \t ]*(?P<adczero>-?\d*)[ \t ]*(?P<initvalue>-?\d*)[ \t ]*" ,
381
- "(?P<checksum>-?\d*)[ \t ]*(?P<blocksize>\d*)[ \t ]*(?P<signame>[\S]*)" ]))
381
+ "(?P<checksum>-?\d*)[ \t ]*(?P<blocksize>\d*)[ \t ]*(?P<signame>[\S]?[^ \t \n \r \f \v ] *)" ]))
382
382
383
383
# Segment Line Fields
384
384
rxSEGMENT = re .compile ('(?P<segname>\w*~?)[ \t ]+(?P<seglen>\d+)' )
@@ -585,12 +585,14 @@ def __init__(self, allowedtypes, delimiter, dependency, write_req, read_def, wri
585
585
# For storing WFDB Signal definitions.
586
586
587
587
# SignalType class with all its parameters
588
- class SignalType ():
588
+ class SignalType (object ):
589
589
def __init__ (self , description , measurement = None , default_display = None , signalnames = None ):
590
590
self .description = description
591
591
self .unitscale = unitscale
592
+
592
593
# Tuple pair (a, b). The plot displays range a, of unit b.
593
- self .default_display = default_display
594
+ #self.default_display = default_display
595
+
594
596
self .signalnames = signalnames
595
597
596
598
unitscale = {
@@ -601,7 +603,7 @@ def __init__(self, description, measurement=None, default_display=None, signalna
601
603
602
604
# All signal types
603
605
signaltypes = {
604
- 'BP' : SignalType ('Blood Pressure' , 'Pressure' ),
606
+ 'BP' : SignalType ('Blood Pressure' , 'Pressure' , None , [] ),
605
607
'CO2' : SignalType ('Carbon Dioxide' ),
606
608
'CO' : SignalType ('Carbon Monoxide' ),
607
609
'ECG' : SignalType ('Electrocardiogram' ),
0 commit comments