CalculateSlits v1

../_images/CalculateSlits-v1_dlg.png

CalculateSlits dialog.

Summary

Calculates appropriate slit widths for reflectometry instruments.

Properties

Name Direction Type Default Description
Slit1Slit2 Input number Optional Distance between slit 1 and slit 2 in mm
Slit2SA Input number Optional Offset in the beam direction in mm
Resolution Input number Optional Resolution
Footprint Input number Optional Footprint in mm
Angle Input number Optional Angle in degrees
Slit1 Output number   Slit 1 width in mm
Slit2 Output number   Slit 2 width in mm

Description

This algorithm can be used to calculate the slit dimensions to use for reflectometry instruments. It is effectively the inverse of CalculateResolution v1.

CalculateSlits uses nothing but the input properties to calculate the output, specifically:

Slit2 = (Footprint \times sin\alpha) - (2 \times Slit2SA \times tan(\alpha \times Resolution))

Slit1 = (2 \times Slit1Slit2 \times tan(\alpha \times Resolution)) - Slit2

where \alpha is the angle in radians.

Usage

s1, s2 = CalculateSlits(Slit1Slit2=1940.5, Slit2SA=364, Angle=0.7, Footprint=50, Resolution=0.03)
print("Slit 1: %.3f mm" % s1)
print("Slit 2: %.3f mm" % s2)
Slit 1: 1.078 mm
Slit 2: 0.344 mm

Categories: Algorithms | Reflectometry | ISIS

Source

C++ source: CalculateSlits.cpp

C++ header: CalculateSlits.h