Because electrons are more than a thousandfold lighter than the atom nuclei, induced oscillation by x-rays is much more efficient for electrons. Hence, the diffraction pattern is almost exclusively the result of the interaction of the x-ray waves with electrons.