do.iter: Estimate the background

Description Usage Arguments Details Value References

View source: R/fits.R

Description

do.iter performs adaptive Bayesian estimation of the background.

Usage

1
2
do.iter(fit.results, local = TRUE, eps = 1e-04, 
        n.iter = 10000, save.to = "")

Arguments

fit.results

list. The return value of do.fit.

local

logical. If TRUE, gradient descent method is used to find background estimation. If FALSE, Differential Evolution is used.

eps

numeric, the desired accuracy for spline values.

n.iter

numeric, number of iterations for a gradient descent method, see details.

save.to

character, the filename for saving the results.

Details

An adaptation of neutron scattering data for a Bayesian background separation procedure. The method is detailed elsewhere*.

First, use the function do.fit to estimate the background from the low-r information in G(r). do.iter procedure estimates the background without low-r information, calculates the difference between the two estimates, subtracts this difference from the scattering data and finds the new estimate of the background.

Value

An object fit.results with modified elements fit.results$curves$bkg, fit.results$curves$y and fit.results$curves$corr. See do.fit for details.

References

*Gagin, A. and Levin, I. Hydrogen background estimation in neutron total scattering experiments. Submitted for publication.


BBEST documentation built on Jan. 8, 2021, 2:22 a.m.