Schematic view of the XPAD3.1 detector in the detection geometry. The sample is placed at the origin O of the laboratory frame (x,y,z), corresponding to the vertex of the diffraction cone with Bragg angle. D is the orthogonal distance between the sample and the virtual front side of the detector. OD is the intersection of the line perpendicular to the virtual front side with this side (i.e. OD corresponds to the direct beam for δ = 0). ON is at the bottom corner of the lowest module in the yz plane (x = xd = 0). The detector frame (xd,yd,zd) has its origin at ON.