# Changeset 4664

Ignore:
Timestamp:
Nov 29, 2020 8:41:57 PM (2 years ago)
Message:

pretty up Controls panel; add & update help

Location:
trunk
Files:
2 edited

Unmodified
Removed

• ## trunk/help/gsasII.html

 r4659

This window provides the main controls for the refinement calculations in GSAS-II. Two of the main refinement tools are the fortran MINPACK lmdif and lmder algorithms wrapped in python as provided in the Scipy package and a third one is a python version utilizing only the numpy package. The purpose is to minimize "Times New Roman"'>This window provides the main controls and a few global parameters for GSAS-II.

What can I do here?

On this page, there are three or four sets of controls. The first is for how refinements operate.

Refinement type
This determines how refinements are performed. The choices are:
• analytic Hessian: This is the default option and is usually the most useful. It uses as custom-developed least-squares minimizer that uses singular-value decomposition (SVD) to reduce the errors caused by correlated variables and the Levenberg-Marquardt algorithm to down-weight the off-diagonal Hessian terms when refinements fail to lower χ2.
• analytic Jacobian: This uses a numpy-provided leastsq minimizer, which not applicable for larger problems as it requires much more memory than the Hessian routines. This because it creates a Jacobian matrix is shaped N x M (N parameters x M observations) and uses that to create the N x N Hessian. The "Hessian" minimizers create the Hessian matrix directly.
• numeric: This also uses the numpy leastsq minimizer, and is also not applicable for larger problems. Unlike, the "analytic Jacobian", numerical derivates are computed for derivatives rather than analytical derivatives that are coded directly into GSAS-II. This will be slower than the analytical derivatives and will converge more slowly. It is typically used for code development to check the accuracy of the analytical derivative formulations.
• Hessian SVD: This is very similar to analytic Hessian but does not include the Levenberg-Marquardt algorithm. It can be faster, but is more prone to diverge when severe correlation is present.

Note that the Jacobian refinement tools are the Fortran MINPACK lmdif and lmder algorithms wrapped in python as provided in the Scipy package. The Hessian routines are were developed for GSAS-II based on routines in numpy and scipy and using the material in Numerical Recipes (Press, Flannery, Teulosky & Vetterling) for the Levenberg-Marquardt. The purpose is to minimize the sum of the squares of M nonlinear functions in N variables by a modification of the Levenberg-Marquardt routines were written by Burton S. Garbow, Kenneth E. Hillstrom, Jorge J. More (Argonne National Laboratory, 1980). The python/numpy version was developed by us based on the material in Numerical Recipes (Press, Flannery, Teulosky & Vetterling) for the Levenberg-Marquardt algorithm and is the default.

What can I do here?

1.      Select whether the refinement uses ‘analytic Jacobian’, ‘analytic Hessian’ or ‘numeric’ derivatives. The last is slower and perhaps a bit less accurate, but may be needed if the analytic functions are not fully developed. The Jacobian matrix is shaped N x M (parameters x observations) and is much larger than the Hessian matrix which is shaped M x M (parameters x parameters). Generally use ‘analytic Hessian’ for routine work.

2.      Select ‘Min delta-M/M’ for convergence; the refinement will stop when the change in the minimization function is less than this value. Set Min delta-M/M = 1.0 to force just a single cycle to be performed. A value less than 10-4 (the default) generally gives no better result. The allowed range is 10-9 to 1.0.

3.      If ‘analytic Jacobean’ is chosen then select ‘Initial shift factor’ for the first cycle of refinement. This value is modified by the least squares routine. The allowed range is 10-5 to 100. Smaller values may be needed if your initial refinement trials immediately diverge, however make sure your starting parameter values are ‘reasonable’. The selected default (=1.0) normally gives good performance.

4.      If ‘analytic Hessian’ is chosen then select ‘Max cycles’, the maximum number of least squares cycles to be performed. Least squares cycles are determined by the number of times a new Hessian matrix is computes; the Levenberg-Marquardt algorithm may compute the function several times between cycles as it finds the optimal value of the Marquardt coefficient. Choices are given in the pull down selection; the default is 3 cycles.

5.      Select data for sequential refinement; the data sets may be done in ‘reverse order’.

Laboratory, 1980).

Min delta-M/M
This determines when convergence is recognized; the refinement will stop when the change in the minimization function is less than this value. Set Min delta-M/M = 1.0 to force just a single cycle to be performed. The default is 0.001. A value less than 10-4 causes the refinement to cycle with no meaningful improvement since shifts become a small fraction of the parameter's uncertainties. Set Min delta-M/M = 1.0 to force refinement to stop after a single refinement. The allowed range is 10-9 to 1.0.
Max cycles
This determines the maximum number of refinement cycles that will be performed. This is only available with the "Hessian" minimizers.
Initial lambda
Note that here λ is the Marquardt coefficient, which when large down-weights the significance of the off-diagonal terms in the Hessian. Thus, when λ is large, the refinement is effectively one of steepest-descents, where correlation between variables is ignored. Note that steepest-descents minimization is typically slow and may not always find the local minimum. This is only available with the "analytical Hessian" minimizer.
SVD zero tolerance
This determines the level where SVD considers values to be the same. Default is 10-6. Make larger to where problems occur due to correlation. This is only available with the "Hessian" minimizers.
Initial shift factor
?

A set of controls is provided for control of single-crystal refinements. These only appear when single crystal (HKLF) histograms are present in the project.

Refine HKLF as F^2?
When checked, refinements are against F2 rather than |F|.
Min obs/sig
?
Min extinct.
?
Max delt-F/sig
?
Max d-spacing
Reflections with d-space values larger than this value are ignored.
Min d-spacing
Reflections with d-space values smaller than this value are ignored.

A set of controls is for sequential refinement. Settings here determine if "normal" or "sequential" refinement is performed. If no datasets are selected, then all "used" histograms are included in one combined refinement. However, if any number histogram are selected used here, then a sequential refinement is performed, where a fit is made to each histogram in turn. Only the first item below is shown in "normal" mode.

Select datasets/Reselect Datasets
This brings up a menu where histograms can be selected, which potentially switches between a normal and a sequential refinement. If one or more histograms are selected, a sequential refinement is used. If none are selected, then the refinement be set as "normal". The button is labeled "Select" when in normal refinement mode and "Reselect" in sequential refinement mode.
Reverse order?
Normally, in a sequential histograms are fit in the order they are in the data tree (which can be reordered by dragging tree items), but when this option is selected, the sequential fit is performed with the last tree entry first.
Copy results to next histogram?
When this option is selected, the fitted parameters from each refinement are copied to the next histogram, so that the starting point for each refinement will be the results from fitting the previous. This works well for parametric experiments where parameters such as the lattice parameters change gradually over the course of successive measurements. This option is usually used only for the initial refinement after a sequential fit is started and the setting is reset once that refinement is completed. For subsequent refinements, it is usually better to start with the results from the previous fit.
Clear previous seq. results
When this button is pressed, the "Sequential Results" entry with the results from the last sequential fit is deleted from the tree.

Last modified: Sat Nov 21 12:25:40 CST 2020 Last modified: Sun Nov 29 20:05:28 CST 2020

Note: See TracChangeset for help on using the changeset viewer.