View source: R/xrd.peakEstimate.R
xrd.peakEstimate | R Documentation |
Simple peak position estimate, yields largest peak only in a particular data set. This is not a fit, just an estimate based on the data at hand. It returns the background (b0), the amplitude (A0), the peak position (th0), and the half-width sigma (s0). In order to learn more, turn on the *verbose* output.
xrd.peakEstimate(twoTheta, I, verbose = FALSE)
twoTheta |
XRD 2q angle |
I |
intensity |
verbose |
logical, if |
4 estimated parameters: background (b0), amplitude (A0), peakposition (th0), and half-width (s0)
d = xrd.import(xrd.getSampleFiles()[1])
d = subset(d, theta > 30 & theta < 42)
p = xrd.peakEstimate(d$theta, d$I)
plot(d$theta, d$I, col='red'); abline(v=p[3], lwd=2)
abline(h=p[1], col='darkgrey')
p
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.