MIT-LCP / MIT-LCP/wfdb-python

Change rounding method for low-resolution / smooth_frames?

Open
#335 0 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

The method used by WFDB to downsample signals in "low-resolution mode" is inaccurate (samples are rounded towards zero rather than to the nearest integer.) I'm intending to improve this by using a more accurate method in WFDB 10.7:

https://github.com/bemoody/wfdb/commit/bbfecc133932ae61f3c32491fe4679067b75c9ec

The method used by WFDB 10.6 and earlier is (as far as I know) equivalent to what rdrecord currently does by default (i.e. with smooth_frames=True).

I'm looking for opinions here. Should we make the same change in wfdb-python for the sake of better accuracy? Should we keep the existing inaccurate rounding for the sake of backward reproducibility?

(Implementing this change efficiently with numpy might be a little difficult, but let's ignore that for now.)

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 at the rdrecord path used when smooth_frames=True and compare its rounding behavior with the linked WFDB 10.7 commit. Before changing anything, resolve whether accuracy or backward reproducibility is the priority, then evaluate an efficient NumPy approach and define the expected low-resolution results.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.