Click or drag to resize

PeakFinder_peak_widths Method

Calculate the width of each each peak in a signal.

Namespace: Altaxo.Science.Spectroscopy.PeakSearching
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
protected (double[] , double[] , double[] , double[] , string warnings) _peak_widths(
	double[] x,
	int[] peaks,
	double rel_height,
	double[] prominences,
	int[] left_bases,
	int[] right_bases
)

Parameters

x  Double
A signal with peaks.
peaks  Int32
Indices of peaks in x.
rel_height  Double
Chooses the relative height at which the peak width is measured as a percentage of its prominence.
prominences  Double
Prominences of each peak in `peaks` as returned by _peak_prominences(Double, Int32, Int32).
left_bases  Int32
Left bases of each peak in `peaks` as returned by _peak_prominences(Double, Int32, Int32).
right_bases  Int32
Right bases of each peak in `peaks` as returned by _peak_prominences(Double, Int32, Int32).

Return Value

ValueTupleDouble, Double, Double, Double, String
Tuple, consisting of widths: The widths for each peak in samples; width_heights : The height of the contour lines at which the `widths` where evaluated; left_ips, right_ips : Interpolated positions of left and right intersection points of a horizontal line at the respective evaluation height.
Exceptions
ExceptionCondition
ArgumentOutOfRangeException rel_height` must be greater than or equal to 0 - rel_height or arrays in `prominence_data` must have the same length as `peaks`
InvalidOperationExceptionprominence data is invalid for peak {peak}
See Also