Synchrotron radiation is generated when high-energy electrons are accelerated to near light speeds and forced to travel in a circular or spiral path by magnetic fields. The emitted X-rays are directed onto the sample, and the diffracted beams are collected by detectors. By analyzing the diffraction patterns, researchers can determine various structural parameters, such as lattice constants, phase composition, and crystallite size.