OptimizeLatticeForCellType v1

../_images/OptimizeLatticeForCellType-v1_dlg.png

OptimizeLatticeForCellType dialog.

Summary

Optimize lattice parameters for cell type.

Properties

Name Direction Type Default Description
PeaksWorkspace InOut PeaksWorkspace Mandatory An input PeaksWorkspace with an instrument.
CellType Input string Cubic Select the cell type. Allowed values: [‘Cubic’, ‘Tetragonal’, ‘Orthorhombic’, ‘Hexagonal’, ‘Rhombohedral’, ‘Monoclinic’, ‘Monoclinic ( a unique )’, ‘Monoclinic ( b unique )’, ‘Monoclinic ( c unique )’, ‘Triclinic’]
Apply Input boolean False Re-index the peaks
PerRun Input boolean False Make per run orientation matrices
Tolerance Input number 0.12 Indexing Tolerance
EdgePixels Input number 0 Remove peaks that are at pixels this close to edge.
OutputChi2 Output number   Returns the goodness of the fit
OutputDirectory Input string . The directory where the per run peaks files and orientation matrices will be written.

Description

This does a least squares fit between indexed peaks and Q values for a set of runs producing an overall leastSquare orientation matrix.

Get estimates of the standard deviations of the parameters, by approximating chisq by a quadratic polynomial through three points and finding the change in the parameter that would cause a change of 1 in chisq. (See Bevington, 2nd ed., pg 147, eqn: 8.13 ) In this version, we calculate a sequence of approximations for each parameter, with delta ranging over 10 orders of magnitude and keep the value in the sequence with the smallest relative change.

Usage

Example:

ws=LoadIsawPeaks("TOPAZ_3007.peaks")
FindUBUsingFFT(ws,MinD=8.0,MaxD=13.0)
print "Before Optimization:"
print ws.sample().getOrientedLattice().getUB()
OptimizeLatticeForCellType(ws,CellType="Monoclinic ( a unique )")
print "\nAfter Optimization:"
print ws.sample().getOrientedLattice().getUB()

Output:

Before Optimization:
[[ 0.01223576  0.00480107  0.08604016]
 [-0.11654506  0.00178069 -0.00458823]
 [-0.02737294 -0.08973552 -0.02525994]]

After Optimization:
[[-0.04772517  0.04134355 -0.00058175]
 [-0.0055954  -0.00905383  0.12507404]
 [ 0.06103109  0.03149982  0.01101201]]

Categories: Algorithms | Crystal