X-Ray diffraction and spectrometry