wfdb-python
wfdb-python copied to clipboard
Change rounding method for low-resolution / smooth_frames?
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.)