Diffraction based Hanbury Brown and Twiss interferometry performed at a hard x-ray free-electron laser
O. Yu. Gorobtsov N. Mukharamova S. Lazarev M. Chollet D. Zhu Y. Feng R. P. Kurta J. -M. Meijer G. Williams M. Sikorski S. Song D. Dzhigaev S. Serkez A. Singer A. V. Petukhov I. A. Vartanyants
physics.optics







	Deutsches Elektronen-Synchrotron DESY, Notkestraße 85, D-22607 Hamburg, Germany

	Deutsches Elektronen-Synchrotron DESY, Notkestraße 85, D-22607 Hamburg, Germany

	Deutsches Elektronen-Synchrotron DESY, Notkestraße 85, D-22607 Hamburg, Germany
	National Research Tomsk Polytechnic University (TPU), pr. Lenina 30, 634050 Tomsk, Russia

	SLAC National Accelerator Laboratory, 2575 Sand Hill Rd., Menlo Park, 94025 CA

	SLAC National Accelerator Laboratory, 2575 Sand Hill Rd., Menlo Park, 94025 CA

	SLAC National Accelerator Laboratory, 2575 Sand Hill Rd., Menlo Park, 94025 CA

	Deutsches Elektronen-Synchrotron DESY, Notkestraße 85, D-22607 Hamburg, Germany
	Present address: European XFEL GmbH, Holzkoppel 4, D-22869 Schenefeld, Germany	

        Van 't Hoff Laboratory for Physical and Colloid Chemistry, Debye Institute for Nanomaterial Science, Utrecht University, Padualaan 8, 3584 CH Utrecht, The Netherlands
        Present address: Division of Physical Chemistry, Department of Chemistry, Lund University, 22100 Lund, Sweden.

	SLAC National Accelerator Laboratory, 2575 Sand Hill Rd., Menlo Park, 94025 CA
	Present address: U.S. Department of Energy Brookhaven National Laboratory, 53 Bell Avenue, Upton, NY 11973-5000, USA

	SLAC National Accelerator Laboratory, 2575 Sand Hill Rd., Menlo Park, 94025 CA
	Present address: European XFEL GmbH, Holzkoppel 4, D-22869 Schenefeld, Germany

	SLAC National Accelerator Laboratory, 2575 Sand Hill Rd., Menlo Park, 94025 CA

	Deutsches Elektronen-Synchrotron DESY, Notkestraße 85, D-22607 Hamburg, Germany

	European XFEL GmbH, Holzkoppel 4, D-22869 Schenefeld, Germany	

	University of California San Diego, 9500 Gilman Dr., La Jolla, California 92093, USA

    Van 't Hoff Laboratory for Physical and Colloid Chemistry, Debye Institute for Nanomaterial Science, Utrecht University, Padualaan 8, 3584 CH Utrecht, The Netherlands
    Laboratory of Physical Chemistry, Department of Chemical Engineering and Chemistry, Eindhoven University of Technology, P.O. Box 513, 5600 MB Eindhoven, Netherlands

[Corresponding author: ]ivan.vartaniants@desy.de
	Deutsches Elektronen-Synchrotron DESY, Notkestraße 85, D-22607 Hamburg, Germany
	National Research Nuclear University MEPhI (Moscow Engineering Physics Institute), Kashirskoe shosse 31, 115409 Moscow,
    Russia



We demonstrate experimentally Hanbury Brown and Twiss (HBT) interferometry at hard X-ray Free Electron Laser (XFEL) on sample diffraction patterns.
This is different from the traditional approach when HBT interferometry requires direct beam measurements in absence of the sample.
HBT analysis was carried out on Bragg peaks from the colloidal crystals measured at Linac Coherent Light Source (LCLS).
We observed nearly perfect (90%) spatial coherence and the pulse duration on the order of 11 fs for the monochromatized beam that is significantly shorter than expected from the electron bunch measurements.


41.60.Cr, 42.25.Kb, 42.50.Ar, 42.55.Vc

Diffraction based Hanbury Brown and Twiss interferometry performed at a hard x-ray free-electron laser
    I. A.  Vartanyants
    December 30, 2023
======================================================================================================



X-ray free-electron lasers (XFELs) provide extremely bright and highly coherent x-ray radiation with femtosecond pulse duration.
They find extensive applications in the wide range of scientific fields: structural biology <cit.>, solid density plasma <cit.>, matter under extreme conditions <cit.>, ultrafast photochemistry <cit.>, atomic physics <cit.> and many others.
XFEL coherence properties often significantly affect its experimental performance.
Several methods were employed to study spatial and temporal coherence, such as double pinholes <cit.>, Michelson type interferometry <cit.>, speckle contrast analysis <cit.>, and Hanbury Brown and Twiss (HBT) interferometry <cit.> (see for review <cit.>).

One important aspect that makes XFELs substantially different from all other existing x-ray sources, is the degeneracy parameter, or average number of x-ray photons in one state.
If for present high-brilliance synchrotron sources this value is about 10^-2, for the XFEL sources it can reach such high values as 10^10 <cit.>.
This makes XFEL sources similar to optical lasers, and implies possibility of non-linear and quantum optics experiments, as was first suggested by Glauber <cit.>.
This area in the FEL science is just on its early stage of development <cit.>.
At the core of the quantum optics experiments stays HBT interferometry <cit.>.
Since its first demonstration it was used, for example, to analyze nuclear scattering experiments <cit.>, to probe Bose-Einstein condensates <cit.> or to study effects of interaction on HBT interferometry <cit.>.
HBT interferometry is especially well suited to study statistical behavior of XFELs due to their extremely short pulse duration.
It allows to extract both the spatial and temporal XFEL coherence properties <cit.> as well as statistical information about the secondary beams and positional jitter <cit.>.

The basic idea of the HBT interferometry <cit.> is to determine statistical properties of radiation from the normalized second-order intensity-intensity correlation function


    g^(2)(𝐫_1, 𝐫_2) = ⟨ I(𝐫_1) I(𝐫_2) ⟩/⟨ I(𝐫_1)⟩⟨ I(𝐫_2) ⟩


obtained by measuring the coincident response of two detectors at separated positions 𝐫_1 and 𝐫_2
(see for review <cit.>).
In Eq. (<ref>), I(𝐫_1), I(𝐫_2) are the intensities of the wave field and
the averaging denoted by brackets <...> is performed over a large ensemble of different realizations of the wave field, or different pulses in the case of XFEL radiation.

In this Letter we present results of HBT interferometry performed on the Bragg peaks originating from the scattering on colloidal crystals.
Due to a small beam size and large sample-detector distance instead of the conventional sharp Bragg peaks a comparably broad intensity distribution around each Bragg peak position is measured.
Importantly, this intensity distribution depends not only on the crystal structure, but also on the incident pulse profile.
Statistical changes of the XFEL beam structure from pulse to pulse lead to corresponding changes in the observed Bragg peaks intensity distribution.
Therefore, fluctuating behavior of the Bragg peak intensity contains information about the statistical properties of the incident radiation typical for self-amplified spontaneous emission (SASE) XFELs <cit.>.
This allowed us to extract information on statistical properties of the XFEL radiation during diffraction experiment on colloidal crystals.














The measurements were performed at Linac Coherent Light Source (LCLS) in Stanford, USA at the x-ray pump probe (XPP) beamline <cit.>.
LCLS was tuned to produce pulses with 3.3-3.7 mJ pulse energy, bunch charge 0.18 nC, and pulse repetition rate 120 Hz.
An expected pulse duration from electron bunch measurements was about 41-43 fs.
The double-crystal diamond (111) monochromator at LCLS with the thicknesses of the monochromator crystals 100 μm and 300 μm split the primary x-ray beam into a pink (transmitted) and monochromatic (diffracted) branches (see Fig. <ref>(a)).
We used the monochromatic branch with the photon energy of 8 keV (1.55 Å) and relative energy bandwidth of 4.4 · 10^-5 <cit.>.
Compound refractive lenses (CRLs) focused the beam at the sample position down to 50 μm full width at half maximum (FWHM).
The number of photons in the focus was about 10^9 ph/pulse, and the experiment was performed in non-destructive mode
[This was confirmed by comparing diffraction patterns in the beginning and the end of the run.].
Colloidal crystal sample was positioned vertically, perpendicular to the incoming XFEL pulse in the transmission diffraction geometry (see Fig. <ref>(a)).
Series of x-ray diffraction patterns were recorded using the CSPAD megapixel x-ray detector positioned at the distance L = 10 m downstream from the sample consisting of 32 silicon sensors with pixel size of 110 x 110 μm^2 covering an area of approximately 17 x 17 cm^2 (see for experimental details Ref. <cit.>).



Colloidal crystal films were prepared from the polystyrene (PS) using the vertical deposition method <cit.>.
The film consisted of 30-40 monolayers of spherical particles.
Two samples were investigated: PS colloidal crystals with a sphere diameter of 160 ± 3 nm (sample 1) and 420 ± 9 nm (sample 2).

Examples of diffraction patterns measured from these crystals are shown in Fig. <ref> (b) and (c).
Bragg peaks with the six-fold symmetry originating from the hexagonal colloidal crystal structure are clearly visible in this figure <cit.>.
Intensity distributions around the Bragg peak 4 for sample 2 for three different incident pulses at the same position of the sample are shown in Fig. <ref>.
It is well seen from this figure that Bragg peak profiles for each pulse have a complicated internal structure with additional sub-peaks.
These sub-peaks have the same position from pulse to pulse but their relative intensity varies.



Projection on the horizontal axis of the same Bragg peak intensities for three selected pulses as well as an average projected intensity for all pulses is shown in Fig. <ref>(d).

In our experimental geometry we were in Fresnel scattering conditions (Fresnel number 1.7).
It can be shown (see Appendix for details) that in general case of Fresnel scattering the intensity-intensity correlation function at a selected Bragg peak is given by an expression


    g^(2)(𝐐, 𝐐')= 1 + ζ_2(σ_ω)| μ(𝐐, 𝐐')|^2  .


Here vector 𝐐 is related to a radius vector 𝐫, measured from the center of the diffraction peak, by the relation 𝐐=k𝐫/L, where k=2π/λ and λ is the wavelength
[In the following we perform evaluation in 𝐫-space.].
The contrast function ζ_2(σ_ω) introduced in Eq. (<ref>) is strongly dependent on the radiation bandwidth σ_ω.
The spectral degree of coherence μ(𝐐, 𝐐') in Eq. (<ref>) is defined as
μ(𝐐, 𝐐') = J(𝐐, 𝐐')/√(⟨ I(𝐐) ⟩)√(⟨ I(𝐐') ⟩),
where J(𝐐, 𝐐') is the mutual intensity function (MIF) determined at the detector position.
It is directly related to the statistical properties of the incident beam at the sample position by a two-dimensional Fourier transform


    | J(𝐐, 𝐐') |  = |∬ e^-i(𝐐'𝐫'-𝐐𝐫)
        J_in(𝐫, 𝐫') 𝐫𝐫'|  .


Here J_in(𝐫, 𝐫') = ⟨ E_in^(𝐫') E_in(𝐫) ⟩ is the MIF function of the incoming field at the sample position, where E_in(𝐫)  is the complex amplitude of the incident beam.

It is important to note that the contrast function ζ_2(σ_ω) in Eq. (<ref>) is defined by the monochromator settings and its value is preserved between the sample and detector positions.
This allows to connect pulse duration of the beam to coherence time of the monochromatized beam incident at the sample.
The functional dependence of the intensity-intensity correlation function as given by Eq. (<ref>) allows to study both the spatial and temporal statistical properties of the XFEL radiation by the HBT interferometry.


For correlation analysis we considered four Bragg peaks not obscured by detector gaps for each crystal (see Fig. <ref> (b-c)).
In order to exclude the influence of the electron energy jitter, only patterns corresponding to pulses with the electron energies close to the mean value were selected (in total about 50,000, see Appendix for details).
Average intensities of the Bragg peaks marked as 4 in Fig. <ref>(b-c) for both crystals are presented in Fig. <ref> (a-b).


Projections of the selected Bragg peaks on the horizontal and vertical axes were then correlated and corresponding intensity-intensity correlation functions are presented in (Fig. <ref> (c-f)).

The comparison of the intensity profiles with the intensity-intensity correlation functions reveals an interesting feature.
While intensity profiles are not smooth and contain several sub-peaks reflecting non-perfect structure of the colloidal crystals, correlation functions are almost flat in a wide central region and then drop down fast to a background level, forming a square type shape (see Appendix for details).
This is different from our earlier measurements at FELs <cit.>, when intensity-intensity correlation functions had been gradually decreasing with the distance between correlated positions.







We were able to reproduce this form of intensity-intensity correlation functions in simulations (see Fig. <ref>).
Two factors contribute to it: coherence length larger than the beam size and additional detector noise.
If a fluctuating background is present on the detector, it limits the field of view of the correlation function to the area where the intensity around the Bragg peak is larger than the detector noise.
If the coherence length of the incident beam is at least a few times larger than the size of the beam, it leads to a relatively flat intensity-intensity correlation function.
We were also able to reproduce an appearance of a small area of higher contrast observed in Fig. <ref>(e).
It can be simulated using the model of secondary beams introduced in <cit.>.
A weak secondary beam (10% of the primary beam intensity) introduced in the vertical direction (see for its characteristics Appendix) leads to a similar feature in the intensity-intensity correlation function as observed in the experiment (see Fig. <ref>(b)).
The fact that the models based on the assumption of a chaotic source describe well the behavior of the intensity-intensity correlation function supports an assumption that LCLS as a SASE XFEL can be considered as a rather chaotic source (compare with <cit.>).








Our experimental results also allowed us to determine the degree of spatial coherence of LCLS radiation for hard x-rays.
Performing similar analysis as in Refs. <cit.> we determined that the spatial degree of coherence on average for both samples and different peaks for each direction (horizontal and vertical) was about 0.90 ± 0.05 (see Appendix for details). This gave us an estimate of 81% of global transverse coherence of the full beam, which is in a good agreement with our previous observations <cit.>.



We now explore the temporal properties of the beam.
The contrast ζ_2(σ_ω) introduced in Eq. (<ref>) can be determined from the values of the intensity-intensity correlation function along the main diagonal g^(2)(x, x) (Fig. <ref>).
In our experiment it was  approximately 0.40 ± 0.05 and did not change significantly for different crystals and Bragg peaks (exact numbers for each crystal and peak can be found in Appendix).
This suggests that the influence of the crystal structure variations on our results is insignificant.
Assuming Gaussian Schell-model pulsed source <cit.> (see Appendix for details) the contrast function ζ_2(D_ω) can be expressed as


    ζ_2(σ_ω) = 1/√(1 + 4(T_rmsσ_ω)^2) ,


where T_rms is an effective pulse duration (r.m.s.) before the monochromator and σ_ω is the r.m.s. value of the monochromator bandwidth.
It is important to point out that the effective pulse duration is extracted only from the part of the beam passing the monochromator.
As such, it can be significantly shorter than that of non- monochromatized beam (see below).
In derivation of equation (<ref>) it was assumed that the spectral width of the incoming radiation is much broader than the monochromator bandwidth and spectral coherence width.
These conditions are well satisfied for the LCLS x-ray beam parameters and monocromator used in the experiment.



Inversion of equation (<ref>) gives for the FWHM of the pulse duration (see Appendix for details)



    T = 2.355/2σ_ω√(1/[ζ_2(σ_ω)]^2-1) .


Using the measured value of the contrast function ζ_2(σ_ω), we can estimate that for our experiment the pulse duration lies in the range of 11-12 fs.
These values were significantly shorter than initially expected (about 41 fs) from the electron bunch measurements.


To verify our findings we determined pulse duration by a different approach based on the mode analysis of the radiation as suggested in  Ref. <cit.>.
According to this approach an average number of modes of radiation M is inversely proportional to the normalized dispersion of the energy distribution, that in our case coincide with the contrast function defined in Eq. (<ref>) M=1/[ζ_2(σ_ω)].







We determined the number of modes by fitting intensity distribution at one of the Bragg peaks by Gamma distribution <cit.> (see Appendix for details).
As a result, the number of longitudinal modes was M ≈ 2.3±0.1 and reproducible between different runs.
Substituting this number in Eq. (<ref>) gives for the pulse duration 11.5 ± 0.5 fs in an excellent agreement to previously determined values from the HBT interferometry.
Similar inconsistency factor of about three between the expected and observed pulse duration has been observed earlier in another LCLS experiment <cit.>.

To explain the difference between thus obtained values of the pulse duration with the results of the electron bunch measurements several factors should be taken into account.
An estimate of the pulse duration from the electron bunch measurements is mainly based on the longitudinal size of the electron beam as an FEL lasing medium.
The electron beam size generally limits the maximum emitted hard x-ray pulse duration.
The FEL gain is very sensitive to various electron beam properties, such as beam emittance, electron current and energy spread, and orbit alignment inside an undulator.
These properties vary along the electron beam, which may result in a relatively short core, providing significantly better gain, compared to the rest of the beam.
Another possible explanation may be the filtering of the bunch with the strong chirp by the high-resolution monochromator <cit.>.
It was proven experimentally with cross-correlation measurements <cit.>, that 150 pC 50 fs long electron beam may radiate only 14 fs long 8.5 keV beam, which is comparable with our observations.


The coherence time τ_c can be estimated from the bandwidth of the monochromator according to Ref. <cit.> as
τ_c = √(π)/σ_ω.





The obtained value is about 7.5 fs, which is only slightly shorter than the pulse duration.
Therefore, x-ray pulses were effectively longitudinally coherent during the experiment.

In summary, we have performed HBT interferometry at the Bragg peaks originating from the colloidal crystals measured at LCLS.
This technique allowed us to extract information about spatial coherence and temporal properties of the incident beam directly from the diffraction patterns without additional equipment or specially dedicated measurements.
We have determined a high degree of spatial coherence of the full XFEL beam that was about 81% which concord with our previous measurements.
We have also observed a coherence length much larger than the beam size.
We have obtained pulse durations of 11-12 fs, which are significantly shorter than expected in the operation regime of the LCLS used in our experiment.


We also estimated coherence time for high-resolution monochromator used in our experiment and obtained the value of 7.5 fs that is just slightly below the pulse duration.
That means that LCLS pulses in our experiment were not only spatially but also temporally coherent close to Fourier limited pulses.

Our approach is quite general and is not limited to the analysis of the diffraction patterns originating from colloidal crystals.
Any other crystalline sample can be used provided Bragg peaks are sufficiently broad to allow HBT measurement.
This can be accommodated, for example, by the larger sample detector distance, or implementing a set of CRLs in the beam diffracted from the sample.

Our measurements have demonstrated high degree of spatial coherence of the FEL radiation that could potentially lead to completely new avenue in the field of quantum optics.
Such quantum optics experiments as exploration of non-classical states of light <cit.>,
super-resolution experiments <cit.>, quantum imaging experiments <cit.> or ghost imaging experiments <cit.> may become possible at the hard XFEL sources in the near future.


Finally, we foresee that HBT interferometry will become an important diagnostics and analytic tool at the XFEL sources.







Portions of this research were carried out on the XPP Instrument at the LCLS at the SLAC National Accelerator Laboratory.
LCLS is an Office of Science User Facility operated for the U.S. Department of Energy Office of Science by Stanford University.
Use of the Linac Coherent Light Source (LCLS), SLAC National Accelerator Laboratory, is supported by the U.S. Department of Energy, Office of Science, Office of Basic Energy Sciences under Contract No. DE-AC02-76SF00515.
We thank Edgar Weckert, Evgeny Saldin, Dina Sheyfer and Gerhard Grübel for useful discussions.
This work was partially supported by the Virtual Institute VH-VI-403 of the Helmholtz Association.











§ APPENDIX I. INTENSITY-INTENSITY CORRELATION FUNCTIONS OF A RADIATION FIELD SCATTERED FROM A CRYSTAL


We will consider a quasi-monochromatic x-ray beam E_in(𝐬) incident on a colloidal crystal in a shape of a thin slab of material (see Fig.<ref>).

An exit surface wave from such a crystal can be written as


    E_ESW(𝐬) = O(𝐬)E_in(𝐬)  ,


where O(𝐬) is the so-called object function and 𝐬 is the two-dimensional (2D) vector in transverse direction to the incoming beam at the position of the sample.
For a thin slab of material an object function can be expressed through refractive index n(𝐬,z) as <cit.>


    O(𝐬) = e^iφ(𝐬) ,


where φ(𝐬) = k∫_0^d(𝐬)(n(𝐬,z)-1)z is the phase difference due to refraction.
Here d(𝐬) is the crystal thickness at the position 𝐬, k=2π/λ is the wave number and λ is the wavelength.
At x-ray wavelength refractive index can be expressed as <cit.> n(𝐬,z) = 1-δ(𝐬,z)+iβ(𝐬,z), where δ(𝐬,z) is the real part of refractive index responsible for refraction and β(𝐬,z) is the imaginary part responsible for absorption.
Neglecting absorption and taking into account known relation between the real part of refractive index and electron density of the crystal <cit.> δ(𝐬,z) = λ r_eρ(𝐬,z)/k, where r_e is the classical electron radius, we obtain for the phase in the object function in Eq. (<ref>)


    φ(𝐬) = - λ r_e∫_0^d(𝐬)ρ(𝐬,z)z.


Taking into account that projection of a crystalline electron density is a periodic function we obtain that the object function in Eq. (<ref>) is also 2D periodic function.





To determine distribution of the wavefield at the detector position we will propagate the exit surface wave to that position by performing convolution with the free space propagator P_L(𝐫)


    E_d(𝐫)   = ∫ E_ESW(𝐬)P_L(𝐫-𝐬)𝐬
                        = ∫ O(𝐬) P_L(𝐫-𝐬) E_in(𝐬) 𝐬 ,


where 𝐫 is the 2D coordinate at the detector position and L is the sample-detector distance.
Propagator in Eq. (<ref>) has a known form


    P_L(𝐫-𝐬) = 1/i λ Lexp[ik(𝐫-𝐬)^2/2L]  .



Taking now into account that the object function is a 2D periodic function it can be expanded into Fourier series as


    O(𝐬) = ∑_𝐡 O_𝐡 e^i𝐡·𝐬 ,


where 𝐡 is the 2D reciprocal space vector and
O_𝐡 = 1/V ∫ O(𝐬) e^-i 𝐡·𝐬𝐬
are the Fourier coefficients of the expansion.
Substituting now this expansion in Eq. (<ref>) and considering scattering in the vicinity of a selected Bragg peak 𝐡 we obtain


    E_h(𝐬) = O_𝐡∫ e^i𝐡·𝐬 P_L(𝐫-𝐬) E_in(𝐬) 𝐬 .



Using the far-field (D^2/(λ L) ≫ 1, where D is the size of the beam at the sample position) expression of the propagator P_L(𝐫-𝐬) ≃ exp(-i𝐪_𝐫·𝐬), where 𝐪_𝐫 = k 𝐫/L we obtain from Eq. (<ref>)


    E_h^FF(𝐐) = O_𝐡∫ e^-i 𝐐·𝐬  E_in(𝐬) 𝐬 ,


where 𝐐 = 𝐪_𝐫 - 𝐡 is the momentum transfer vector calculated from the reciprocal space vector 𝐡.
For the intensity of the scattered field in the far-field we have


    I_h^FF(𝐐)   = |E_h(𝐐) |^2
                        = |O_𝐡|^2 ∫∫ e^-i 𝐐· (𝐬-𝐬') E_in^*(𝐬') E_in(𝐬) 𝐬𝐬' .


In Fresnel (near-field) regime we can not use expansion expression for the propagator and we have for the scattered amplitude


    E_h^NF(𝐐) = O_𝐡 e^iϕ_u∫ e^-i 𝐐·𝐬E_in(𝐬) 𝐬 ,


where we introduced the phase ϕ_r=k𝐫^2/(2L) and defined a new amplitude


    E_in(𝐬) = e^i (k/2L)𝐬^2 E_in(𝐬)  .


For intensity in the near-field we have


    I_h^NF(𝐐)   = |E_h^NF(𝐐) |^2
                        = |O_𝐡|^2 ∫∫ e^-i 𝐐· (𝐬-𝐬')E_in^*(𝐬') E_in(𝐬) 𝐬𝐬' .


As we can see expressions for the scattered intensities around selected Bragg peak coincide in the far-ield and near-field conditions with the change of the incoming wavefield expression to one given in Eq. (<ref>).
As soon as the difference between two cases is in the constant phase factor it would not influence statistical characteristics of the scattered field. In the following we will use far-field expression (<ref>) keeping in mind that Fresnel conditions can be matched by the substitution given in Eq. (<ref>).

We will now evaluate intensity-intensity correlation function at the detector position in the vicinity of the selected Bragg reflection 𝐡


    g^(2)(𝐐, 𝐐')
        = ⟨ I(𝐐) I(𝐐') ⟩/⟨ I(𝐐)⟩⟨ I(𝐐') ⟩ ,


where momentum transfer vectors 𝐐 and 𝐐' are centered at reflection 𝐡 and related to the spatial coordinates at the detector position by 𝐐 = k 𝐮/L and 𝐐' = k 𝐮'/L.
Averaging here is denoted by the brackets <...> and is performed over many realizations of the field.
Substituting here expression for the intensity (<ref>) we have for the nominator



	
    ⟨ I(𝐐) I(𝐐') ⟩ =
        |O_𝐡|^4
    	  e^-i𝐐· (𝐬-𝐬') - 𝐐'· (𝐬”-𝐬”')⟨ E_in^(𝐬') E_in(𝐬) E_in^(𝐬”') E_in(𝐬”)⟩𝐬𝐬'𝐬”𝐬”' .



Assuming that the incoming radiation obeys Gaussian statistics we can use Gaussian moment theorem


	
    ⟨ E_in^(𝐬') E_in(𝐬) E_in^(𝐬”') E_in(𝐬”)⟩
        = ⟨ E_in^(𝐬') E_in(𝐬)⟩⟨ E_in^(𝐬”') E_in(𝐬”)⟩ + 
    
    	+ ⟨ E_in^(𝐬') E_in(𝐬”)⟩⟨ E_in^(𝐬”') E_in(𝐬)⟩ .



Substituting now this expression in Eq. (<ref>) we obtain for the nominator


    ⟨ I(𝐐) I(𝐐') ⟩
        = ⟨ I(𝐐) ⟩⟨ I(𝐐') ⟩ +
        | J(𝐐, 𝐐') |^2  ,


where |J(𝐐, 𝐐')| is the absolute value of the mutual intensity function (MIF) defined at the detector position and related to the MIF of the incoming field
J_in(𝐬, 𝐬') = ⟨ E_in^(𝐬') E_in(𝐬) ⟩
by the following relation


    | J(𝐐, 𝐐') |^2  = |∬ e^-i(𝐐'𝐬'-𝐐𝐬)
        J_in(𝐬, 𝐬') 𝐬𝐬'|^2  .


Finally, we have for the normalized intensity-intensity correlation function (<ref>)


    g^(2)(𝐐, 𝐐')
        = ⟨ I(𝐐) I(𝐐') ⟩/⟨ I(𝐐)⟩⟨ I(𝐐') ⟩
        = 1+| μ(𝐐, 𝐐')|^2  ,


where


    μ(𝐐, 𝐐') = J(𝐐, 𝐐')/√(⟨ I(𝐐) ⟩)√(⟨ I(𝐐') ⟩)


is the normalized spectral degree of coherence.

Taking now into account that we have a finite bandwidth of radiation incoming from the monochromator we have for the intensity-intensity correlation function


    g^(2)(𝐐, 𝐐')= 1 + ζ_2(σ_ω)| μ(𝐐, 𝐐')|^2  ,


where ζ_2(σ_ω) is the contrast function which strongly depends on the radiation bandwidth σ_ω.
We will now evaluate this function in  the next section.




§ APPENDIX II. DETERMINATION OF THE PULSE DURATION FROM THE INTENSITY INTERFEROMETRY


In the HBT interferometry the contrast function ζ_2(σ_ω) for a cross-spectral pure chaotic radiation can be defined as <cit.>


    ζ_2(σ_ω) = ∬_-∞^∞ |T(ω_1)|^2|T(ω_2)|^2|W(ω_1,ω_2)|^2 ω_1 ω_2/[∫_-∞^∞|T(ω)|^2S(ω)ω]^2 ,


where |T(ω)|^2 is the monochromator transmission function, W(ω_1,ω_2) is the cross spectral density function in the spectral domain, and S(ω) = W(ω,ω) is the spectral density function.

We will assume in the following that monochromator transmission function is described by a Gaussian function with the r.m.s. width σ_ω


    |T(ω)|^2 = exp[ ω^2/2σ_ω^2]


and pulsed x-ray radiation incoming on the monochromator can be approximated by a Gaussian Schell-model beam giving for the cross spectral density function <cit.>










    W(ω_1,ω_2)  =
        W_0exp[-(ω_1-ω_0)^2+(ω_2-ω_0)^2/4Ω^2-(ω_1-ω_2)^2/2Ω_c^2]  ,


where W_0 is the normalization constant.
Here ω_0 is the central pulse frequency, Ω is the spectral width, and Ω_c is the spectral coherence width.
It can be shown <cit.> that these parameters can be related to the r.m.s. values of the pulse duration T_rms and coherence time T_c of the pulse before monochromator as <cit.>


    Ω^2 = 1/T_c^2 + 1/4T_rms^2 ;  Ω_c = T_c/T_rmsΩ .



Now substituting Eqs. (<ref> - <ref>) into the expression for the contrast function Eq. (<ref>) and performing integration we obtain


    ζ_2(σ_ω) = 2C/√(4A^2-B^2) ,


where


    A = 1/2σ_ω^2 + 1/2Ω^2 + 1/Ω_c^2 ;
    B = 2/Ω_c^2 ;
    C = 1/2σ_ω^2 + 1/2Ω^2 .


This is the general expression for the contrast function for arbitrary values of all frequencies introduced in this expression.
Now taking into account that in the conditions of our experiment at LCLS the monochromator bandwidth σ_ω and spectral coherence width Ω_c were much narrower than the spectral width Ω (σ_ω, Ω_c ≪Ω) we obtain for parameters (<ref>) the following approximate expression


    A ≃1/2σ_ω^2  + 1/Ω_c^2 ;
    B = 2/Ω_c^2 ;
    C ≃1/2σ_ω^2 .


Substituting these values in expression (<ref>) we obtain for the contrast function


    ζ_2(ω) = Ω_c/√(Ω_c^2+4σ_ω^2)
                    = 1/√(1+4(σ_ω/Ω_c)^2) .


Taking now into account that in the conditions of our experiment at LCLS coherence time of radiation before the monochromator was much shorter than the pulse duration (T_c ≪ T_rms) we obtain from Eqs. (<ref>) for the pulse duration


    T_rms≃1/Ω_c .


Substituting this expression in Eq. (<ref>) we obtain for the contrast function the following relation


    ζ_2(ω) = Ω_c/√(Ω_c^2+4σ_ω^2)
                    = 1/√(1+4(T_rmsσ_ω)^2) .


that was used in the main text of the manuscript for the analysis.
In two limiting cases T_rmsσ_ω≪ 1 and T_rmsσ_ω≫ 1 we obtain from equation (<ref>) for the contrast function: ζ_2(σ_ω) ≃ 1-2 (T_rmsσ_ω)^2 in the first case and
ζ_2(σ_ω) ≃ 1/[2(T_rmsσ_ω)] in the second.
The first case corresponds to nearly Fourier limited radiation and the second one to rather incoherent (in time-domain) radiation.


Expression (<ref>) can be inverted to determine pulse duration of the x-ray radiation before the monochromator.
For the FWHM of the pulse duration we finally have


    T =  2.355 T_rms = 2.355/2σ_ω√(1/[ζ_2(σ_ω)]^2-1) .







§ APPENDIX III. ADDITIONAL EXPERIMENTAL RESULTS


Here we present additional figures demonstrating our experimental results.
Projections of the averaged intensity on the both horizontal and vertical axes (shown in Fig. <ref>) reveal presence of the small subpeaks due to the defect structure of the colloidal crystal.
Cross sections of the intensity-intensity correlation function along the white line in Fig. 3 in the main text (see Fig. <ref>) demonstrate a relatively flat region in the center and a steep slope after that.














§ APPENDIX IV. SIMULATION OF THE INTENSITY-INTENSITY CORRELATION FUNCTIONS


The model used for simulations in this work was first introduced in Ref. <cit.>.
In this model, the X-ray beam is assumed to consist of several statistically independent Gaussian Schell-model beams with the total complex field amplitude


    E_Σ(𝐫,ω)=
    ∑_i=1^N E_i(𝐫,ω) ,


where E_i(𝐫,ω) is a complex amplitude of a single beam.
Since all beams are statistically independent, the total spectral cross-correlation function W^(2)_Σ(𝐫_1,ω_1,𝐫_2,ω_2) and spectral density S_Σ(𝐫,ω) can be expressed as


    W^(2)_Σ(𝐫_1,ω_1,𝐫_2,ω_2)    =    ∑_i=1^NJ_i(𝐫_1, 𝐫_2)W_i(ω_1, ω_2) , 
    
    S_Σ(𝐫,ω)    =    ∑_i=1^NI_i(𝐫)S_i(ω) .


Intensity-intensity cross-correlation function is than calculated as obtained in Ref. <cit.>


	
    g_Σ^(2)(𝐫_1,𝐫_2)
    	=1+
    
    	+∑_i,j=1^NJ_i(𝐫_1,𝐫_2)J^*_j(𝐫_1,𝐫_2)∬_-∞^∞|T(ω_1)|^2|T(ω_2)|^2  W_i(ω_1, ω_2)W^*_j(ω_1, ω_2)ω_1 ω_2/∑_k, l = 1^NI_k(𝐫_1)I_l(𝐫_2)∫_-∞^∞|T(ω_1)|^2 S_k(ω_1)ω_1∫_-∞^∞|T(ω_2)|^2 S_l(ω_2) ω_2 .




The model for simulating the fluctuating detector background was also introduced in Ref. <cit.>.
The total intensity can be represented as


    I(x) = I_0(x) +I_B(x)  ,


where I_0(x) is the intensity of the beam and I_B(x) is the background intensity.
The background signal is assumed to be statistically independent from the beam intensity fluctuations.
It is then possible to express the normalized intensity-intensity correlation function modified by fluctuating background as


    g^(2)(x_1, x_2) = ⟨ I_0(x_1) I_0(x_2) ⟩ + ⟨ I_B(x_1) I_B(x_2) ⟩ + ⟨ I_0(x_1)⟩⟨ I_B(x_2) ⟩ + ⟨ I_B(x_1)⟩⟨ I_0(x_2) ⟩/(⟨ I_0(x_1)⟩+⟨ I_B(x_1)⟩)(⟨ I_0(x_2) ⟩+⟨ I_B(x_2)⟩),


where the ensemble average ⟨ I_0(x_1) I_0(x_2) ⟩ = g_Σ^(2)(x_1,x_2)·⟨ I_0(x_1)⟩⟨ I_0(x_2)⟩.
The background average intensity and intensity-intensity correlation function are assumed to have the form


    ⟨ I_B(x) ⟩    =     C ,
    ⟨ I_B(x_1) I_B(x_2) ⟩    =     C^2(1+Aδ_x_1,x_2)  ,


where C<<max(I_0) and the background signal is therefore not significant in the center of the beam.


	
	
	
	


The final expression that was used for modeling as it follows from Eqs. (<ref> - (<ref>)) has the form


    g^(2)(x_1, x_2) = g_Σ^(2)(x_1,x_2)⟨ I_Σ(x_1)⟩⟨ I_Σ(x_2)⟩ + C^2(1+Aδ_x_1,x_2) + C ⟨ I_Σ(x_1)⟩ + C ⟨ I_Σ(x_2) ⟩/(⟨ I_Σ(x_1)⟩+C)(⟨ I_Σ(x_2) ⟩+C).



In simulations we used two models (see Table <ref>): one in the horizontal direction consisting of a single beam with the size (r.m.s.) 1.6 mm and coherence length 10 mm and second one in the vertical direction consisting of two beams shifted by 1.5 mm and with the relative intensity of 10%.
The background level was considered to be 2% of the total intensity in both cases and parameter A in Eq.(<ref>) was taken as A=0.125.
All further details of all parameters in both models are listed in Table <ref>.



§ APPENDIX V. SPATIAL DEGREE OF COHERENCE AND CONTRAST VALUES


Our experimental results also allowed us to determine the degree of spatial coherence ζ_S of LCLS radiation for hard x-rays.
Similar to our previous work <cit.>, we obtained this value by applying the following relation


    ζ_S = ∫| W(𝐫_1, 𝐫_2)|^2 d𝐫_1 d𝐫_2/(∫⟨ I(𝐫) ⟩ d𝐫)^2
    = ∫| μ (𝐫_1, 𝐫_2)|^2 ⟨ I(𝐫_1) ⟩⟨ I(𝐫_2) ⟩ d𝐫_1 d𝐫_2/(∫⟨ I(𝐫) ⟩ d𝐫)^2


and substituting values of | μ (𝐫_1, 𝐫_2)| obtained from the HBT interferometry analysis.
Performing this analysis we determined the spatial degree of coherence for each Bragg peak for both samples see Table <ref>.

Evaluation of the contrast values was performed based on their values determined from the main diagonal of intensity-intensity correlation function g^(2)(x, x).
As a final value the mean value of g^(2)(x,x) over the region of FWHM of the averaged Bragg peak intensity ⟨ I(x) ⟩ was considered.



	
	








§ APPENDIX VI. MODE ANALYSIS AND ELECTRON BUNCH ENERGY FILTERING


Jitter in the energy of the electron bunch introduces additional problem for the analysis of the monochromator filtered radiation.
If electron bunch energy of a pulse is significantly different from an average, the central wavelength of the pulse is too far removed from the monochromator transmittance band.




In such a case pulse intensity after monochromator will be significantly reduced, affecting observed statistics.
This is clearly observed in Fig. <ref>, where the distribution of pulse intensities and corresponding electron bunch energies is shown.

Therefore, it is important to filter the collected pulses by bunch energy.
The filtering was performed by choosing only the pulses for which


    E_el-⟨ E_el⟩ < σ_E_el/2  ,


where E_el is the electron bunch energy and σ_E_el^2 is the energy dispersion (see Fig. <ref> for the region considered for the following analysis).
Around 50,000 pulses were left in each run after the filtering.
The difference in the intensity distribution because of filtering can be seen if Fig. <ref>, where the histogram of the inegrated intensity from the Bragg peak in the diffraction pattern before and after the electron bunch filtering is shown.
The number of modes is clearly underestimated without filtering.





The pulse duration was also determined by using the mode analysis of the radiation as suggested in  Ref. <cit.>.
According to this approach an average number of modes of radiation M is inversely proportional to the normalized dispersion of the energy distribution, that in our case coincide with the contrast function defined in Eq. (<ref>) M=1/[ζ_2(σ_ω)].
Substituting this relation in Eq. (<ref>) we obtain for the pulse duration


    T = 2.355/2σ_ω√(M^2-1) .


We determined the number of modes by fitting integrated intensity distribution at one of the Bragg peaks by Gamma distribution <cit.> (see Fig. <ref>).
As a result, the number of longitudinal modes was M ≈ 2.3±0.1 and reproducible between different runs.
Substituting this number in Eq. (<ref>) gives for the pulse duration 11.5 ± 0.5 fs.






