Closed mexomagno closed 7 years ago
Hi @mexomagno
Unfortunately there's not much I can do from my end...
That probably happens because the Hamilton algorithm uses the first 8 seconds of data to estimate a threshold.
My suggestion would be to try to use a different segmentation algorithm (SSF or Christov, also in the ecg
module), or to break the clean ECG data out from the noise.
Thanks for the quick response, @capcarr
Well, that explains a lot of what's happening. Currently Gamboa's approach seems to do the job for now.
I'm closing the issue. Cheers!
Hi!
We're having some trouble with R-peak detection. We've been using ecg.ecg() with some captures, and observed that every time the capture starts with noisy enough data, it will fail to find R peaks, regardless of what comes after the noisy part. This means that if a capture begins very noisy but later has a perfect ECG for a long time, ecg.ecg() will still never be able to find not a single R peak (at least that's what we can observe)
Example:
Capture 1) Good, clean samples. R peaks found correctly.![Good, clean samples](https://user-images.githubusercontent.com/6372150/28086451-070d0946-664d-11e7-9684-ca4dc066e58a.png)
Capture 2) Bad, somehow noisy samples. No R peaks found. (plotted directly with matplotlib)![Somehow noisy samples](https://user-images.githubusercontent.com/6372150/28086449-06f33b1a-664d-11e7-8c21-41beb4562672.png)
Noisy start, clean continuation. No R peaks found. (plotted directly with matplotlib) This is capture 1) followed by capture 2).![Starts noisy, continues clean](https://user-images.githubusercontent.com/6372150/28086450-06fa7312-664d-11e7-8570-f3d4f4d56f20.png)
Is this behavior expected? What can be done to detect the R peaks of the clean part? Should we be the ones handling this?
Many thanks in advance!