It is a widely used technique in petrology to determine the mineralogical composition of a rock or mineral. In this method, the X-ray beam is directed onto a powdered sample, and the diffraction pattern is collected. The resulting pattern is analyzed to identify the various mineral phases present in the sample.