The characteristic X-rays are used for chemical analysis. Specific X-ray wavelengths or energies are selected and counted, either by wavelength dispersive X-ray spectroscopy (WDS) or energy dispersive X-ray spectroscopy (EDS). WDS utilizes Bragg diffraction from crystals to select X-ray wavelengths of interest and direct them to gas-flow or sealed proportional detectors. In contrast, EDS uses a solid state semiconductor detector to accumulate X-rays of all wavelengths produced from the sample. While EDS yields more information and typically requires a much shorter counting time, WDS is generally a more precise technique with lower limits of detection because its superior X-ray peak resolution and greater peak to background ratio.