berndporr / py-ecg-detectors

Popular ECG QRS detectors written in python
GNU General Public License v3.0
353 stars 82 forks source link

Checking the length of the wrong array on hamilton_detector() #24

Closed purpl3F0x closed 10 months ago

purpl3F0x commented 10 months ago

Here the check should probably be lenght(s_pks) https://github.com/berndporr/py-ecg-detectors/blob/7a1ca569190a4c17885089c97480efd114c64120/ecgdetectors.py#L113

berndporr commented 10 months ago

That's indeed a bug and using deque as suggested over there https://github.com/neuropsychology/NeuroKit/pull/947/commits/b36558803894448cacedc53d23d38b5dfe30fb98 makes sense. The pop commands are super slow indeed.

purpl3F0x commented 10 months ago

I think the issue can be closed now.