Description Usage Arguments Value Author(s) See Also Examples
Plot the the estimation of peak returned by widthEstimationCWT
1 | plotwidthEstimation(x,peakWidth)
|
x |
raman spectrum |
peakWidth |
returned by |
Whether the drawing is successful or not.
Yizeng Liang ,Zhang Zhimin
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | x=c(40*dnorm(seq(-5,5,by=0.1),sd=0.2),60*dnorm(seq(-5,5,by=0.1),sd=0.5),30*dnorm(seq(-5,5,by=0.1),sd=0.7),100*rep(0.001,100))
x=x+40*rnorm(length(x))*0.01
b=1:length(x)
yc=30*sin(1:length(x)/100)
yl=30*(1:length(x)/100)
xl=x+yl
xc=x+yc
x=xc
scales <-seq(1, 30, 1)
wCoefs <- cwt(x, scales=scales, wavelet='mexh')
image(1:nrow(wCoefs), scales, wCoefs, col=terrain.colors(256), axes=FALSE, xlab='index', ylab='CWT coefficient scale', main='CWT coefficients')
box()
localMax <- getLocalMaximumCWT(wCoefs)
ridgeList <- getRidge(localMax, gapTh=3, skip=2)
majorPeakInfo=identifyMajorPeaks(x, ridgeList, wCoefs,SNR.Th=3,ridgeLength=5)
peakWidth=widthEstimationCWT(x,majorPeakInfo)
plot(xc,type='l', main="pure signal with curved background and random noise",xlab=expression("Wavenumber / cm"^-1),ylab="Raman Intensity")
plotwidthEstimation(x,peakWidth)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.