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

LinkedUBs v1

Summary

Links the indexing of a given run to the UB of a reference run. PredictedPeaks should be calculated via goniometer rotation of the reference UB. Use of this algorithm will result in a seperate (linked) UB for each goniometer setting considered.

See Also

SetGoniometer, CalculateUMatrix

Properties

Name

Direction

Type

Default

Description

QTolerance

Input

number

0.5

Radius of isotropic q envelope to search within.

QDecrement

Input

number

0.95

Multiplicative factor by which to decrement q envelope on each iteration.

DTolerance

Input

number

0.01

Observed peak is linked if abs(dSpacing) < dPredicted + dTolerance.

NumPeaks

Input

number

15

Number of peaks, ordered from highest to lowest dSpacing to consider.

PeakIncrement

Input

number

10

Number of peaks to add to numPeaks on each iteration.

Iterations

Input

number

10

Number of cycles of refinement.

a

Input

number

1

Lattice parameter a.

b

Input

number

1

Lattice parameter b.

c

Input

number

1

Lattice parameter c.

alpha

Input

number

90

Lattice parameter alpha.

beta

Input

number

90

Lattice parameter beta.

gamma

Input

number

90

Lattice parameter gamma.

MinWavelength

Input

number

0.8

Minimum wavelength for LinkedPredictedPeaks.

MaxWavelength

Input

number

9.3

Maximum wavelength for LinkedPredictedPeaks.

MinDSpacing

Input

number

0.6

Minimum dSpacing for LinkedPredictedPeaks.

MaxDSpacing

Input

number

20

Maximum dSpacing for LinkedPredictedPeaks.

ReflectionCondition

Input

string

Primitive

Reflection condition for LinkedPredictedPeaks. Allowed values: [‘Primitive’, ‘C-face centred’, ‘A-face centred’, ‘B-face centred’, ‘Body centred’, ‘All-face centred’, ‘Rhombohedrally centred, obverse’, ‘Rhombohedrally centred, reverse’, ‘Hexagonally centred, reverse’]

Workspace

Input

Workspace

Mandatory

Instrument workspace on which observed peaks are defined.

ObservedPeaks

Input

TableWorkspace

Mandatory

FindPeaks table to which PredictedPeaks are compared.

PredictedPeaks

Input

TableWorkspace

Mandatory

PredictedPeaks table to which ObservedPeaks are compared.

LinkedPeaks

Output

TableWorkspace

Mandatory

Linked peaks: UB matrix consistent with that of PredictedPeaks.

LinkedPredictedPeaks

Output

TableWorkspace

Mandatory

LinkedPredictedPeaks: UB matrix consistent with PredictedPeaks.

DeleteWorkspace

Input

boolean

False

Delete workspace after execution for memory management.

Description

Given an initial UB at some goniometer configuration, this algorithm facilitates the ‘linking’ of the UBs across orientations - in other words, ensuring the continuity of the indexing of reflections throughout reciprocal space allowing for grouping of reflections and refinement.

On chopper instruments, when the sample is lowered into the blockhouse there is often no possibility to adjust its position. When rotating the crystal via the goniometer, since the crystal is likely not centred exactly, the predicted peaks from the initial UB often do not capture the data. As well as consistently indexing the peaks, the algorithm also effectively carries out a U matrix correction that accounts for sample miscentering. Use of this algorithm will result in a seperate UB matrix for each orientation which can then be used for integration.

The algorithm requires a set of predicted peaks that have been generated from the initial UB via goniometer rotation, a set of observed (found) peaks, and the lattice parameters in order to calculate the B matrix. A search within a Q-envelope is carried out in which all peaks within the envelope are screened as potential ‘matches’ to the observed peaks by comparing dspacing values.

This approach works well in simple cases, but for large unit cells and modulated structures where lots of peaks with small and similar dspacings appear, it is useful to make use of the NumPeaks parameter. This sorts the predicted peaks from largest to smallest dspacing and defines which peaks are used for the first cycle. As the refinement of the UB is carried out, more peaks at shorter d are added, encoded by the PeakIncrement parameter. This adds a defined number of peaks after each cycle.

The main limitation of this approach is that the lattice parameters of the sample should be known accurately. It is recommended that at least 10 iterations are carried out, but in cases where the crystal is well centred and the goniometer angles are known accurately fewer iterations are necessary.

Useage

Example:

# WISH single crystal
# demonstration of linkedUBs algorithm on D10 Ruby (cyle 18/1)

from mantid.simpleapi import *

# lattice parameters
a = 4.764407
b = 4.76440
c = 13.037904
alpha = 90
beta = 90
gamma = 120

# parameters for PredictPeaks
MinDSpacing = 0.5
MaxDSpacing = 20
MinWavelength = 0.8
MaxWavelength = 9.3
ReflectionCondition='Primitive'

# parameters for LinkedUBs
QTolerance = 0.5
QDecrement = 0.95
DTolerance = 0.02
NumPeaks = 25
PeakIncrement = 10
Iterations = 10
DeleteWorkspace = False

# phi axis at omega = 270
u_phi_x, u_phi_y, u_phi_z = 0.58779, 0.80902, 0.0

# load and process 41598
LoadRaw(Filename='WISH00041598.raw', OutputWorkspace='WISH00041598')
CropWorkspace(InputWorkspace='WISH00041598', OutputWorkspace='WISH00041598', XMin=6000, XMax=99000)
ConvertUnits(InputWorkspace='WISH00041598', OutputWorkspace='WISH00041598', Target='dSpacing', ConvertFromPointData=False)

# load and process 41599
LoadRaw(Filename='WISH00041599.raw', OutputWorkspace='WISH00041599')
CropWorkspace(InputWorkspace='WISH00041599', OutputWorkspace='WISH00041599', XMin=6000, XMax=99000)
ConvertUnits(InputWorkspace='WISH00041599', OutputWorkspace='WISH00041599', Target='dSpacing', ConvertFromPointData=False)

# find peaks on 41598 and 41599
FindSXPeaks(InputWorkspace='WISH00041598', PeakFindingStrategy='AllPeaks', ResolutionStrategy='AbsoluteResolution', XResolution=0.2, PhiResolution=2, TwoThetaResolution=2, OutputWorkspace='WISH00041598_find_peaks')

FindSXPeaks(InputWorkspace='WISH00041599', PeakFindingStrategy='AllPeaks', ResolutionStrategy='AbsoluteResolution', XResolution=0.2, PhiResolution=2, TwoThetaResolution=2, OutputWorkspace='WISH00041599_find_peaks')

# find and optimise UB on 41598 using lattice parameters
FindUBUsingLatticeParameters(PeaksWorkspace='WISH00041598_find_peaks', a=a, b=b, c=c, alpha=alpha, beta=beta, gamma=gamma, NumInitial=10, Tolerance=0.1, Iterations=10)

PredictPeaks(InputWorkspace='WISH00041598_find_peaks', WavelengthMin=MinWavelength, WavelengthMax=MaxWavelength, MinDSpacing=MinDSpacing, ReflectionCondition=ReflectionCondition, OutputWorkspace='WISH00041598_predict_peaks')

OptimizeLatticeForCellType(PeaksWorkspace='WISH00041598_predict_peaks', CellType='Hexagonal', Apply=True)

CopySample(InputWorkspace='WISH00041598_predict_peaks', OutputWorkspace='WISH00041598', CopyName=False, CopyMaterial=False, CopyEnvironment=False, CopyShape=False)

# set gonio on 41598 and predict the peaks of 41599
SetGoniometer(Workspace='WISH00041598', Axis0='0,0,1,0,1', Axis1='25,{},{},{},-1'.format(u_phi_x, u_phi_y, u_phi_z))
PredictPeaks(InputWorkspace='WISH00041598', WavelengthMin=MinWavelength, WavelengthMax=MaxWavelength, MinDSpacing=MinDSpacing, ReflectionCondition=ReflectionCondition, OutputWorkspace='WISH00041599_predict_peaks')

# linkedUBs
LinkedUBs(QTolerance=QTolerance,
          QDecrement=QDecrement,
          DTolerance=DTolerance,
          NumPeaks=NumPeaks,
          PeakIncrement=PeakIncrement,
          Iterations=Iterations,
          a=a,
          b=b,
          c=c,
          alpha=alpha,
          beta=beta,
          gamma=gamma,
          MinWavelength=MinWavelength,
          MaxWavelength=MaxWavelength,
          MinDSpacing=MinDSpacing,
          MaxDSpacing=MaxDSpacing,
          ReflectionCondition=ReflectionCondition,
          Workspace='WISH00041599',
          ObservedPeaks='WISH00041599_find_peaks',
          PredictedPeaks='WISH00041599_predict_peaks',
          LinkedPeaks='WISH00041599_linked_peaks',
          LinkedPredictedPeaks='WISH00041599_linked_peaks_predicted',
          DeleteWorkspace=DeleteWorkspace)

Categories: AlgorithmIndex | Diffraction\Reduction | Crystal\UBMatrix

Source

Python: LinkedUBs.py