bkg: Fit a background to XRPD data

Description Usage Arguments Details Value Examples

View source: R/bkg.R

Description

bkg fits a background to X-Ray Powder Diffraction data

Usage

1
bkg(xrd, lambda, hwi, it, int)

Arguments

xrd

an xy data frame of the data to fit a background to. First column is the 2theta scale, second column is count intensities

lambda

second derivative penalty for primary smoothing. Default = 0.5.

hwi

Half width of local windows. Default = 25.

it

Number of iterations in suppression loop. Default = 50.

int

Number of buckets to divide the data into. Default = round(nrow(xrd)/4).

Details

A wrapper for the baseline.fillPeaks in the baseline package.

Value

a list of 3 vectors

tth

The 2theta axis of the measurement

counts

The count intensities of the measurement

background

The fitted background

Examples

1
2
data(soils)
fit_bkg <- bkg(soils$granite)

benmbutler/powdR documentation built on Sept. 16, 2020, 5:03 a.m.