bkg: Fit a background to XRPD data
Description
bkg
fits a background to X-Ray Powder Diffraction data
Usage
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)
.
Value
a list of 3 vectors
tthThe 2theta axis of the measurement
countsThe count intensities of the measurement
backgroundThe fitted background
Details
A wrapper for the baseline.fillPeaks
in the baseline
package.
Examples
Run this code# NOT RUN {
data(soils)
fit_bkg <- bkg(soils$granite)
# }
Run the code above in your browser using DataLab