Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
.. algorithm::
.. summary::
.. alias::
.. properties::
Description
-----------
This algorithm can be used to calculate the slit dimensions to use for
reflectometry instruments. It is effectively the inverse of :ref:`algm-CalculateResolution`.
CalculateSlits uses nothing but the input properties to calculate the output, specifically:
.. math::
Slit2 = (Footprint \times sin\alpha) - (2 \times Slit2SA \times tan(\alpha \times Resolution))
Slit1 = (2 \times Slit1Slit2 \times tan(\alpha \times Resolution)) - Slit2
where :math:`\alpha` is the angle in radians.
Usage
-----
.. testcode::
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)
.. testoutput::
Slit 1: 1.078 mm
Slit 2: 0.344 mm
.. categories::
.. sourcelink::