In situ characterization of undulator magnetic fields.
A new in situ method is proposed to characterize the peak magnetic fields of undulator sources. The X-ray beam emitted by the HU52 Apple-2 undulator of the DEIMOS beamline of the SOLEIL synchrotron is analyzed using the Bragg diffraction of a Si(111) crystal. Measurements over the undulator gap range in linear horizontal polarization are compared with simulations in order to rebuild the Halbach function linking the undulator gaps to their peak magnetic fields. The method presented also allows information about the electron beam to be obtained.