CalculateResolution v1

../_images/CalculateResolution-v1_dlg.png

CalculateResolution dialog.

Summary

Calculates the reflectometry resolution (dQ/Q) for a given workspace.

Properties

Name Direction Type Default Description
Workspace Input MatrixWorkspace Mandatory Workspace to calculate the instrument resolution of.
TwoTheta Input number Optional Two theta scattering angle in degrees.
FirstSlitName Input string slit1 Component name of the first slit.
SecondSlitName Input string slit2 Component name of the second slit.
VerticalGapParameter Input string vertical gap Parameter the vertical gap of each slit can be found in.
TwoThetaLogName Input string Theta Name two theta can be found in the run log as.
Resolution Output number   Calculated resolution (dq/q).
TwoThetaOut Output number   Two theta scattering angle in degrees.

Description

This algorithm takes a workspace and a value for two theta, and attempts to calculate the reflectometry resolution (dQ/Q) from them. If no value is provided for two theta then CalculateResolution will attempt to fetch a value from the workspace’s log using the two theta log name provided.

CalculateResolution outputs two values, the calculated resolution and the value of TwoTheta that was used in the calculation. The latter is useful when TwoTheta was not given to CalculateResolution, causing CalculateResolution to extract it from the workspace’s sample log.

The effective inverse of this algorithm is CalculateSlits v1.

Beam Divergence

collimation_diagram.png

Schematic showing beam divergence using two slits (Slit1 and Slit2)

Proof

\frac{d1}{x}  \equiv \frac{d2}{l - x}  \equiv tan\alpha

 \therefore \frac{d1}{x} = \frac{d1 + d2}{l}

 \therefore \alpha = tan^{-1}\left(\frac{d1 + d2}{l}\right)

where \alpha gives is the beam divergence in radians. Parameter d1 is the vertical distance of Slit1 opening, d2 is the same for Slit2. parameter l is the distance between the slits in the beam direction. See figure above for reference.

Usage

ws = Load('INTER00013460')
res, two_theta = CalculateResolution(Workspace = ws, TwoTheta = 0.7)
print("Resolution: %.4f" % res)
print("Two Theta: %.4f" % two_theta)
Resolution: 0.0340
Two Theta: 0.7000

Categories: Algorithms | Reflectometry | ISIS