xrd.get.PeakStats: Fits a Gaussian function to XRD data

View source: R/xrd.get.PeakStats.R

xrd.get.PeakStatsR Documentation

Fits a Gaussian function to XRD data

Description

Given an XRD peak, a Gaussian fit at the provided location peakPos a Gaussian fit is made to find the exact location, width, and background.

Usage

xrd.get.PeakStats(
  TwoTheta,
  Intensity = NULL,
  peakPos,
  Try.Sigma = c(0.2, 0.1, 0.05, 0.3)
)

Arguments

TwoTheta

vector of two theta angles from xrd spectrum.

Intensity

NULL if xrd S3 object, otherwise xrd intensity vector.

peakPos

approximate 2Theta angle of peak position.

Try.Sigma

vector with peak widths used to start fitting.

Value

background, amplitude, position, width + 4 std. errors from peak fit

Author(s)

Thomas Gredig

Examples

filename = xrd.getSampleFiles(fileExt='asc')
d = xrd.import(filename)
xrd.get.PeakStats(d$TwoTheta, d$I, 38.2)


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