Click or drag to resize

PeakFinderCWTExecute Method

Find peaks in a 1-D array with wavelet transformation. The general approach is to smooth `vector` by convolving it with wavelet(width) for each width in widths. Relative maxima which appear at enough length scales, and with sufficiently high SNR, are accepted.

Namespace: Altaxo.Science.Spectroscopy.PeakSearching
Assembly: AltaxoCore (in AltaxoCore.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax
C#
public static (List<RidgeLine> RidgeLines, double[,] ) Execute(
	double[] vector,
	IEnumerable<double> widths,
	Func<double, double, double> wavelet = null,
	Func<int, int>? max_distances = null,
	double? gap_thresh = null
)

Parameters

vector  Double
1-D array in which to find the peaks.
widths  IEnumerableDouble
Enumeration of widths to use for calculating the CWT matrix. In general, this range should cover the expected width of peaks of interest.
wavelet  FuncDouble, Double, Double  (Optional)
Should take two parameters and return a 1-D array to convolve with `vector`. The first parameter determines the number of points of the returned wavelet array, the second parameter is the scale (`width`) of the wavelet.Should be normalized and symmetric. Default is the ricker wavelet.
max_distances  FuncInt32, Int32  (Optional)
At each row, a ridge line is only connected if the relative max at row[n] is within ``max_distances[n]`` from the relative max at ``row[n + 1]``. Default value is ``widths/4``.
gap_thresh  NullableDouble  (Optional)
If a relative maximum is not found within `max_distances`, there will be a gap.A ridge line is discontinued if there are more than `gap_thresh` points without connecting a new relative maximum. Default is the first value of the widths array i.e.widths[0].

Return Value

ValueTupleListRidgeLine, Double
A tuple: all ridge lines that were found, and the matrix of Cwt coefficients. The list of ridge lines is not sorted. Use a filter function (e.g. FilterRidgeLines(IROMatrixDouble, ListRidgeLine, NullableInt32, NullableInt32, Double, Double)) in order to filter out the not essential lines.
See Also