Apparatus for analysis of a sample includes a radiation source, which is
adapted to direct a first, converging beam of X-rays toward a surface of
the sample and to direct a second, collimated beam of the X-rays toward
the surface of the sample. A motion assembly moves the radiation source
between a first source position, in which the X-rays are directed toward
the surface of the sample at a grazing angle, and a second source
position, in which the X-rays are directed toward the surface in a
vicinity of a Bragg angle of the sample. A detector assembly senses the
X-rays scattered from the sample as a function of angle while the
radiation source is in either of the first and second source
configurations and in either of the first and second source positions. A
signal processor receives and processes output signals from the detector
assembly so as to determine a characteristic of the sample.