-
Notifications
You must be signed in to change notification settings - Fork 307
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
wrsamp: IndexError: Channel 0 contains values outside the allowed range [-32768, 32767] for fmt 16 #521
Comments
@nickfong are you able to share example data to reproduce the error? (and if possible the code from the example above, as text rather than image). |
Hey @tompollard, Tyler Law shared the reproducible code sample and data with you on 2024-12-04; it's the same thread that you responded to yesterday suggesting we open a GH issue 😃 Let me know if you want me to send to you again via email. We'd like to avoid posting the data here publicly. |
@nickfong the only attachment to the email is the screenshot that you've shared above, but I do now notice a message saying:
Please could you share here instead? |
@nickfong , thanks for privately sharing the CSV of data that allows for reproducing this problem. I haven't looked into it in detail but when I ran your code + data in a new environment I was able to reproduce the error. When I went to my wfdb-python environment I could not reproduce the error with the same code + data. We don't currently support |
Please could you update to the latest version of WFDB (v4.2.0) to see if this issue is addressed? The changelog is at: https://github.com/MIT-LCP/wfdb-python/blob/main/docs/changes.rst |
We're encountering an issue when trying to write data to WFDB files using the wrsamp function. Specifically, we’re seeing an error that prevents us from writing the files correctly. When attempting to call wrsamp to save our data, we receive the following error message:
To investigate the issue further, we modified the WFDB source code to provide additional debugging information. The csv file we’re attempting to convert to wfdb has values ranging between:
But this is being scaled to -32767 and 32772 after calling
wrsamp
, so the max value allowed in fmt 16 is being exceeded.We are using package versions:
We have a minimal reproducible sample that we sent to Ben Moody and Tom Pollard.
The text was updated successfully, but these errors were encountered: