You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In ecg_quality() with method averageQRS, the result is expected to be an array between 0 and 1. However, since after rescaling the signal is interpolated with a quadratic method, this property no longer holds.
This can be easily solved by either choosing a linear interpolation method or clipping the result afterwards.
To Reproduce ecg = nk.ecg_simulate(duration=10, heart_rate=70, random_state=0) print(nk.ecg_quality(ecg).min(), nk.ecg_quality(ecg).max())
Expected behaviour
an array between 0 and 1
The text was updated successfully, but these errors were encountered:
That's a good point. I think we could use the same monotonic interpolation that we use for heart rate; or indeed, linear, which probably makes even more sense. Could you consider making a PR to implement the change?
Describe the bug
In
ecg_quality()
with method averageQRS, the result is expected to be an array between 0 and 1. However, since after rescaling the signal is interpolated with a quadratic method, this property no longer holds.This can be easily solved by either choosing a linear interpolation method or clipping the result afterwards.
To Reproduce
ecg = nk.ecg_simulate(duration=10, heart_rate=70, random_state=0)
print(nk.ecg_quality(ecg).min(), nk.ecg_quality(ecg).max())
Expected behaviour
an array between 0 and 1
The text was updated successfully, but these errors were encountered: