5.9.1.3. eqcorrscan.utils.findpeaks.find_peaks_dep¶
-
eqcorrscan.utils.findpeaks.
find_peaks_dep
(arr, thresh, trig_int, debug=0, starttime=False, samp_rate=1.0)[source]¶ Determine peaks in an array of data above a certain threshold: depreciated.
Depreciated peak-finding routine, very slow, but accurate. If all else fails this one should work.
Parameters: - arr (numpy.ndarray) – 1-D numpy array is required
- thresh (float) – The threshold below which will be considered noise and peaks will not be found in.
- trig_int (int) – The minimum difference in samples between triggers, if multiple peaks within this window this code will find the highest.
- starttime (obspy.core.utcdatetime.UTCDateTime) – Starttime for plotting, only used if debug > 2.
- samp_rate (float) – Sampling rate in Hz, only used for plotting if debug > 2.
Returns: peaks: Lists of tuples of peak values and locations.
Return type: list
>>> import numpy as np >>> arr = np.random.randn(100) >>> threshold = 10 >>> arr[40] = 20 >>> arr[60] = 100 >>> find_peaks_dep(arr, threshold, 3) [(20.0, 40), (100.0, 60)]