it is to be distinguished from x-ray diffraction for crystal structure analysis. x-ray spectroscopy determines presence and quantities of chemical elements by detecting characteristic x-ray that are emitted from atoms irradiated by a high-energy beam.