xrd.peakEstimate: Estimate highest peak in selected spectrum

View source: R/xrd.peakEstimate.R

xrd.peakEstimateR Documentation

Estimate highest peak in selected spectrum

Description

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).

Usage

xrd.peakEstimate(TwoTheta, Intensity = NULL)

Arguments

TwoTheta

vector of two theta angles from xrd spectrum

Intensity

NULL if xrd S3 object, otherwise xrd intensity vector

Value

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

Examples

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


thomasgredig/rigakuXRD documentation built on Nov. 7, 2024, 12:04 a.m.