X-ray crystallography is a technique used to determine the atomic and molecular structure of a crystal by measuring the angles and intensities of X-rays that are diffracted through the crystal. The data obtained allows scientists to construct a three-dimensional model of the electron density within the crystal.