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

FindGoniometerFromUB v1

../_images/FindGoniometerFromUB-v1_dlg.png

FindGoniometerFromUB dialog.

Summary

Takes a series of exported UB (from SaveISawUB) and using the first UB supplied as a reference saves UB files that share common indexing (i.e. no inversion or swapping of crystallographic axes relative to the reference UB) in the default save directory and produces a table of the goniometer angle (phi) and the unit vector of the goniometer axis for each run (excl. the reference).

See Also

SetGoniometer, CalculateUMatrix

Properties

Name

Direction

Type

Default

Description

UBfiles

Input

list of str lists

Mandatory

Files with exported UB (from SaveISawUB). The filename must have .mat extension and only contain the run number as would be supplied to Load (e.g. WISH00043350.mat). The first UB will be the reference (typically, but not necessarily, omega = phi = 0) and a consistent UB will be made for each of the subsequent runs. Allowed extensions: [‘.mat’]

Chi

Input

number

45

Angle of the goniometer axis from +ve Z (vertical up).

ChiTol

Input

number

5

Tolerance of chi angle to test for consistency.

PhiTol

Input

number

15

Tolerance of phi angle to test for consistency (due to uncertainty on the gonio axis at omega=0this tol might need to be quite large).

PhiHand

Input

number

1

Handedness for the phi angles (rotation around goniometer axis) in the log file (1 for ccw/RH, -1 for cw/LH). Allowed values: [‘-1’, ‘1’]

PhiLogName

Input

string

ewald_pos

Name of log entry that records angle of rotation about goniometer axis

DOmega

Input

number

0

omega rotation between component of goniometer axis in XY-plane from +ve Y-axis(perpendicular to ki)

OmegaHand

Input

number

1

Handedness for the omega angles (rotation around +ve Z) in the log file (1 for ccw/RH, -1 for cw/LH). Allowed values: [‘-1’, ‘1’]

OmegaLogName

Input

string

ccr_pos

Name of log entry that records angle of rotation about vertical axis

OutputTable

Output

TableWorkspace

Mandatory

Output table to display goniometer axis and angles for runs with UBs that can share common indexing

Description

Takes a list of exported UB files (from SaveISawUB) and saves (in the default save directory) UB files that are consistent with the first UB file specified such that the same reflection in different runs has the same index (i.e. no inversion or swapping of crystallographic axes relative to the reference UB). Note this algorithm assume the sample is perfectly on the centre of rotation.

FindGoniometerFromUB_schematic.PNG

Fig.1: Schematic of the coordinate system used and definition of the goniometer axes. The arrow associated with an angle denote the counter clockwise rotation which corresponds to a handedness of +1 (right-handed). If the log file angles are for a clockwise rotation then the corresponding handedness shuold be specified as -1 in the input to the algroithm.

The algorithm uses the right-hand coordinate system where X is the beam direction and Z is vertically upward (IPNS convention). The algorithm considers two rotation axes: rotation about the Z-axis, \(\Omega\) ,and rotation of \(\phi\) around the goniometer axis. The angles \(\Omega\) and \(\phi\) for each run are read from the first value of the specified log entry in the run log files. The goniometer axis is defined by the angle from the vertical, \(\chi\), and the angle between the component of the goniometer axis in the scattering plane (XY) from the positive Y-axis, \(d\Omega\), defined when \(\Omega=0\) - for which nominal/best-guess values need to be supplied as arguments.

The test for consistency requires some tolerances to be supplied on \(\chi\) and \(\phi\), if the nominal goniometer axis is not within those tolerances the most likely permutation of the axes is tried (see FindPeaksMD v1) and the consistency is checked again. The algorithm displays a table with the actual \(\chi\) and \(\phi\) and the unit vector of the goniometer axis for each run for which a consistent UB was found

Useage

Example:

from mantid.simpleapi import *

ubList = ['WISH00043350', 'WISH00043351', 'WISH00043352','WISH00043353','WISH00043354']
tab = FindGoniometerFromUB(UBfiles=",".join(ubList), chi=45, chiTol=5, phiTol=10,
                           phiHand=-1, dOmega=0, omegaHand=1)

Categories: AlgorithmIndex | Diffraction\Reduction

Source

Python: FindGoniometerFromUB.py