An X-ray diffraction apparatus provides analysis in either transmission or
reflective mode and easy conversion between the two modes. An X-ray
source and X-ray detector are each connected to a different circle of a
goniometer. The two circles may be rotated independently to position the
source and detector on the same side of a sample library for reflection
mode operation, or on opposite sides of the sample library for
transmission mode operation. The sample library has a horizontal
orientation that allows open sample containers of the library to maintain
the sample without spillage, and it connects to an XYZ stage that can
move in three dimensions. The system may use a beamstop, and the
goniometer and XYZ stage be motorized and controlled for automated sample
analysis.