OptimizeCrystalPlacement v1

../_images/OptimizeCrystalPlacement-v1_dlg.png

OptimizeCrystalPlacement dialog.

Summary

This algorithm optimizes goniometer settings and sample orientation to better index the peaks.

Properties

Name Direction Type Default Description
PeaksWorkspace Input PeaksWorkspace Mandatory Workspace of Peaks with UB loaded
KeepGoniometerFixedfor Input int list   List of run Numbers for which the goniometer settings will NOT be changed
ModifiedPeaksWorkspace Output PeaksWorkspace   Output Workspace of Peaks with optimized sample Orientations
FitInfoTable Output TableWorkspace FitInfoTable Workspace of Results
AdjustSampleOffsets Input boolean False If true sample offsets will be adjusted to give better fits, otherwise they will be fixed as zero(def=true)
OptimizeGoniometerTilt Input boolean False Set true if main error is due to a tilted Goniometer(def=false)
Chi2overDoF Output number   chi squared over dof
nPeaks Output number   Number of Peaks Used
nParams Output number   Number of Parameters fit
nIndexed Output number   Number of new Peaks that WOULD be indexed at ‘MaxIndexingError’
MaxAngularChange Input number 5 Max offset in degrees from current settings(def=5)
MaxIndexingError Input number 0.25 Use only peaks whose fractional hkl values are below this tolerance(def=.25)
MaxHKLPeaks2Use Input number -1 If less than 0 all peaks are used, otherwise only peaks whose h,k, and l values are below the level are used(def=-1)
MaxSamplePositionChangeMeters Input number 0.0005 Maximum Change in Sample position in meters(def=.0005)

Description

This algorithm basically optimizes h,k, and l offsets from an integer by varying the parameters sample positions, sample orientations ( chi,phi, and omega), and/or the tilt of the goniometer for an experiment.

If the crystal orientation matrix, UB, was created from one run, that run may not need to have its goniometer settings optimized. There is a property to list the run numbers to NOT have their goniometer settings changed. This entry is IGNORED if the tilt or sample positions are included in the optimization. In this case NONE of the goniometer angles, relative to any tilt, will be changed.

The goniometer angles displayed are relative to the tilt,i,e, phi is the rotation around the axis perpendicular to the tilted plane. The resultant PeaksWorkspace has the goniometer angles relative to the Y and Z axes at that time.

The crystal orientation matrix, UB, from the PeaksWorkspace should index all the runs “very well”. Otherwise iterations that slowly build a UB with corrected sample orientations may be needed.

The parameters for the tilt are GRotx, GRoty, and GRotz in degrees. The usage for this information is as follows:

rotate(x,GRotx)*rotate(y,GRoty)*rotate(z,GRotz)* SampleOrientation ( i.e. omegaRot*chiRot*phiRot)).

Note: To optimize by the tilt in the goniometer and then by the angles or by the sample position, it is possible to run with one optimization, then using the resultant PeaksWorkspace for input, run another optimization.

Rerunning the same optimization with the result is also a good idea. If the first guess is very close, the optimize algorithm does try cases far away and may not get back to the best value. Check the chisquared values. If they increase, that optimization should probably not be used.

Usage

Example:

ws=LoadIsawPeaks("TOPAZ_3007.peaks")
LoadIsawUB(ws,"ls5637.mat")
wsd = OptimizeCrystalPlacement(ws)
(wsPeakOut,fitInfoTable,chi2overDoF,nPeaks,nParams,nIndexed,covrianceInfoTable) = OptimizeCrystalPlacement(ws)
print "Chi2: %.4f" % chi2overDoF

Output:

Chi2: 0.0203

Categories: Algorithms | Crystal