View source: R/xrd.find.Peak.R
xrd.find.Peak | R Documentation |
Fits a Gaussian form to a peak
xrd.find.Peak(
TwoTheta,
Intensity = NULL,
peakPos = NA,
Try.Sigma = c(0.1, 0.4, 0.2, 0.15),
thetaDelta = 5
)
TwoTheta |
vector of two theta angles from xrd spectrum. |
Intensity |
|
peakPos |
approximate angle (2Theta) of peak position. |
Try.Sigma |
vector with peak widths used to start fitting. |
thetaDelta |
approximate width of angle to search peak. |
peak position angle obtained from fit
filename = xrd.getSampleFiles(fileExt='asc')
d = xrd.import(filename)
peak.pos = xrd.find.Peak(d$TwoTheta, d$I, 38.2)
plot(d$TwoTheta,d$I,log='y',col='red')
abline(v=peak.pos,col='blue')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.