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
find_peaks returns peak indexes relative to the beginning of input array, in your case y[i:], so to get peak indexes of the original array, you have to add the index of starting point, namely i. So, correct line must be: 94: locs = find_peaks(y[i:])[0] + i
otherwise the next line returns incorrect pks values
OR: 95: pks = y[i:][locs]
By the way, you can get peak values directly from find_peaks by transferring to it height= parameter
The text was updated successfully, but these errors were encountered:
find_peaks returns peak indexes relative to the beginning of input array, in your case
y[i:]
, so to get peak indexes of the original array, you have to add the index of starting point, namelyi
. So, correct line must be:94: locs = find_peaks(y[i:])[0] + i
otherwise the next line returns incorrect
pks
valuesOR:
95: pks = y[i:][locs]
By the way, you can get peak values directly from find_peaks by transferring to it
height=
parameterThe text was updated successfully, but these errors were encountered: