X-ray diffraction is a technique used to determine the atomic and molecular structure of crystals. X-rays are directed at a crystal and diffract in specific patterns depending on the crystal structure. Bragg's law describes the diffraction condition for constructive interference of X-rays reflecting off crystal planes. The diffracted X-ray beams are detected and the intensities and angles are used to reconstruct the electron density and atomic positions within the crystal. Common instrumentation includes synchrotron radiation sources and rotating anode X-ray tubes coupled to a diffractometer to detect and measure the diffracted beams.