GeometryΒΆ
We follow the convention that x is along the direction of the X-ray beam. All other directions then follow as a consequence. See the figure below for a sketch of a standard scattering geometry. The detDistance
used in the toolbox is the distance to the primary beam position, not the distance to the point of normal incidence.