PeakFinderExecute(IReadOnlyListDouble, Object, Object, NullableDouble, Object, Object, NullableInt32, Double, Object) 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,
Object? height = null,
Object? threshold = null,
double? distance = null,
Object? prominence = null,
Object? width = null,
int? wlen = null,
double rel_height = 0,5,
Object? plateau_size = null
)
Parameters
- x IReadOnlyListDouble
- A signal with peaks.
- height Object (Optional)
-
Required height of peaks.
Either a number, , an array matching x, or a 2-element tuple of the former.
The first element is interpreted as the minimal and the second (if supplied) as the maximal required height.
- threshold Object (Optional)
-
Required threshold of peaks (the vertical distance to neighboring samples).
Either a number, , an array matching x, or a 2-element tuple of the former.
The first element is interpreted as the minimal and the second (if supplied) as the maximal required threshold.
- 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 Object (Optional)
-
Required prominence of peaks.
Either a number, , an array matching x, or a 2-element tuple of the former.
The first element is interpreted as the minimal and the second (if supplied) as the maximal required prominence.
- width Object (Optional)
-
Required width of peaks (in samples).
Either a number, , an array matching x, or a 2-element tuple of the former.
The first element is interpreted as the minimal and the second (if supplied) as the maximal required width.
- 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 Object (Optional)
-
Required size of the flat top of peaks (in samples).
Either a number, , an array matching x, or a 2-element tuple of the former.
The first element is interpreted as the minimal and the second (if supplied) as the maximal required plateau size.
Return Value
Int32
Indices of peaks in
x that satisfy all conditions.
See also the other properties of this class for access to additional results.
Note that most of the properties are only set if the corresponding parameter was specified.
Exceptions
See Also