# Two-Color Operation of a Soft X-ray FEL with Alternation of Undulator Tunes
## 1 Introduction  
Two-color lasing is a popular operation mode of X-ray FEL user facilities. A possible way to generate two colors in a gap-tunable undulator, operating in the SASE regime, is to split the undulator into two sections, and set different K-values in each of these sections. An additional useful element for X-ray pump, X-ray probe experiments could be a chicane between the two sections to control a time delay between the pulses of two different colors. One can use the same electron bunch (parts of the same bunch) for lasing in the two sections of the undulator [1; 2]. In this case, the beam quality is partially spoiled in the first section (that typically operates at the onset of saturation), and one has to compromise intensities of two colors. As an alternative, one can use the fresh-bunch technique based on the principle of the betatron switcher [3]. A practical realization of this principle was conducted in a way that the head and the tail of the bunch has in two different sections of the undulator (fresh-slice technique). This was first realized by applying beam tilt due to a transverse head-tail kick in the dechirper [4]. Beam tilt for fresh slice operation can also be introduced by combination of an energy chirp and dispersion [5; 6] as well as by a transverse deflecting structure [3; 7]. Alternatively, the fresh-slice technique can be based on a time-dependent transverse mismatch of the electron beam [8; 9]. Other beam manipulation techniques [10; 11; 12; 13] in the context of the split undulator scenario can be used as well.  
One of the issues with all these schemes is a significant spatial separation of effective source positions of the two X-ray beams. This separation can make it difficult to efficiently focus both beams on a sample. As an alternative, one can consider two-color lasing in the undulator with the alternation of tunes of single undulator segments enabling near positions of source points. This scheme was realized at LCLS for small separation of tunes (about 1%) and was described in [14] as the gain-modulated FEL. Another advantage of the scheme with alternatingly tuned undulator segments is that the FEL gain for both colors is higher than in the case of the split undulator scheme with the same number of segments. This is related to the fact that the segments with \"wrong\" wavelengths generate longitudinal dispersion that boosts the amplification of microbunching in the electron beam. This can enable two-color operation in cases when the split undulator configuration does not provide sufficient FEL gain.  
We studied extensively the two-color mode with the alternation of undulator tunes at FLASH [15; 16] in 2018-2021 in the regime of a large separation of tunes spanning up to a factor of two. We developed new methods of photon diagnostics for this operation mode, including simultaneous measurements of intensity, spectral and temporal properties. The first results were published in the Proceedings of the FEL'2019 Conference [17]. Since that time, we extended our studies substantially (in particular, we developed spectral and temporal diagnostics, observed interesting new effects such as anti-correlation of pulse energies in a nonlinear regime or a significant timing jitter between two pulses, improved operation procedures). This paper summarizes the results of our studies of two-color operation mode at FLASH.