Index out of bounds in PTB Diagnostic ECG Database and few questions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 82
- Forks
- 21
- Avg merge
- 35m
- Merged PRs (30d)
- 1
Description
Hello,
I tried to get annotations by python-WFDB from PTB database, there occurred the same error in many records:

The same index error also occurred in Matlab-WFDB:

Then I tried to get annotations in Linux shell with command: ' rdann -r 's0440_re' -a 'xyz' '
Here are outputs:

but the .hea file indicates that the length is 120012, which is about 2 minutes.
Why does the 'rdann' output 8 minutes?

In some records, like 'patient271/s0509_re', why does the total length of the record is 120012, but the 'sample' attribute from range from 217 to 57077320?

Thank you very much in advance.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source files or tests are named. Start by reproducing the Python-WFDB, Matlab-WFDB, and rdann -r 's0440_re' -a 'xyz' cases, then compare the .hea record length with the reported annotation samples; done means the index errors and length discrepancies are explained and the affected behavior is corrected or documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- matlab, python
- Domain
- cli, data
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100