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 powdRbkg object consisting of of 3 vectors

tth

The 2theta axis of the measurement

counts

The count intensities of the measurement

background

The count intensities of the fitted background

Examples

1
2
3
4
5
6
data(soils)
## Not run: 
fit_bkg <- bkg(soils$granite)
plot(bkg)

## End(Not run)

powdR documentation built on Aug. 13, 2021, 5:08 p.m.