View source: R/xrd.peakEstimate.R
xrd.peakEstimate | R Documentation |
Simple peak position estimate, yields largest peak in a 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).
xrd.peakEstimate(TwoTheta, Intensity = NULL)
TwoTheta |
vector of two theta angles from xrd spectrum |
Intensity |
|
4 estimated parameters: background (b0), amplitude (A0), peak position (th0), and half-width (s0)
d = xrd.import(xrd.getSampleFiles('asc'), TRUE)
d = xrd_filter(d, 30,42)
p = xrd.peakEstimate(d)
plot(d); 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.