View source: R/peak_detection.R
LocalMaximaSG | R Documentation |
Apply Savitzky Golay filter to the spectrum and find local maxima such that : second derivate Savitzky Golay filter < 0 and first derivate = 0 and intensity > minPeakHeight
LocalMaximaSG(sp, minPeakHeight = -Inf, noiseacf = 0.1, d = 3)
sp |
the array of spectrum values |
minPeakHeight |
minimum intensity of a peak |
noiseacf |
autocorrelation of the noise |
d |
the degree of Savitzky Golay filter, defalut 3 |
array with peak's index in the spectrum
spectrum<-dnorm(x=seq(-5,5,length.out = 100))
index.max<-LocalMaximaSG(spectrum)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.