PeakFinderExecute(Double, 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 a peak's properties.
Namespace: Altaxo.Science.Spectroscopy.PeakSearchingAssembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax public int[] Execute(
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 Double
- A signal with peaks.
- height NullableDouble (Optional)
- Required height of peaks. Either a number or null. The value is
always interpreted as the minimal required height.
- threshold NullableDouble (Optional)
- Required threshold of peaks, the vertical distance to its neighboring
samples. Either a number or null. The value element is always
interpreted as the minimal
required threshold.
- distance NullableDouble (Optional)
- Required minimal horizontal distance (>= 1) in samples between
neighbouring peaks. Smaller peaks are removed first until the condition
is fulfilled for all remaining peaks.
- prominence NullableDouble (Optional)
- Required prominence of peaks. Either a number or null. The
value is always interpreted as the minimal required prominence.
- width NullableDouble (Optional)
- Required width of peaks in samples. Either a number or null. The value
is always interpreted as the minimal required width.
- wlen NullableInt32 (Optional)
- Used for calculation of the peaks prominences, thus it is only used if
one of the arguments prominence or width is given. See argument
wlen in `peak_prominences` for a full description of its effects.
- rel_height Double (Optional)
- Used for calculation of the peaks width, thus it is only used if width
is given. Default value is 0.5. See argument `rel_height` in _peak_widths(Double, Int32, Double, Double, Int32, Int32) for a full
description of its effects.
- plateau_size NullableDouble (Optional)
- Required size of the flat top of peaks in samples. Either a number or null.
The value is always interpreted as the minimal required plateau size.
Return Value
Int32Indices of peaks in `x` that satisfy all given conditions. See also the other properties of this class
for access to more results. Note that most of the properties are only set, if the corresponding parameter is specified in this call.
Exceptions See Also