a, b, Spectra of the undulator radiation with a groove density of the grating of 3,000 lines per mm (a) and 500 lines per mm (b). The radiation wavelength was typically centred at 27 nm with a corresponding electron beam energy of 492 MeV, which is reasonably consistent with the measured values shown in Extended Data Fig. 7. The minimum bandwidth was measured to be 2%, which indicated a reasonable agreement with the simulated values in the exponential-gain regime. The measured spectra of broadband spontaneous emission are also depicted with a bandwidth of approximately 7%.