A method for inspection of a sample includes directing a beam of X-rays
toward a sample and configuring an array of detector elements to capture
the X-rays scattered from the sample. The sample is shifted in a
direction parallel to the axis of the array between at least first and
second positions, which positions are separated one from another by an
increment that is not an integer multiple of the pitch of the array. At
least first and second signals are generated by the detector elements
responsively to the X-rays captured thereby while the sample is in at
least the first and second positions, respectively. The first and second
signals are combined so as to determine an X-ray scattering profile of
the sample as a function of position along the axis.