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

Handle more than 8 compressed signals in wrsamp #450

Merged
merged 1 commit into from
May 11, 2023

Conversation

bemoody
Copy link
Collaborator

@bemoody bemoody commented May 11, 2023

@alistairewj pointed out that there doesn't seem to be an easy way to write a compressed record with more than 8 channels.

It's supposed to be possible to do this:

import numpy, wfdb

wfdb.wrsamp('aaa', fs=1000, units=['mV'] * 12,
            sig_name=[str(i) for i in range(12)],
            p_signal=numpy.random.rand(100, 12),
            fmt=['516'] * 12)

but the logic I introduced in pull #420 is buggy and currently raises an error.

Since the FLAC format has a hard limit of eight channels, we need to
use multiple signal files if a record contains more than eight
signals.

Commit d1d26ba was meant to do this automatically (when
Record.set_default or wfdb.wrsamp is used to generate the signal file
names), but this was never tested.
Copy link
Member

@tompollard tompollard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks benjamin

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