MIT-LCP / MIT-LCP/wfdb-python

rdsamp and wrsamp not isopmorphic

Open
#484 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
853
Forks
322
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the rdsamp and wrsamp API documentation and reproduce the reported round-trip behavior using the corresponding read and write calls. Trace the relevant implementation and existing tests to determine whether the limitation can be removed; otherwise, document the required arguments and a working example.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, documentation
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.