Skip to content
This repository was archived by the owner on Jun 14, 2018. It is now read-only.

Commit d015b48

Browse files
committed
modified wrsamp and dependencies/helpers to work for expanded signals
1 parent fd02efd commit d015b48

File tree

4 files changed

+306
-129
lines changed

4 files changed

+306
-129
lines changed

wfdb/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from .records import Record, MultiRecord, rdheader, rdsamp, srdsamp, wrsamp, dldatabase, dldatabasefiles
2+
from ._signals import estres
23
from .annotations import Annotation, rdann, wrann, showanncodes
34
from .plots import plotrec, plotann
45
from .downloads import getdblist

wfdb/_headers.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -87,15 +87,16 @@ def getwritesubset(self, specfields):
8787
# To be inherited by WFDBrecord from records.py.
8888
class HeadersMixin(BaseHeadersMixin):
8989

90-
# Set defaults for fields needed to write the header if they have defaults.
91-
# This is NOT called by rdheader. It is only called by the gateway wrsamp for convenience.
92-
# It is also not called by wrhea (this may be changed in the future) since
93-
# it is supposed to be an explicit function.
94-
95-
# Not responsible for initializing the
96-
# attribute. That is done by the constructor.
9790
def setdefaults(self):
98-
91+
"""
92+
Set defaults for fields needed to write the header if they have defaults.
93+
This is NOT called by rdheader. It is only automatically called by the gateway wrsamp for convenience.
94+
It is also not called by wrhea (this may be changed in the future) since
95+
it is supposed to be an explicit function.
96+
97+
Not responsible for initializing the
98+
attributes. That is done by the constructor.
99+
"""
99100
rfields, sfields = self.getwritefields()
100101
for f in rfields:
101102
self.setdefault(f)
@@ -125,7 +126,7 @@ def wrheader(self):
125126
self.wrheaderfile(recwritefields, sigwritefields)
126127

127128

128-
# Get the list of fields used to write the header. (Does NOT include d_signals.)
129+
# Get the list of fields used to write the header. (Does NOT include d_signals or e_d_signals.)
129130
# Separate items by record and signal specification field.
130131
# Returns the default required fields, the user defined fields, and their dependencies.
131132
# recwritefields includes 'comment' if present.

0 commit comments

Comments
 (0)