baselinefit {diffractometry}R Documentation

Baseline and peak intervals for diffractometry data

Description

Calculates Taut String and Weighted Smoothing Spline approximations of a diffractogram and identifies the baseline and peak intervals

Usage

baselinefit(data,tau=2.5,gam=1, scl.factor=1.2, maxwdth=5)

Arguments

data A diffractogram given as a matrix, where the first column gives the angles of diffraction in degrees 2theta and the second column gives the corresponding photon counts. Angles of diffraction are taken to be equidistant.
tau Value of Parameter tau used in the residual criterion.
gam Factor which is used in the separation between peaks and baseline.
scl.factor Factor which is used in the heteroscedastic residual criterion.
maxwdth Maximum width of the peaks. By default set to 5 degrees.

Value

Returns a list with components

pmg Output (list) of the taut string procedure fnpreg(). Contains the estimated fit pmg$fn.
spl Output (list) of the weighted smoothing spline procedure wsspoiss(). Contains the estimated fit spl$reg.
baseline Output (list) of the baseline fit procedure basiserg(). Contains the baseline fit baseline$basisl.
npks Number of peaks.
indlsep Left indices of the peak intervals.
indrsep Right indices of the peak intervals.
indextr Indices of the extreme values.
bs Output of the weighted smoothing spline precedure for the data with removed peaks. Contains the baseline for non-peak intervals bs$reg.
pks A vector which contains the data for the peak intervals and zero otherwise.
exb Output (list) of the routine exber.maxwdth() which computes the peak intervals. Contains again indlsep and indrsep.
x x values of the data.
y y values of the data.

Author(s)

M. Meise and P.L. Davies

References

P.L. Davies, U. Gather, M. Meise, D. Mergel, T. Mildenberger (2008): "Residual based localization and quantification of peaks in x-ray diffractograms", to appear in the Annals of Applied Statistics. http://arxiv.org/abs/0711.3687

See Also

diffractogram, pkdecomp

Examples

## baseline fit and peak interval identification for a small segment of the indiumoxide data
## baseline plotted in red and data plotted in peak intervals in blue 

data(indiumoxide)
indox<-indiumoxide[1901:2400,]
plot(indox,xlab="",ylab="")
base<-baselinefit(indox)
lines(indox[,1],base$baseline$basisl,col="red")
points(indox[base$indextr,],col="blue") 


[Package diffractometry version 0.1-00 Index]