Generation of two-color x-ray free-electron-laser pulses from a beam with a large energy chirp and a slotted foil

We present a novel and flexible method to generate two-color x-ray free-electron-laser (FEL) pulses with variable color separation and time delay using a double-slotted foil on a beam with a large energy chirp. Thecolorseparationandtimedelaybetweenpulsescanbesetindependentlybytuningtheseparation between the slots and the longitudinal dispersion of a magnetic chicane. This method presents some advantages in comparison to previous proposals; it is compact, no large hardware component is needed, and no modifications of the machine settings in the FEL injector are required. Start-to-end numerical simulations for the SwissFEL case show thevalidity and tunability of our method and its application range: − 60 to þ 80 fs time delay and 0 to 3% color separation between the two pulses for a central wavelength of 0.1 nm.


I. INTRODUCTION
There is a strong demand from the users of free-electronlaser (FEL) facilities to obtain two-color radiation pulses of ultrashort durations in the x-ray regime. The delivery of two colors, either simultaneously or with a controlled time delay in a pump-probe architecture, is required to advance in multiple research fields such as material science, molecular physics, and photochemistry [1][2][3][4][5][6][7].
The central wavelength of the emitted radiation from an FEL, λ, is given by the resonance condition [8]: where λ u is the undulator period length, γ the mean Lorentz factor of the electrons, and K the field parameter of the undulator. Several schemes have been proposed, both for self-amplified spontaneous emission (SASE) and for seeded FEL sources, to produce two radiation pulses with different central wavelengths. These schemes can be generally classified into two groups, depending on whether the two wavelengths are obtained with undulator modules tuned to different K values, or with two bunches or parts of the bunch at different energies. From Eq. (1) it follows that n colors can also be generated with undulators with different period lengths λ u;n , although it is more practical to employ variable-gap undulators with the same period length able to provide different K values. The schemes of the first group are based on the fact that an electron beam with a well-defined energy sent through a series of undulator modules alternately tuned to two separated resonant frequencies (K 1 and K 2 ) generates FEL pulses of two different colors. These schemes were first theoretically studied in Refs. [9,10] and then experimentally proven, for instance in Refs. [11][12][13]. Not only two, but n colors can be generated if n undulator modules tuned to different resonant frequencies corresponding to K n are used. The implementation of the first group's schemes in the machine is easy as no section of the accelerator needs to be additionally tuned. The delay between pulses can be controlled with the use of a chicane in between the undulator modules. The wavelength tunability depends on the available range of the field parameter K for a given undulator. Variations of these alternated-undulator schemes have been developed to improve the tunability and to increase the FEL power of both pulses by using different parts of the bunch to generate the two colors. The method proposed in Refs. [14,15] uses a tilted electron beam with two undulator sections tuned at different K values and a chicane in between. In the first undulator section only the tail is well aligned and produces the first pulse. After that, the head is brought onto the axis to produce the second pulse in the second undulator section. Similarly, it has been recently proposed to produce two colors by inducing a mismatch along the bunch [16]. Feng et al. [17] combined the concepts of emittance spoiler [18] and alternated undulators to propose three layouts with variable time delays to generate two-color ultrashort x-ray pulses. Any method based on the use of undulator modules alternately tuned to two resonant frequencies has a fundamental weakness: as each color utilizes only half of the undulator line, longer lines are needed to reach saturation. Very recently an alternative method has been proposed [19], which overcomes this weakness with the use of a transverse-gradient undulator (TGU). A tilted beam sent through a double-slotted foil generates two transverse slices with the preserved emittance that will lase with different central wavelength at the TGU.
The schemes of the second group base their working principle on the use of two bunches, or parts of the same bunch, with different energies (γ 1 and γ 2 ), which are sent through an undulator set to a fixed K value to generate FEL pulses of two colors. In this manner these schemes use all the undulator modules simultaneously, thus requiring less undulator length when compared to the first group. The scheme has been realized by generating twin bunches with adjustable time at the cathode. It was first implemented at optical and infrared wavelengths [20,21] and later also proved in the x-ray regime [22,23]. Recently the emittancespoiler technique was applied to select only a narrow slice from each bunch [24]. The main limitations of the twinbunch approach are its difficult implementation in the machine, where the low-energy section needs to be retuned, and in general the limited tunability of the time and energy separation between the two pulses.
A different approach based on wakefield excitation to modify the longitudinal phase space and generate two subbunches with different energy bands (γ 1 and γ 2 ) has been proposed and validated in simulations [25]. Compared to the twin-bunch scheme it does not significantly modify the machine settings in the low-energy section, so its implementation in the accelerator is simpler. However, hardware equipment, i.e., a corrugated or dielectric structure has to be installed.
For hard x-ray self-seeded FELs, Ref. [26] proposed to use two crystals to produce two-color FEL pulses with ultra-narrow bandwidth. Later it was demonstrated that two-color self-seeded FEL radiation can be produced using two reflections of a single monochromator crystal [27]. In laser-based seeding schemes, so far only available for soft x-ray FELs, the two-color FEL pulses can be generated by twin seed laser pulses [28] or by a laser seed with an energy chirp [29,30]. The laser seed with energy chirp can also be combined with the use of an emittance spoiler, to improve tunability in pulse duration and separation [31].
We present here a new and flexible technique to generate two-color pulses with variable color separation and time delay at a SASE FEL using a double-slotted foil on a beam with a large energy chirp. This idea has been already proposed in [32] but it states that it has some limitations in comparison to other proposed methods, i.e., there is a fixed correlation between time and energy separation of the two FEL pulses with different colors. We overcome this restriction by utilizing a dispersive section just upstream of the undulator beamline, where the magnitude and direction of the dispersion can be adjusted. This enables to control whether the pulse with higher photon energy comes first or not. Moreover pulses with sub-femtosecond delays can be produced by mitigating the strong longitudinal space charge field of the almost fully compressed electron bunch with sextupole magnets.
The proposal has various advantages: there is no need to generate two individual and shorter electron bunches at the electron source, thus the electron generation is simplified with respect to previous approaches such as the twin bunch. Moreover, it is highly efficient as the full undulator chain is used by two beam slices of different energies to enable the saturation of both colors. Besides the conventional components used in a typical FEL facility, it only utilizes a retractable thin foil with slots and does not require the installation of a seed laser nor other hardware equipment, such as, for example, a corrugated or dielectric structure. Instead, the facility has to enable the tuning of the longitudinal dispersion [R 56 ¼ ds=dðΔE=EÞ] at a position where the beam has a large energy chirp.
The working principle of this technique is introduced in Sec. II. Its feasibility and tunability range have been tested in simulation for SwissFEL [33], a facility that is briefly introduced in Sec. III. The results from start-to-end numerical simulations are presented in Sec. IV, and the tunability of color separation and time delay between pulses is discussed in Sec. V. The approach presented here, however, is general and can be applied to any other FEL machine.

II. WORKING PRINCIPLE
The working principle is shown schematically in Fig. 1(a). It is based on the "slotted foil method" first described by Emma et al. in [18]. Namely, a thin foil is situated in a dispersive region of the beam path, typically at the center of a magnetic chicane. The transmission of the beam through this foil gives rise to random scattering, that is, random kicks are added to the momenta of individual particles. Since this happens within a dispersive region, the transport matrix R 52 or R 54 normally is not zero. Thus, the particles have, besides a random transverse kick, also a longitudinal shift in back-or forward direction after the chicane, smearing out the longitudinal distribution. If the foil has a slot, the slice of the bunch which passes through the slot preserves its local phase space density and a hot spot is created in the density distribution. Only this slice with preserved emittance will produce FEL radiation in the undulator. A double slotted foil can be used to generate two hot spots with a time separation, as shown in Fig. 1(b).
Standard operation of FEL facilities attempts to minimize the beam energy spread at the undulator entrance to consequently minimize the bandwidth of the produced radiation. If a double slotted foil is used and the energy chirp of the beam is completely removed, the two slices of the bunch with preserved emittance have the same relative energy at the undulators entrance, and two pulses with a certain time separation but the same wavelength are generated. Instead, if the energy chirp is not removed but rather increased, the two slices of the bunch with preserved emittance have different relative energies at the undulator entrance and the resulting two pulses are separated both in time and in wavelength. The maximum energy difference between the two slices, and therefore the maximum wavelength separation between the two FEL pulses, is given by the largest achievable chirp of the beam at the undulator entrance.
Different approaches can be used to generate an electron beam with a large energy chirp at the entrance of the undulators. For instance, Ref. [34] proposed, for the European XFEL project [35], to use the longitudinal space charge of an extremely compressed beam to generate an energy chirp, which is further enhanced in the undulator line by resistive wakefields. Alternatively, if the beam is overcompressed in the last bunch compressor (BC), that is, if head and tail of the bunch interchange their positions, the incoming energy chirp at the BC changes its sign and the wakefields of the rf structures downstream can increase the energy chirp further. An operation mode based on beam overcompression to generate a large FEL bandwidth was suggested for the first time by P. Emma [36] and investigated at the Linac Coherent Light Source (LCLS) [37]. This method is specially effective for machines with small apertures in the accelerator section, such as C-band or X-band linacs, whose small iris radii contribute significantly to the generation of large wakefields. Dielectric structures or corrugated pipes could be used to further increase the chirp of the electron beam [38][39][40], but are not considered in this work. In an earlier publication [41] we have presented a self-consistent method to maximize the energy chirp of the electron beam at the undulator entrance by optimizing the compression scheme and the electron distribution at the photoinjector in an iterative back-and-forward tracking procedure. Here we will make use of this approach for the generation of the energy chirp.
The tunabilities of the pulse duration, color separation, and time delay between pulses are important figures of merit for the different two-color schemes. The widths of the slots determine the lengths of the slices with preserved emittance, and thus the lengths of the individual FEL pulses. A practical solution to enable different pulse lengths is to build a foil with different slot widths on a translator, such that the selected slot can be driven into the beam path [18]. If the slots are designed with a V-shape, the relative energy and time separation between the two unspoiled slices can also be varied by moving the foil in the vertical direction. Thus, the color and time separations can be changed in a continuous manner. The time separation can vary between a few femtoseconds up to the electron bunch duration for two photon energies which are lying both within the energy range spawned by the total energy chirp of the bunch. No other settings of the machine need to be changed. In this way, however, the wavelength separation and time separation between the two pulses are linearly coupled. The two parameters can also be tuned independently by manipulating the R 56 of a dispersive section where the beam has its final energy chirp: the  1. Scheme of the method to generate two-color FEL pulses from two unspoiled beam slices and a large energy chirp. (a) A Vshaped slotted foil is situated at the center of a magnetic chicane, spoiling the emittance of the beam except for the slices going through the holes. (b) 2D histogram of a bunch with a large energy chirp at the entrance of the undulators for two different cases: (Top) no slotted foil is placed in the beam path, the beam has a flat current profile and a large-bandwidth XFEL pulse is generated. (Bottom) a slotted foil is placed on the beam path. All particles that do not go through the slots suffer scattering and the distribution is smeared out. Only the two bunch slices that pass through the slots are not scattered and form two current spikes that lase along the undulators. Two XFEL pulses of different colors are generated from this distribution. slotted foil position determines the energy separation of the two unspoiled slices and the longitudinal dispersion determines their time separation. As a drawback this could increase the gain in the microbunch instability [42]. However, for the range of R56 values that we are considering, comparable to other sources such as selfseeding chicanes or a typical design of a dogleg in front of the undulator line, we do not expect a significant increase of the microbunching instability.
Due to the large energy chirp, tuning the optics contributes to the compression or decompression of the beam. While decreasing the R 56 decompresses the bunch, increasing it compresses it further, reaching even overcompression. In this case the arrival of the two FEL pulses is reversed and lower energy photons arrive first, which is a feature some of the proposed two-color schemes cannot offer, since for the standard cases the electrons with higher energies arrive first, and therefore the photons with shorter wavelength come first. Only if the beam is overcompressed for a second time in the last dispersive chicane, the situation is inversed again. In the following we define the time separation to be positive for the case where the pulse with lower energy arrives first and negative in the opposite case.

III. THE SwissFEL FACILITY
SwissFEL is an XFEL facility at the Paul Scherrer Institute [33]. In its initial phase SwissFEL will produce SASE photon pulses covering a wavelength range from 1 Å to 7 Å at the hard x-ray undulator line Aramis. Different operating working modes with charges between 10 pC and 200 pC are planned, among them a large-bandwidth mode with 3 kA peak current and 3% FW bandwidth [41].
A schematic layout of SwissFEL is shown in Fig. 2. The electron bunches are generated in an S-band (2.998 GHz) rf photoinjector (gun) and accelerated by S-band rf cavities (booster). The last cavities in the booster are operated at off-crest rf phase to create an energy chirp in the bunch. The X-band (11.995 GHz) rf cavity downstream is employed to obtain a linear longitudinal beam phase-space by compensating the second-order effects of the rf curvature and the bunch compressors. The first magnetic chicane (BC1) is used to longitudinally compress the electron beam at an energy of 330 MeV. A first C-band (5.712 GHz) linac accelerates the beam up to 2.1 GeV, at which energy the second magnetic chicane (BC2) compresses the bunch further. The two C-band linacs downstream bring the beam up to the final energy of maximally 5.8 GeV. The hard-xray undulator line Aramis consists of 13 planar undulator modules with a period of 15 mm and a total length of 4 m each. The nominal gap opening is 4.7 mm, corresponding to a K value of 1.2.
A third magnetic chicane is situated at the end of linac 3, just before the undulator line. This chicane has fixed dipole angles of 1°and serves as an energy collimator. The R 56 of the chicane is controlled by the quadrupole field strengths, changing the value of the dispersion function at the location of the inner dipoles. At least three quadrupole magnets are needed to set a certain R 56 and simultaneously cancel the dispersion and its derivative at the exit of the collimator. A mirror-symmetric arrangement of quadrupole pairs around the center of the chicane is convenient to create a constant dispersion function between the inner quadrupoles and a balanced focusing in both planes. In our case, three pairs of quadrupole magnets (Q1, Q2, Q3) are installed along the energy collimator. For standard operation, the value of the R 56 of the energy collimator is zero. The arrangement of the quadrupole pairs and the variation of the dispersion function for different values of the R 56 are shown in Fig. 3 (top), together with the corresponding quadrupole strengths for each R 56 setting (bottom). The limit gradient of the quadrupoles is k 1 ¼ AE2.6 m −2 for the maximum energy of 5.8 GeV, corresponding to R 56 values between −0.6 mm and 0 mm. A pair of sextupoles (S1) is located in the legs of the chicane. In standard operation these magnets are meant to compensate second-order beam tilts in the horizontal plane and used for chromaticity correction [43]. Their limit gradient is k 2 ¼ AE149.2 m −3 for the maximum beam energy.
The slotted foil for SwissFEL is made of 3 μm thick aluminum, with a density of 2.7 × 10 3 kg=m 3 and a radiation length of 0.089 m. It is mounted on a vertical linear translator equipped with absolute encoders. It contains V-shaped slots of 0.2 mm and 0.4 mm widths, which we call narrow and wide slots, respectively. The narrow (wide) V-shaped slots have a minimum separation of 0.1 mm (0.2 mm) and a maximum of 15 mm (both). The foil also contains slots with other geometries: a tilted slot with a constant width of 0.2 mm to generate short pulses from any longitudinal slice of the beam and an equilateral triangular slot to enable a continuous variation of the pulse length. A technical drawing of the planned slotted foil is shown in Fig. 4. The foil will be placed at the center of BC2, where the nominal dispersion function has a value of −0.282 m. An alternative placement for the foil would be at the entrance of the energy collimator, before the first quadrupole [at s ¼ 4 m in Fig. 3 (top)] where the dispersion has a well defined value of −0.059 m. This alternative placement has advantages and disadvantages: on the one hand, by placing the foil at the energy collimator the transport of a scattered beam along the two linacs downstream BC2 would be prevented. On the other hand, the beam passing through the foil would have a smaller horizontal size due to a smaller dispersion value, and consequently the slices with preserved emittance would be longer relative to the total bunch length. To obtain the same results as for a foil placed in BC2 the design of the foil should be scaled down, which is mechanically more challenging. All simulations presented here were done for a slotted foil placed at the center of BC2. Another option would be to place the slotted foil in BC1. In that case, the slice selected by the slot could be shorter due to a larger dispersion function, but the spoiled beam would have to be transported through a longer section. At the end it is a trade-off between achievable slice separation and the challenge to transport the spoiled beam through the remaining of the machine.

IV. APPLICATION TO SwissFEL
We performed start-to-end tracking simulations along SwissFEL using different numerical codes. The simulations for the low-energy region, from the gun to the middle of the booster, are run using astra [44], which takes into account 3D space-charge effects. The simulations from the middle of the booster to the end of the linac, including the scattering at the foil, are performed using Elegant [45]. The SASE-FEL process along the undulator modules is simulated with the code Genesis 1.3 [46].
To maximize the energy chirp of the large-bandwidth mode we applied the procedure described in [41], which iteratively optimizes the machine settings and the initial electron distribution at the photoinjector. If no slotted foil is placed in the beam path, the resulting longitudinal distribution at the entrance of the undulators has a rather flat current profile, a bunch duration of 19 fs rms, a central slice emittance of 0.2 μm, a central energy of 5.8 GeV, and an energy chirp of 1.79% FW, which generates pulses of 3.25% FW bandwidth. When the V-shaped foil in BC2 is placed in the beam path, only the two parts of the bunch that go through the slots preserve their local phase density. All results presented in the following are generated starting from the same optimized machine settings and initial distribution.
To characterize the pulse length tunability enabled by the various slot widths (0.2 and 0.4 mm) of the V-shaped foil, we fix the energy of the two hot spots by fixing the distance between the slots and run a complete simulation. As an example, when the distance between the slots is set to 4.8 mm (dispersion at the foil position is 0.282 m) and the nominal R 56 ¼ 0 m is set at the energy collimator, we obtain two high-density regions in phase space with 1.09% energy difference and 47 fs time separation at the entrance of the undulators, as shown in Fig. 5. The corresponding slices in the current profile have rms lengths of 0.99=0.65 fs (low-energy slice/high-energy slice) when the narrow slots are used, and 1.69=1.32 fs in the case of the wide slots. Thus, slices in the beam about a factor of two longer are obtained from slots that are twice wider. The time duration difference between the low-and high-energy slice occurs owing to the effect of the higher-order terms of the beam transport matrix through the energy collimator on slices with large and opposite relative energies. To calculate the effective R 56 term we expand the nominal R 56 in Taylor series with respect to the energy deviation: The two preserved slices deviate from the mean energy with opposite sign. Thus, the effective R 56 is strongly asymmetric, since the constant term R 56 ð0Þ is close to zero in standard configuration, rendering the T 566 term dominant in Eq. (2). For SwissFEL the values of these higherorder terms are T 566 ¼ 0.0326 m and U 5666 ¼ −0.2181 m. To estimate their impact, we assume an energy deviation of 0.55%. The resulting R 56 terms are 1.73 × 10 −4 and −1.86 × 10 −4 , respectively. One pulse is further compressed while the other experiences a decompression. Using the overall chirp of about 3% and a slice duration of 0.82 fs, the final slice lengths due to the asymmetry in the effective R 56 of the energy collimator are 0.65 fs and 1.01 fs, respectively. This analytical estimate is confirmed by start-to-end simulations. The quadratic contribution from the T 566 term is visible in the phase-space distribution in Fig. 5. It could be corrected by means of the two sextupoles separated by a well defined betatron phase present in the energy collimator. However, we did not attempt to correct it in this work.
The SASE-FEL process along the Aramis undulators is simulated using ten undulator modules, enough to reach saturation from both slices, with the nominal K values of 1.2, and an average value of both β functions equal to 10 m. The results are averaged over five different runs considering different electrons' shot noise. A time separation of 47 fs is found between the two FEL pulses, as shown in Fig. 6 (top), the same separation as between the unspoiled slices of the electron beam. The rms pulse length of the emitted radiation is 0.90 AE 0.03=0.52 AE 0.03 fs (early pulse/ late pulse) for the narrow slots and 1.55 AE 0.02=1.21 AE 0.02 fs for the wide slots. Thus, the pulse length of the two FEL pulses is, as expected, very similar to the length of the spikes in the current profile. The FEL spectrum, shown in Fig. 6 (bottom), has two pulses with central wavelengths symmetrically distributed around 0.1 nm. A similar wavelength separation of 2.25%, about twice the difference in energy between the two hot spots in the longitudinal phase space distribution, is found for both slot widths.

V. DISCUSSION ON TUNABILITY
An electron distribution with a flat current profile at the entrance of the undulators prevents space-charge effects and it is typically preferred for a rather homogeneous FEL performance for all the longitudinal slices of the bunch.  However, due to the large energy chirp at the entrance of the dispersive section used to tune the time separation between the pulses, i.e., the energy collimator in the SwissFEL case, manipulations of the R 56 deform this flat profile. In such a case, the insertion of a double slotted foil in the beam path generates a current profile with a certain asymmetry between the peak currents from the hot spots.
To define the tunability limits of our method we accept a variation of the peak currents between 2 kA, enough to generate FEL radiation, and 10 kA, as for higher currents the strong space-charge effects at the peak may disrupt the FEL resonance condition.
We have investigated how far and independently we can control the time and energy separation of the two colors in the case of SwissFEL. To this end, we vary the slot separation between the minimum and the maximum values while keeping R 56 to zero. The time and energy separation of the resulting hot spots varies linearly, as shown in Fig. 7. The slope of the line changes as we tune the R 56 of the energy collimator. For negative values of the R 56 the bunch is decompressed and the slope of the electron distribution in longitudinal phase space is flatter. For positive values the bunch is further compressed and the slope is steeper. In the case of R 56 ¼ 0.8 mm the bunch is fully compressed, and for even larger values of R 56 overcompression occurs and the slope is reversed.
The present quadrupoles in the energy collimator can tune the R 56 from −0.6 mm to 0 mm when operating at 1 Å, as shown in Fig. 3 (bottom). However, for values of R 56 < −0.35 mm the bunch is so decompressed that the spikes of the current profile are lower than 2 kA. Thus, R 56 ¼ −0.35 mm becomes a practical limit. An increase of the quadrupole gradient limits to k 1 ¼ AE4.4 m −2 would enable R 56 values up to 2.5 mm, as shown in Fig. 3. For the largest values of R 56 , with R 56 ≥ 1.75 mm, a time separation below −60 fs can be achieved, but this entails an overall decompression of the bunch. A larger separation would reduce the peak current below the practical limit for FEL operation at 1 Å. As shown in Fig. 7, the practical tuning range of color separation and time delay for SwissFEL has a fan-shape with maximum time delays of −60 and 80 fs and energy separations up to 1.5%, which correspond to a wavelength tunability between 0 and 3%. Note that our proposed scheme has difficulties in obtaining two colors with large time separation and a small difference in wavelength. However, this region can be easily accessible with our method by operating in standard compression instead of overcompression. This is easier to operate since the beam quality is  preserved better and closer time separation does not need to deal with space charge problems of nearly full compressed bunches as in the overcompression case. Not all points inside the fan-shape fulfill the current limits. When the bunch is fully compressed or close to full compression, the two unspoiled slices can occur almost simultaneously (within a femtosecond). In this case the current profile has a single peak with a current higher than 10 kA, which suffers from strong space-charge effects. However, if the radiating slices could be separated transversely from the rest of the beam, two-color FEL radiation with a sub-femtosecond delay would be generated from these points. A method to mitigate the space-charge effects by forcing the transverse misalignment of a selected part of the beam is discussed in the following subsection.

A. Subfemtosecond delays
We aim to take advantage of the sensitivity of the FEL performance to slice alignment to enable two-color lasing with a zero or very short time separation. Particles in between the two hot spots do not generate FEL radiation but contribute to the space charge field, increasing the energy of the hot spot density in front and reducing it behind. The change in the central energy can compromise the resonant condition similarly to strong wakefields in the undulator. For this reason, one would want to push most of the spoiled beam to the side, so that there is less longitudinal field but more transverse. This can be seen as an effective thinning out of the beam transversely while keeping the two good slices on axis.
The transverse separation can be realized with the use of the sextupoles in the energy collimator by enhancing the nonlinear effects in the transverse phase space. An example of the transverse misalignment is shown in Fig. 8 (middle and right) compared to the standard case (left).
The interplay between the nonlinear effects generated by the sextupoles and by the higher-order terms of the energy collimator, T 566 and U 5666 , must be set up carefully to get no time separation, or a very short one. Once achieved the radiating slices are transversely separated from the rest of the beam and FEL pulses not suffering from large spacecharge effects are generated from current spikes over 10 kA. This enables the extension of the tuning range to fill the complete fan shape, as shown in Fig. 7.
In the case of SwissFEL, to get a subfemtosecond delay between the two pulses we would have to set the gradients of the sextupoles in the energy collimator to k 2 ¼ 5 × 10 4 m −3 , and the R 56 to 0.8 mm to generate full compression. With the current design of the SwissFEL sextupole magnets, these field strength cannot be achieved, and would require a replacement with stronger sextupoles. The x-z distribution at the entrance of the undulators forms the almost linear slope shown in Fig. 9 (bottom). Since the transverse beam size is increased beyond a few millimeters, a narrower aperture in the undulator line would cause beam losses. Therefore, some transverse beam collimation might be necessary. In the case of the SwissFEL beamline, the energy collimator can serve this role since its aperture limitation is typically below 2 mm, thus scraping many of the off-axis electrons away. Since it is also enclosed in shielding the losses are tolerable for operation.
The projection of the longitudinal phase-space distribution, shown in Fig. 9 (top) forms two spikes with relative energies of þ0.242% and −0.257%, but one single current peak. The resulting radiation from the undulators, shown in Fig. 10, forms two FEL pulses with 0.7 fs delay and central wavelengths separated by 0.94%. FIG. 9. Top: longitudinal phase space of the electron beam at the entrance of the undulators to generate two simultaneous pulses with a 1% color separation. Bottom: the two slices with preserved emittance are transversely aligned with the undulator axis and separated from the rest of the beam.

VI. CONCLUSION
We have presented a novel method to generate two-color x-ray FEL pulses combining the slotted foil technique and an operation mode with a large energy chirp. The method enables the selection of different pulse lengths by using slots of different widths. AV-shaped double-slotted foil can be used to tune the time and wavelength separation between the two pulses in a coupled way. Our scheme also enables the independent setting of time and wavelength separation between the pulses by tuning the R 56 of a downstream magnetic chicane. Our approach has the advantage of requiring neither large hardware components nor modifications of the machine settings in the low-energy section. Additionally it makes use of the full undulator chain, thus it is compact and lets both colors easily saturate.
Start-to-end tracking simulations based on the SwissFEL design have shown the validity and tunability range of our method: pulse lengths of 0.7 or 1.4 fs rms, pulse delays from subfemtoseconds to 80 fs, with the possibility of setting any of the colors to arrive first, and a wavelength separation between 0 and 3%. Additionally, we have shown how the use of a large-gradient sextupole in the energy collimator enables the generation of two-color pulses with subfemtosecond delay. This is achieved by transversely separating the two preserved slices, which remain aligned with the center of the undulator, from the rest of the beam.