
Compute the number of peaks using scikit-maad
Source:R/scikit-maad-indices.R
maad_number_of_peaks.Rd
Count the number of frequency peaks on a mean spectrum. This function was adapted from the function fpeaks of the R package Seewave seewave2008sonicscrewdriver.
Usage
maad_number_of_peaks(
object,
mode = "dB",
min_peak_val = NULL,
min_freq_dist = 200,
slopes = c(1, 1),
prominence = 0,
maad = NULL
)
Arguments
- object
A Wave object or a spectrogram_maad object generated by
maad_spectrogram
. If a Wave-like object is provided, the spectrogram will be calculated using the default parameters.- mode
One of "dB", "linear".
- min_peak_val
Only peaks above this threshold will be considered.
- min_freq_dist
Frequency threshold parameter (in Hz). If the frequency difference of two successive peaks is less than this threshold, then the peak of highest amplitude will be kept only.
- slopes
Refers to the amplitude slopes of the peak. The first value is the left slope and the second value is the right slope. Only peaks with higher slopes than threshold values will be kept.
- prominence
The first element is the minimal prominence and the second element is the maximal prominence. If a single number is provided it is interpreted as the minimal value, and no maximal value will be used.
- maad
An optional maad object. If not provided, one will be created using
getMaad()
.
Details
For addition documentation see https://scikit-maad.github.io/generated/maad.features.number_of_peaks.html