-
Notifications
You must be signed in to change notification settings - Fork 1
Home
arunkishore edited this page Mar 9, 2017
·
1 revision
import numpy as np vector = [ 0, 6, 25, 20, 15, 8, 15, 6, 0, 6, 0, -5, -15, -3, 4, 10, 8, 13, 8, 10, 3, 1, 20, 7, 3, 0 ] import scipy.signal print('Detect peaks without any filters.') indexes = scipy.signal.find_peaks_cwt(vector, np.arange(1, 4), max_distances=np.arange(1, 4)*2) indexes = np.array(indexes) - 1 print('Peaks are: %s' % (indexes))