An simple algorithm to detect local maxima. Tuning parameters are:
- the savgol filter parameters with respect to data size
- n: the size of searching area
- num_of_maxima: total number of local maxima in descending order.
The included datasets are taken from X-ray Powder Diffraction Analysis.