Open kevindlau opened 7 months ago
Should the 2nd condition be <
rather than <=
?
I agree, I think rdann
should be consistent with rdsamp
and I think sampfrom
/sampto
should define a half-open interval.
This would be an API-breaking change, though. I've kind of wanted to change that API in any case, perhaps renaming the args to from
/to
or start
/end
or something, so maybe we should do that at the same time.
When reading the signal with
rdsamp
and the corresponding annotations withrdann
using the samesampto
value results in an IndexError when accessing the signal array it includes an annotation outside the array.In the example below, to read the first 100 entries,
sampto
must be 100. If using the same value for the annotations up to and including 100 are read, rather than stopping at 99 (i.e., the 100th entry in a 0-indexed array).Is this the expected behaviour?
Using: python 3.9.18 with wfdb 4.1.2