Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

20 lines (18 sloc) 447 Bytes
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
from vector import vector, plot_peaks
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))
plot_peaks(
np.array(vector),
np.array(indexes),
algorithm='scipy.signal.find_peaks_cwt'
)
You can’t perform that action at this time.