Both X-ray fluorescence (XRF) and X-ray diffraction (XRD) are frequently used analysis techniques for the analysis of rock, sediment, and other earth material samples. Geoscientists in the field use portable equipment to get real-time material chemistry (XRF) and mineralogy (XRD) of geological samples as well as microscopes for traditional optical mineralogy and petrology.