xrd.peakEstimate: Estimate Highest Peak in Selected Data Set

View source: R/xrd.peakEstimate.R

xrd.peakEstimateR Documentation

Estimate Highest Peak in Selected Data Set

Description

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.

Usage

xrd.peakEstimate(twoTheta, I, verbose = FALSE)

Arguments

twoTheta

XRD 2q angle

I

intensity

verbose

logical, if TRUE, prints a graph of the data and fit

Value

4 estimated parameters: background (b0), amplitude (A0), peakposition (th0), and half-width (s0)

Examples

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


thomasgredig/rigakuXRD documentation built on Feb. 3, 2024, 10:49 p.m.