Skip to content

Commit 7889664

Browse files
authored
Merge pull request MIT-LCP#282 from MIT-LCP/edf_plus
Adds EDF+C support
2 parents 6e0271c + 330b437 commit 7889664

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

wfdb/io/record.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1519,9 +1519,11 @@ def edf2mit(record_name, pn_dir=None, delete_file=True, record_only=True,
15191519

15201520
# Reserved (44 bytes)
15211521
reserved_notes = struct.unpack('<44s', edf_file.read(44))[0].decode().strip()
1522-
if reserved_notes == 'EDF+C':
1523-
raise Exception('EDF+ File: uninterrupted data records (not currently supported)')
1524-
elif reserved_notes == 'EDF+D':
1522+
if reserved_notes[:5] == 'EDF+C':
1523+
# The file is EDF compatible and will work without issue
1524+
# See: https://www.sciencedirect.com/science/article/pii/S1388245703001238?via%3Dihub
1525+
pass
1526+
elif reserved_notes[:5] == 'EDF+D':
15251527
raise Exception('EDF+ File: interrupted data records (not currently supported)')
15261528
else:
15271529
if verbose:

0 commit comments

Comments
 (0)