Closed DominiqueMakowski closed 7 years ago
Digging some more I've discovered that the error appears when including the [26150:26250] range. Looking at the data I've found that there was one missing value... I've replaced it by the preceding value as following:
ecg[np.where(np.isnan(ecg))[0]] = ecg[np.where(np.isnan(ecg))[0]-1]
And it works like a charm 😄
Hey @DominiqueMakowski
I've tried to run the same function today and it didn't work out for me as well, but for the bvp module. Would you, by any chance, have any insights as to how I could fix that ? cause i still get the same error by running ppg[np.where(np.isnan(ppg))[0]] = ppg[np.where(np.isnan(ppg))[0]-1]
Hi Mr. @DominiqueMakowski , I still get the error ValueError: Not enough beats to compute heart rate. in signals.ecg.ecg() with ecg_all = ecg.ecg(signal=signals, sampling_rate=128.0, show=False)
Could you please help me with this problem? Thank you!
@anandavalliv I'd personally try using a different peak detection method (see here)
Thank you so much! I will try using this method.
Hey guys,
I got this modified LEAD II ECG signal from which I'd like to extract several features. However, using the
signals.ecg.ecg()
function throws out aValueError: Not enough beats to compute heart rate
. I tried to narrow down the locus of the error and it seems to happen within thehamilton_segmenter()
(which returns 0 peaks)...What is causing this error? Is there a way to fix it?
Thanks!