wfdb-python
wfdb-python copied to clipboard
Better representation of segments in multi-segment records
The current implementation is rather fragile and hard to generalize at times. In particular:
- The
segments
attribute is a list ofRecord
orNone
objects. Perhaps empty records could be represented with an empty-represented Record object instead. One cannot tell the segment length from the None object. - For variable-layout records, the layout record is read into the first segment. Maybe there should be a way to abstract away the layout record so that applications do not need to know about fixed vs variable layout records.