PeakFinderExecute(IReadOnlyListDouble, NullableDouble, NullableDouble, NullableDouble, NullableDouble, NullableDouble, NullableInt32, Double, NullableDouble) Method |
Find peaks inside a signal based on peak properties.
This function takes a 1-D array and finds all local maxima by simple comparison of neighboring values.
Optionally, a subset of these peaks can be selected by specifying conditions for peak properties.
Namespace: Altaxo.Science.Spectroscopy.PeakSearchingAssembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3448.0 (4.8.3448.0)
Syntaxpublic int[] Execute(
IReadOnlyList<double> x,
double? height = null,
double? threshold = null,
double? distance = null,
double? prominence = null,
double? width = null,
int? wlen = null,
double rel_height = 0,5,
double? plateau_size = null
)
Parameters
- x IReadOnlyListDouble
- A signal with peaks.
- height NullableDouble (Optional)
- Required minimal height of peaks, or .
- threshold NullableDouble (Optional)
-
Required minimal threshold of peaks (the vertical difference between the peak height and its immediate neighboring samples), or .
- distance NullableDouble (Optional)
-
Required minimal horizontal distance (>= 1) in samples between neighboring peaks.
Smaller peaks are removed first until the condition is fulfilled for all remaining peaks.
- prominence NullableDouble (Optional)
-
Required minimal prominence of peaks, or .
Prominence is defined as the smaller of the two differences between the peak height and the heights of the neighboring valleys.
- width NullableDouble (Optional)
- Required minimal width of peaks (in samples), or .
- wlen NullableInt32 (Optional)
-
Window length (in samples) used while calculating peak prominences.
It is only used if prominence or width is specified.
- rel_height Double (Optional)
-
Relative height (as a fraction of prominence) used to calculate peak widths.
It is only used if width is specified.
Default value is 0.5.
- plateau_size NullableDouble (Optional)
- Required minimal plateau size (in samples), or .
Return Value
Int32
Indices of peaks in
x that satisfy all given conditions.
See also the other properties of this class for access to additional results.
Exceptions
See Also