  A new procedure aiming at folding a powder diffraction 2-D into a 1-D scan is
presented. The technique consists of three steps: tracking the beam centre by
means of a Simulated Annealing (SA) of the diffraction rings along the same
axis, detector tilt and rotation determination by a Hankel Lanczos Singular
Value Decomposition (HLSVD) and intensity integration by an adaptive binning
algorithm. The X-ray powder diffraction (XRPD) intensity profile of the
standard NIST Si 640c sample is used to test the performances. Results show the
robustness of the method and its capability of efficiently tagging the pixels
in a 2-D readout system by matching the ideal geometry of the detector to the
real beam-sample-detector frame. The whole technique turns out in a versatile
and user-friendly tool for the $2\vartheta$ scanning of 2-D XRPD profiles.
