Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrected typo and extended allowed types for MultiSegmentRecord #514

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

agent3gatech
Copy link

Corrected misordered arguments in util.lines_to_file. Added 'list' as allowed types for seg_name and seg_len, for when writing MultiSegmentRecords.

Corrected misordered arguments in util.lines_to_file. Added 'list' as allowed types for seg_name and seg_len, for when writing MultiSegmentRecords.
@bemoody
Copy link
Collaborator

bemoody commented Nov 6, 2024

Thanks!

In case it's not clear, here's an example which doesn't work prior to this change:

>>> import wfdb
>>> r = wfdb.rdheader('3000003', pn_dir='mimic3wdb/1.0/30/3000003')
>>> r.wrheader()

Probably nobody tested this code path, and the logic is hard to follow. This change should fix the immediate problem.

But I think what we really want is, rather than changing the types in SEGMENT_SPECS, we want to add "seg_name" and "seg_len" to LIST_FIELDS (wfdb/io/record.py, line 1675.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants