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

rdsamp and wrsamp not isopmorphic #484

Open
greenstick opened this issue Apr 29, 2024 · 1 comment
Open

rdsamp and wrsamp not isopmorphic #484

greenstick opened this issue Apr 29, 2024 · 1 comment

Comments

@greenstick
Copy link

Hi there, this has likely been discussed somewhere at length however I can't seem to find such a discussion and the documentation doesn't appear to cover this key limitation:

In short, if I call wfdb.rdsamp and then use the corresponding wrsamp method, typical programming conventions assume that the two methods should be isomorphic – whatever is read into memory by rdsamp should be sufficient and, by default, produce an identical output when wrsamp is called to process the in-memory object. However, as best as I can tell, this is not the case, which is very counterintuitive and breaks with standard programming conventions.

This key limitation doesn't appear to be covered in the documentation and, at minimum, it would seem it should be. Better yet, an example of what arguments to set to make them isomorphic should be documented. This assumes that the ideal (that they are isomorphic) is not possible, however, for the library UX, this seems something to strive.

I would send a PR myself, however, I'm actively running up against this issue and therefore do not currently have a solution to propose.

@greenstick
Copy link
Author

greenstick commented Jul 2, 2024

Wanted to post a late update to this – ultimately it turned out I was unable to write data using the wfdb.wrsamp method. I'm not too familiar with the wfdb standard and couldn't tell from reading the I/O code whether the method has been fully implemented. If not, it may be good to raise a NotImplementedError exception in the interim. If it has been, there may be a downstream bug in wfdb and I can close this one, run some tests, and open up an issue there.

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

No branches or pull requests

1 participant