The scattering of X-rays by crystal structures, used to determine the arrangement of atoms in solids.