1
2 """
3 Alignment correction.
4
5 Sometimes the sample alignment is not perfect, and the sample may
6 be slightly rotated. The net effect of this is that the Q values
7 stored in the data file are not correct. The angle correction
8 allows you to adjust Q as if the data were taken at a slightly
9 different angle.
10
11 Note that this adjustment will fail to properly account for the change
12 in intensity due to the neutrons at the unexpected reflection angle
13 being filtered by the back slits, or due to the unexpected sample
14 footprint poorly estimating the beam spill. Whether these effects are
15 significant depends on the details of the experiment geometry.
16
17 Usage
18 =====
19
20 data.appy(AdjustAlignment(offset=0.01)
21 """
22 from reflectometry.reduction.correction import Correction
23
25 """
26 Adjust Q if there is reason to believe either the detector
27 or the sample is rotated.
28 """
29 properties = ["offset"]
30 offset = 0.
31
33 """Define the angle offset correction for the data.
34 angle: rotation in degrees away from the beam
35 """
36 self.offset = offset
37
45
47 return "AdjustAlignment(offset=%g)"%offset
48