\(\renewcommand\AA{\unicode{x212B}}\)

OptimizeCrystalPlacementByRun v1

../_images/OptimizeCrystalPlacementByRun-v1_dlg.png

OptimizeCrystalPlacementByRun dialog.

Summary

Optimizes the sample position for each run in a peaks workspace.

See Also

OptimizeCrystalPlacement

Properties

Name

Direction

Type

Default

Description

InputWorkspace

Input

TableWorkspace

Mandatory

The name of the peaks workspace that will be optimized.

Tolerance

Input

number

0.15

Tolerance of indexing of peaks.

OutputWorkspace

Input

string

The name of the peaks workspace that will be created.

Description

This algorithm basically optimizes h,k, and l offsets from an integer by varying the parameters sample positions for each run in the peaks workspace.

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

Usage

Example:

ws=LoadIsawPeaks("calibrated.peaks")
FindUBUsingFFT(PeaksWorkspace=ws,MinD=2,MaxD=20,Tolerance=0.12)
IndexPeaks(PeaksWorkspace='ws',Tolerance=0.12)
wsd = OptimizeCrystalPlacementByRun(InputWorkspace=ws,OutputWorkspace='wsd',Tolerance=0.12)
print('Optimized %s sample position: %s'%(mtd['wsd'].getPeak(0).getRunNumber(),mtd['wsd'].getPeak(0).getSamplePos()))
print('Optimized %s sample position: %s'%(mtd['wsd'].getPeak(8).getRunNumber(),mtd['wsd'].getPeak(8).getSamplePos()))

Output:

Optimized 71907 sample position: [-0.000678629,-2.16033e-05,0.00493278]
Optimized 72007 sample position: [-0.0027929,-0.00105681,0.00497094]

Categories: AlgorithmIndex | Crystal\Corrections

Source

Python: OptimizeCrystalPlacementByRun.py