Table of Contents

  1. Load data
  2. Set additional parameters
  3. Set real-space condition
  4. Optimize background with DifEv
  5. Fit results
  6. Plot options


On the top of Data Plot inset you can see the "progress bar". Parameters, that are necessary to specify, are marked with red. Once indicated, they turn green. Optional parameters are marked with grey.

Hover mouse cursor over a plot to display coordinates of a corresponding point. Mouse click fixes this legend until the next click in a new place.

1. Load data

BBEST supports text files, .csv-files, .sqa and .sqb-files, returned by PDFgetN, and .RData files that contain results of the previously made fits (as returned by 'Download fit results as .RData file'). For text files data should be given in the following format

x

y

SB

sigma

lambda

0

2

4

6

8

1

3

5

7

9

...

...

...

...

...

Here SB (coherent baseline SB(Q)), sigma (noise level ε(Q)) and lambda (useful signal level) are the optional columns.


2. Set additional parameters

Truncate data

in some situations there is a necessity in removing the unwanted data. For example, low-x regions may contain incorrect estimations, and high-x regions may contain nothing but noise. In the case of neutron scattering experiments this may lead to the inaccuracy in Pair Distribution Function estimation. We recommend to narrow x-region to a reasonable boundaries.

Useful signal level

the mean signal magnitude, lambda, is calculated as a linear piecewise function which is equal to lambda_0 outside the [x.min,x.max] region. Inside this region lambda is approximated by a line connecting points (x_1;lambda_1) and (x_2;lambda_2). This parameter does not require high accuracy. lambda can be thought as a function that will cross centres of the signal peaks after background subtraction.

Baseline

neutron scattering coherent baseline (SB) or any other baseline that shouldn't be subtracted from the experimental signal. For neutron total scattering experiments, SB can be calculated via

SB(Q)=1-(1-L)ΣkNkfkexp(-1/2σkk2Q2)/N<f2>,

where where Nk is the number of atoms of type k per unit cell, fk is the scattering factor for the atom k, <f2> is the average of the scattering factor squared, σkk2 is the atomic displacement parameter (ADP), and L is the Laue term. If unknown, the APD(s) could be refined (to do this, real-space condition should be specified).

Noise level

Although noise in diffraction experiments is per se Poisson, various corrections for background, absorption, multiple scattering, Plazcek and other effects can destroy its structure. We suggest considering the experimental uncertainty as having Gaussian distribution with x-dependent amplitude. Splitting grid into n.regions segments and estimating Gaussian standard deviation over these segments allows us to approximate the true noise-distribution. Your can indicate number of regions to be used (x-range is then split into n.regions equal regions), or, if noise can be considered as uniform, provide bounds for the peak-free region. BBEST uses aws package that implements Propagation-Separation Approach to adaptive smoothing to estimate the noise level.

P(bkg)

A probability that a single datapoint contains contributions from background and noise only. Correspondingly, (1-P(bkg)) is a probability that a datapoint contains also signal contribution. P(bkg) can be thought as a (total length of areas that contain only background)/(total x-scale area). If overestimated or underestimated, the background may be overestimated or underestimated, respectively. If you see that the estimated backround possesses both unwanted properties (overestimated in one region and underestimated in the other), try using the iterative procedure. It will estimate P(bkg) at each point separetly (taking twice time for the fit).


3. Set real-space condition

For total scattering experiments a real-space pair distribution function (PDF or G(r)), obtained as the Fourier transform of the total scattering function S(Q), performs a linear (or quasi-linear) behaviour at distances smaller than the shortest interatomic distance in the material. Knowledge of the correct behavior of a PDF at low r can be used to constrain the optimization procedure.

Condition type

either 'Gaussian noise' or 'Correlated noise'. The r-space noise can be considered as independent or correlated Gaussian. For better computational stability we recommend to use 'Gaussian noise' option.

Number density of the material ρ0

atomic number density of the material. By definition is a number of atoms per unit cell divided by a volume of a unit cell.

min(r), max(r), dr

bounds and spacing for the grid on which the PDF behaviour is controlled.

Use this function only after noise level ε is estimated.


4. Optimize background with DifEv

The posterior maximization is performed using the Differential Evolution Algorithm (DEA; Price et al., 2005) implemented in the DEoptim package.

Before starting fit, indicate the following parameters:

Number of population members

NP, number of population members. For many problems it is best to set NP to be at least 10 times the length of the parameter vector (which includes spline knot positions, and, optionally, normalization and ADP parameters).

Number of iterations

itermax, the maximum iteration (population generation) allowed.

Crossover probability (CR)

crossover probability from interval [0,1]. The crossover probability CR controls the fraction of the parameter values that are copied from the mutant.

Differential weighting factor (F)

differential weighting factor from interval [0,2]. Effective values are typically less than one.

Lower and upper bounds for scale factor fit

bounds for normalization parameter. If no normalization is needed, use the default value '1, 1'

Lower and upper bounds for background

estimation for the background minimum and maximum values. For faster convergence it is better to estimate minimum lower and maximum higher than real minimum and maximum values, respectively.

Fit background with

for the case of fitting of individual-bank data we recommend using an analytical function. For a (blended) total scattering function we recommend using splines. Uncertainty interval estimation in unavailable for the analytical backgrounds.

Number of splines or spline knot positions

a single integer number (N) will specify number of spline functions to be used (N equidistant knots will be generated). To set specific knot positions, enter numbers divided by commas. Put more knots in the region where background demonstrates oscillative behaviour.


5. Fit results

This inset allows to download fit results in a text format, as a correction .fix file for PDFgetN, or as a binary file that contains R-objects. The PDF could be calculated on a specified grid and downloaded as well. To see corresponding plots select 'Fit Results Plot' tab on the top tab panel.

The iterative algorithm is available if fit was performed using G(r)-corrected Bayesian model and background function was expanded in terms of splines. It includes the following steps:

  1. Estimation of the background using Q-space Bayesian models
  2. Calculation of the difference between the G(r) obtained using the two models for r<1Å
  3. Conversion of this difference to Q-space and adding it to the estimate of baseline SB
  4. Minimization of the target function for the new G(r)-corrected model
The first and fourth steps can be performed using either Gradient Descent Algorithm (GDA) or DEA. GDA could be faster but tends to converge to a local minimum. DEA, while a slow procedure, solves the global optimization task. The control parameters for DEA will be used same as for the initial fit.

6. Plot options

You can set here x- and y-axis limits of a graph. If this option was used, the truncation procedure will not further automatically rescale data plot. Note, that choosing plot name from the select list does not render plot on the right panel. To do that, select the corresponding inset on the top.