## 2 Fast Wavelength Scans  
The advantage of variable gap undulators in terms of enhanced flexibility regarding wavelength tunability is demonstrated in Figures 2 and 3. While the setup of FLASH1 for SASE for a new user experiment at a specific wavelength takes up to several hours because of the required electron beam energy change (with FLASH1 undulators being fixed-gap), setup of FLASH2 can normally be done within one hour or less, depending on the wavelength requested compared to the one at FLASH1. As a consequence, the time it takes for the initial setup of FLASH2 which is done combined with FLASH1, is almost completely determined by the FLASH1 setup time. After that, any change in wavelength and pulse pattern for FLASH2 can be done in a matter of minutes. The longest wavelength that can be reached is produced when the undulators are closed and is given by approximately three times the FLASH1 wavelength for the specific electron beam energy. The minimum FLASH2 wavelength in normal SASE operation depends on the electron beam energy and beam quality, but it is always less than or equal to the FLASH1 wavelength. Therefore, factor of 3 wavelength tunability can be offered at any time. For lower electron beam energies, one can even go significantly beyond that, with up to factor of 4 tunability at lower energies. Figure 3: Fast wavelength scan at FLASH2 performed while FLASH1 delivered the beam to users at 13.5 nm (electron beam energy 699 MeV). This scan was performed with standard undulator optics (see below). Figure 2: Wavelength tunability of FLASH2 for specific electron beam energies. The different symbols and colors refer to the achieved photon pulse energies. The upper and lower limits are given by three times the FLASH1 wavelength as a maximum (for a closed undulator gap) and the FLASH1 wavelength as a minimum. Figure 3 shows a fast wavelength scan. In principle, the only action needed to decrease the wavelength is opening of the undulators. In practice, minor orbit corrections of the electron beam are necessary. The online, non-invasive measurement of crucial photon parameters including wavelength, intensity, and beam position need only a few seconds to average before these values are available again. Hence, setting a new wavelength takes only minutes as long as the wavelength change is moderate. In particular, scanning across a photoabsorption resonance is almost as easy as at a storage ring. For large wavelength changes, the setup is still fast, but needs further adjustments concerning electron beam optics. For electron beam energies, at which FLASH is operated, the undulator focusing can be rather strong when the undulators are closed. In extreme cases, as shown in simulations in Figure 4, the focusing becomes so strong that the beam size along the undulator grows and leads to losses unless the focusing is adjusted. Even if these losses would not trigger the machine protection system and consequently switch off the beam, the growing beam size would pose a problem. In this case, the last undulators would no longer contribute to the FEL amplification process, resulting in lower pulse energy. Furthermore, the source point would be no longer in the last undulator, forcing the experiment to either move the instrument or adapt the focusing, assuming that either is possible. Neither solution is straightforward and they can only be performed once the saturation source point is remeasured. At FLASH2, we therefore now adjust the focusing automatically, as shown in the simulations in the right picture of Figure 4. Theoretically, this would also require a rematching of the electron beam at the undulator entrance, which can be calculated in special and staightforward cases, but not easily in general. With more exotic schemes, such as two-color lasing or any fast switching schemes, that will become more important in the future, because a mismatch can in general no longer be avoided.