fracspy.detection.stacking.detect_peaks#
- fracspy.detection.stacking.detect_peaks(msf, slf, slt)[source]#
Detect peaks in the maximum stack function based on STA/LTA function.
Detect local maxima in the time-dependent maximum stack function (MSF) based on the analysis of STA/LTA function (SLF) and an STA/LTA thereshold (SLT).
- Parameters:
- msf
numpy.ndarray
Time-dependent maximum stack function of shape (nt,)
- slf
numpy.ndarray
Time-dependent STA/LTA function of shape (nt,)
- slt
float
STA/LTA threshold, must be non-negative
- msf
- Returns:
- idp
numpy.ndarray
Integer array of time indices of determined peaks
- idp
- Raises:
- ValueError
if slt is negative
Notes
The SLF is compared to the SLT. If all values of the SLF are below the SLT, the array of time indices of determined peaks (idp) is set to be empty. Otherwise, there will be one or more regions where SLf exceeds SLT. For each of these regions, sequentially, the algorithm finds an index of the maximum value of the MSF and saves it the idp.