The role of the coherence in the cross-correlation analysis of diffraction patterns from two-dimensional dense mono-disperse systems

The investigation of the static and dynamic structural properties of colloidal systems relies on techniques capable of atomic resolution in real space and femtosecond resolution in time. Recently, the cross-correlation function (CCF) analysis of both X-rays and electron diffraction patterns from dilute and dense aggregates has demonstrated the ability to retrieve information on the sample’s local order and symmetry. Open questions remain regarding the role of the beam coherence in the formation of the diffraction pattern and the properties of the CCF, especially in dense systems. Here, we simulate the diffraction patterns of dense two-dimensional monodisperse systems of different symmetries, varying the transverse coherence of the probing wave, and analyze their CCF. We study samples with different symmetries at different size scale, as for example, pentamers arranged into a four-fold lattice where each pentamer is surrounded by triangular lattices, both ordered and disordered. In such systems, different symmetry modulations are arising in the CCF at specific scattering vectors. We demonstrate that the amplitude of the CCF is a fingerprint of the degree of the ordering in the sample and that at partial transverse coherence, the CCF of a dense sample corresponds to that of an individual scattering object.

The X-ray or electron diffraction pattern of a single crystal exhibits distinct peaks whose intensities and positions can be used to deduce the crystal symmetry and structure. For such a crystallographic experiment, the transverse coherence of the probing wave needs to be just larger than the interatomic distances. This allows the coherent addition of the waves scattered from adjacent atoms which in turn, depending on the phase difference, results in either constructive or destructive interference in the far-field. The large number of atoms in a crystal ensures the high intensity of the peaks created by the constructive interference. On the other hand, the diffraction from a non-crystalline disordered system gives a diffraction pattern that exhibits concentric rings at characteristic scattering vectors which are attributed to the geometrical parameters of the unit cell. The recovery of the sample distribution or even its basic parameters, such as the symmetry, from such a diffraction pattern is a more complex task than in the case of a single crystal.
In 2009, Wochner et al. demonstrated that the analysis of the angular cross-correlation functions in a diffraction pattern can reveal hidden symmetries in a non-crystalline sample 1 . They studied a colloidal suspension of polymethylmethacrylate (PMMA) spheres of 117 nm in radius by recording its diffraction pattern with partially coherent X-ray radiation of 0.154 nm wavelength. The diffraction pattern exhibited rings typical of a disordered system. However, the cross-correlation of the intensities along the azimuthal angle revealed pronounced modulations at certain scattering vectors that corresponded to characteristic periodicities in the sample. With their work Wochner et al. triggered the application of X-ray Cross-Correlation Analysis (XCCA) for revealing local symmetries in disordered systems [2][3][4][5][6] .
The idea of using the angular cross-correlation functions (below we refer to it as cross-correlation function (CCF)) for the determination of the structure of single particles in dilute solutions was originally proposed by Kam in 1977 7 . In Kam's approach, a spherical harmonics expansion of the scattered amplitudes was employed to recover the structure of an individual particle in solution. However, this approach was not fully explored until recently when it has been revised both theoretically [4][5][8][9][10][11][12] and experimentally 10,[13][14][15][16] . It has been shown that the diffraction pattern of an individual particle can be extracted from the average over many diffraction patterns of a diluted ensemble of randomly oriented particles. This method uses the assumption that the interference between the waves scattered from different particles is negligible. To achieve this condition, thousands of coherent diffraction patterns with just a few particles in the scene (diluted sample) are summed up. Thus, the effect of the interference between the waves scattered from the particles is averaged out in the limit of an infinite number of images. The method of single-particle structure retrieval by the calculation of the cross-correlation functions is considered to be an alternative approach to a crystallographic experiment without the need of having a crystal 10 .
In general, structure retrieval methods using the cross-correlation analysis of a diffraction pattern require partial transverse (spatial) coherence of the probing beam. In practice electron and X-ray sources have partial coherence. Here, and throughout in the text, we refer to transverse coherence as coherence. The effect of infinite and partial coherence on the XCCA and single particle retrieval methods for two-dimensional dilute samples have been studied by Kurta et. al. 3 . They have shown that the diffraction pattern of a sample consisting of 121 randomly distributed and randomly rotated pentagons (300 nm in size) exhibits no distinct peaks but only rings when it is acquired at infinite coherence. The effect of the partial coherence was studied on a sample consisting of 11 pentagons preferably oriented and therefore exhibiting peaks in the diffraction pattern. The coherence length was selected to be 1200 nm, 600 nm and 300 nm. As the coherence decreased, the contribution from the interference between the particles decreased, and as a result, peaks associated with the local structure got higher contrast. However, the effects of partial coherence have not been studied on dense samples of many particles, which is a practically interesting situation.
In our work we study dense and dilute samples of relatively large number of identical particles. As previously defined in the literature 2-3 , we call dilute sample a sample where the distance between the local structures is much larger than their size, and dense sample a sample where the distance between the local structures is of the order of their size. We consider spherical particles of 5 nm in diameter arranged into domains and into an ordered lattice. We also consider the same spherical particles but assembled into pentamers that are randomly distributed and rotated thorough the dense sample. Pentamers are interesting five-fold symmetry object of investigation, which have been of particular interest since Wochner et al. reported odd symmetries in the CCF 1 . We provide a detailed numerical study of the diffraction patterns and of the related CCFs for dense two-dimensional systems at different coherence of the probing wave, from infinite coherence to the coherence length comparable to the size of single particle.

Methods
CCF definition, properties and amplitude. An example of a dense system is shown in Fig. 1(a), which is an experimental image of an alkanethiol-capped gold nanoparticles supracrystal deposited on a copper grid covered with an amorphous carbon substrate, taken with Trasmission Electron Microscopy (TEM). Figure 1(b) exhibits a cartoon model of a selected fragment of the gold nanoparticles arrangement with their interdigitated ligands. In this disordered sample, both nanoparticles and ligand atoms can be arranged into sub-ordered structures, see for example Fig. 1(c). Though a Debye-Scherrer diffraction pattern is expected from such a disordered sample, the cross-correlation analysis can reveal the symmetries present in the sample, as for example, the periodical arrangement of the atoms. The cross-correlation analysis requires partial coherence of the probing beam. For this reason, we study the diffraction patterns of this supracrystal at the partial coherence of the probing wave L coh = 5, 10, 20 nm and infinity. The relative sizes of the examined coherence lengths are color coded in Fig. 1(d). An intensity distribution in the diffraction pattern at a certain scattering vector s is extracted and shown in Fig. 1(e). It is worth pointing out that already the intensity distribution contains a modulation specific to the sample symmetry, but this information is often buried under the noise and can only be revealed by calculating the CCF from the azimuthal intensity distribution, see Fig. 1 We define the CCF as proposed by Wochner et al. 1 : where s is the component of the scattering vector  s that is perpendicular to the direction of the incident beam, ϕ is the azimuthal angle at a certain s, as illustrated in Fig. 1(e), and ... means averaging over ϕ: All CCFs shown in this manuscript are simulated using equation (1) and the related MATLAB code is provided in the Supplementary Note. Some of the properties of ( , ∆) C s include: (1) ( , ∆) C s has always maximum at ( , ) C s 0 .  The amplitude of the CCF can be a critical parameter when the CCF is extracted from noisy experimental data. The total intensity in the far-field can be represented as following: where U p is the complex-valued scattered wave by particle p, where p = 1..P. The total number of particles is P. Equation (4) can be re-written in expanded form: where the intensity distributions are re-written in (s, ϕ) coordinates. In equation (5), the second term is the result of the interference between the waves scattered off the different particles. For very short coherence length, in an extreme case-comparable to the size of the particle, the second sum "Interference term" can be neglected and only the first sum remains. We use this approximation ("Interference term" = 0) in the following formulas. Next, we assume that the particles are identical but randomly rotated. The intensity of the wave scattered from a single particle is given by I 0 (s, ϕ) and the intensity of that from a rotated particle is given by I 0 (s, ϕ + α ). The total intensity is then: The Fourier expansion of the diffraction pattern of single particle is given by: To calculate the CCF of the particles ensemble, given by equation (1), we write its components:  Thus, the result of equation (10) can be written as: We substitute the results of equation (9) and equation (13) into equation (1) and obtain the CCF: Thus, according to equation (14), the CCF of the particles ensemble is proportional to the CCF of the single particle and inversely proportional to the number of particles P. This, however, is only true when the coherence effects can be neglected or when the coherence length is comparable to the particle size. In a dense sample that approximation holds if the coherence length is shorter than the particle-particle distance. When the sample is dense and the probing beam is partially coherent, higher values of the CCF amplitude are expected.
Simulations at partial coherence. The coherence properties of the probing beam are conventionally characterized by the mutual coherence function, or the complex coherence factor: , where the averaging is performed over a time T which is much longer than the fluctuation time of ( , )  E r t 1 , ( )  I r 1 and ( )  I r 2 are the intensity values of the incoming beam at points  r 1 and  r 2 . Though the exact mutual coherence function is often complicated, it can be assumed in the form of a Gaussian distribution 17,18,19 : where L coh is the coherence length. The diffraction pattern obtained with a partial coherence can be directly simulated as the convolution 3,18-19 : is the diffraction pattern obtained at infinite coherence, and µ ( )  s is the Fourier transform of the mutual coherence.
Using equations (16) and (17), Vartanyants et al. 18 have simulated the partial coherent diffraction pattern of a diluted sample consisting of particles arranged into a two-dimensional array. The diffraction pattern obtained at an infinite coherence length exhibited Bragg peaks, and at a coherence length comparable to the size of the single particle, the diffraction pattern turned into the diffraction pattern of a single particle. Those simulations thus relate well to the typical experimental observations. However, in the case of a dense sample, equations (16) and (17) fail to correctly simulate the diffraction pattern at partial coherence, as illustrated below. Therefore, for the simulations of the diffraction patterns at limited coherence length, we avoid the convolution and apply the particle-by-particle algorithm also explained below.
Diffraction pattern of a monodisperse sample. The diffraction pattern of the entire sample is given by: is the distribution of the particle p and P is the total number of particles. Assuming that all particles are identical, from which ( ) = ( ) we can re-write equation (18):  r p are the coordinates of the particle p. By substitution − = ′    r r r p , we obtain: Equation (21) describes the diffraction pattern of a sample consisting of identical particles. The first factor in equation (21) is the diffraction pattern of an individual particle |U 1 | 2 . The second factor in equation (21) in the case of a coherence length L coh comparable to the size of one particle is just the number of particles P. In the case of an infinite coherence, the diffraction pattern can be calculated simply by Fourier transform of the sample distribution.
Simulation of diffraction patterns at partial coherence. In the case of a dense sample, the convolution approach given by equations (16) and (17) fails to correctly simulate the diffraction pattern at partial coherence, as illustrated in Fig. 2. The reason is that the Fourier transform of ( )  I s coh is the auto-correlation of the object distribution, which in turn is also a dense distribution. For example, for a dense lattice of spheres, its autocorrelation distribution is also a dense lattice of spherical spots, and the spots are so close that even the central spot contains signal from adjacent spots. In the convolution approach, the auto-correlation distribution is multiplied by the Fourier transform of µ ( ),  s which is the mutual coherence function given by equation (16) and has Gaussian distribution shape. When L coh is so short that it is just limited to the size of single particle, the product of the Fourier transform of ( )  I s coh with the Fourier transform of µ ( )  s should be limited to just the central spot. However, there will be a contribution from adjacent spots and, due to the finite sampling, the symmetry of the arrangement of those spots will show up in the resulting convolution. An example is illustrated below in Fig. 2. The test sample, consisting of spheres of 5 nm in diameter organized into a perfect lattice, is shown in Fig. 2(a,b), and its diffraction pattern at infinite coherence length of the probing wave is shown in Fig. 2(c). When the coherence length is equal to the size of the particle, the expected diffraction pattern is the diffraction pattern of a single particle multiplied by the number of particles in the sample, as follows from equation (21). Thus, for the sample consisting of 5 nm spheres, when L coh = 5 nm, the diffraction pattern should exhibit concentric rings. This situation is correctly simulated by the particle-by-particle algorithm (explained below), as shown in Fig. 2(d) and it is not correctly simulated by applying the convolution given by equations (16) and (17), as shown in Fig. 2(f,h). At L coh = 5 nm, the distinct peaks are still observed in the simulated diffraction pattern, see Fig. 2(f). At L coh = 2.5 nm, the peaks are blurred out, however no concentric rings but some six-fold structure is emerging, see Fig. 2(h). To validate the correctness of the convolution routine given by equations (16) and (17), we simulated diffraction pattern of the same sample as in the work by Vartanyants and Robinson 18 at infinite and partial coherence and verified that the diffraction pattern indeed turned into the diffraction pattern of a single particle when the coherence is decreased. Thus we concluded that the method of simulating the diffraction patterns at partial coherence by convolution gives correct results only in the case of diluted samples. Therefore, for the dense samples investigated in this work we applied the particle-by-particle algorithm as explained below. Particle-by-particle simulation of diffraction patterns in the case of partial coherence. Each particle p is assigned its (x p , y p ) coordinates. The sum given by equation (21) is calculated over all the particles as following.
1. For the first particle, p = 1, the self-interference term is calculated: Only the particles whose coordinates are within L 4 coh distance from the particle p are considered. L 4 coh is selected as the cut-off distance, as according to the mutual coherence distribution given by equation (16) only and the input of the interference term is negligible. For those particles, whose coordinates satisfy equation (23), the interference term is calculated: The second term in equation (24) is given by: , ,   coordinates.The results obtained in (i) and (ii) are added.
3. The coordinates of the particle p = 1 are eliminated from the array x p and y p , and thus the previously second particle becomes the first particle. The loop returns to step (i).
The related MATLAB code is provided in Supplementary Note.

Results
Sample consisting of spheres of 5 nm in diameter. Spheres arranged into randomly rotated domains. The sample simulated here is mimicking the two-dimensional supracrystal of gold nanoparticles of about 5.7 nm in diameter separated by 7.63 nm studied experimentally by Mancini et al. 20 . The dense sample simulated here consists of P = 13404 spheres of 5 nm in diameter arranged into perfect triangular lattice with sphere-to-sphere distance of d 0 = 7 nm. The sample size is 1000 nm × 1000 nm and its distribution is sampled with 4000 × 4000 pixels. Within the sample, round domains of 40 nm in diameter are created (326 domains in total); the position of each domain is randomly generated. Within each domain, the particle distribution is rotated and the rotation angle is also randomly generated. In addition, each particle is randomly shifted from its position by up to 1 nm. The distribution of a portion of the sample is shown in Fig. 1(d), which also gives an idea about the compatibility between the particles, domain sizes and the coherence length. The diffraction patterns of the sample simulated at different coherence length are shown in Fig. 3(a-c), and in Fig. 1(e) for L coh = 10 nm. The intensity is obtained in counts per pixel (CPP) units. In the simulations we assumed that 1 electron scattering event results in 1 count per pixel, which in a real experiment depends on the efficiency of the detecting system. At any coherence length, no distinct peaks are observed. In the case of a coherence length larger than the sample area dimension, which we call an infinite coherence length L coh = ∞, the diffraction pattern is simulated simply by the Fourier transform of the transmission function of the sample (electron density of the sample in the case of X-ray imaging), as shown in Fig. 3(a). At infinite coherence length, no modulations are observed in the CCF, as shown in Fig. 3(d). The two spikes at Δ = 0° and Δ = 180° are numerical artefacts as the azimuthal intensity distribution is matching itself when shifted by 0° and 180°. At partial coherence, six-fold modulations are clearly observed in the CCF at low s, see Fig. 3(e-g). These modulations are caused by the arrangement of the spheres. Spheres within one domain are arranged as triangular lattice with the distance between the spheres cores of d 0 = 7 nm, which contains crystallographic planes that are apart from each other by = ⋅ / = . ; the crystallographic planes are shown in Fig. 1(d). This gives the related s values s 1 = 2π /d 1 = 1.03 nm −1 and s 2 = 2π /d 1 = 1.8 nm −1 , at which the modulations are observed. Even at low coherence of L coh = 5 nm, where the diffraction pattern resembles that of a single particle, the characteristic six-fold modulations are still observed in CCF, see Fig. 3(c,g). This is because a probing wave with L coh = 5 nm still provides sufficient coherence to cause interference effects between neighbouring particles.
The amplitude of the CCF, as it can be seen from Fig. 3(h), is about 2·10 −7 a. u. According to the theoretical prediction for the amplitude of the CCF given by equation (14), the expected maximum is given by the CCF of the single particle/P and equals to 2·10 −7 /13404 = 1.5·10 −11 . However, the CCF of a single particle, shown in Fig. 3(h) exhibits a very low amplitude. This is because the diffraction pattern of a perfect sphere consists of perfect rings without any modulations and as a consequence there are no modulations in the CCF. The signal in the CCF of a single particle is just numerical noise due to the finite sampling. However, we can assume that the amplitude of the CCF of a single particle, shown in Fig. 3(h), is around 1 and with this approximation the expected amplitude of the CCF, according to equation (14), is about 1/P = 7.53·10 −5 . Thus, the theory predicts the CCF values to be in the range: 7.53·10 −5 -1.5·10 −11 . However, from the graphs we see the following amplitudes of the CCF: L coh = 20 nm: amplitude of CCF 4.0·10 −3 a.u., L coh = 10 nm: amplitude of CCF ≈ 1.7·10 −3 a.u., and L coh = 5 nm: amplitude of CCF ≈ 3.5·10 −4 a.u. These values are orders of magnitude higher than expected. However, they can be explained if we consider each domain of ordered particles as a "particle" itself. This, according to equation (14), gives for the amplitude of the CCF approximately 1/number of domains = 1/326 = 0.003, which agrees better with the observed amplitudes of the CCFs. It is interesting to note that the scattering vector s 1 , where the modulations are observed, is related to the distance between the crystallographic planes within a domain or, in other words, to the distances between the particles. But the amplitude of the CCF is proportional to 1/number of domains.
Thus, our explanation for the large CCF values is the presence of local ordering throughout the entire sample. To verify this idea we provide another example of a completely ordered sample. Spheres arranged into a perfect triangular lattice. The sample here consists of P = 4617 spheres arranged into a perfect triangular lattice with a sphere-to-sphere distance of d 0 = 7 nm. The CCF plotted at the same s 1 = 1.03 nm −1 are shown in Fig. 4.
The expected amplitude of the CCF, according to equation (14), amounts to approximately 2·10 −7 /4617 = 4.3·10 −11 . And again, if the amplitude of the CCF calculated for a single sphere was around 1, the expected amplitude of the CCF of the sample would be 1/P = 2.2·10 −4 . Thus, the amplitude of the CCF should be in the range: 2.2·10 −4 -4.3·10 −11 . However, from the graphs plotted in Fig. 4 we see the following amplitudes: L coh = 20 nm: amplitude of CCF ≈ 5, L coh = 10 nm: amplitude of CCF ≈ 2, L coh = 5 nm: amplitude of CCF ≈ 0.5, and L coh = 2 nm: amplitude of CCF ≈ 4·10 −5 . These are very high values, which cannot be explained by equation (14). Equation (14) can only explain the result at L coh = 2 nm, where the interference effects are truly negligible, the very approximation employed in equation (14).
Thus, the amplitude of the CCF can have higher values than expected from the rule 1/P, and the reasons are: (1) (amplitude of CCF ~ 1/P) only holds when the interference effect can be neglected. This is not the case when even weak coherence is present. (2) Presence of ordered regions can also dramatically affect CCF amplitude. In this case, the amplitude of the CCF can be proportional to 1/number of ordered regions.
These observations can explain the relatively high values of the amplitude of CCF for dense samples reported previously 1,20 . Wochner et al. reported CCFs which are showing modulations in the range of − 0.02 to + 0.02. This would mean that the number of particles in the probing volume is about 1/P = 1/0.02 ~ 50 particles. In their experiment, Wochner et al. had a probing beam of 10 microns in diameter and 100 nm in diameter spheres arranged into 12 spheres clusters (each cluster is approximately 250 nm in diameter) distributed in a three-dimensional volume 1 . Thus, these experimental parameters provide a much larger number of particles in the probing volume than just 50 particles. This mismatch can be explained by our observations that the simple rule CCF ~ 1/P does not apply in the case of a dense system probed with a partially coherent beam.
Pentamers. Next, we consider the same spherical particles of 5 nm in diameter assembled into pentamers, as shown in Fig. 4(a). Five-fold symmetry is an interesting object of investigation, as it is forbidden in the long-range in crystals but can be found on the short-range scales within disordered systems 21   some very specific scattering vectors. The remarkable observation of odd symmetry modulations in the CCF triggered further research on two-dimensional distributions of five-fold symmetrical objects 2-6 , reporting only even symmetries in CCFs extracted from their diffraction patterns. Altarelli et al. showed that for two-dimensional disordered systems only even Fourier components of the CCF give nonzero contributions 2 . The diffraction pattern of a three-dimensional distribution of odd-symmetrical objects (oxygen clusters) was simulated by Kurta et al. 5 , showing that odd symmetries can be observed when the curvature of the Ewald sphere is taken into account. In our simulations the pentamers are arranged with different distributions: (i) randomly distributed and rotated pentamers (ii) ordered pentamers surrounded by a fine periodic lattice and (iii) randomly distributed and rotated pentamers surrounded by a fine periodic lattice.
Pentamers of spheres of 5 nm, randomly distributed. In this subsection we consider a sample consisting of P = 843 pentamers. The pentamers are randomly distributed and randomly rotated throughout the sample of 500 nm × 500 nm in size, see Fig. 5(a). The CCFs are calculated from the simulated diffraction patterns simulated at partial coherence L coh = 20 nm, 10 nm and 5 nm are shown in Fig. 5 (b-d).
No distinct peaks are observed in any of the simulated diffraction patterns. At infinite coherence length of the probing wave, also no modulations are observed in the CCF distribution, see Fig. 5(b-d). However, at partial coherence, the CCFs exhibit ten-fold modulations pronounced at low s values, as for example the maxima at s 3 = 1.4 nm −1 and s 4 = 2.4 nm −1 thus indicating the presence of five-fold symmetry in the sample, see Fig. 5(b-d).  the real-space length of 4.8 nm and 2.9 nm, respectively, which however do not match any length related to pentamers arrangement. However, the maxima of the intensity observed in the diffraction pattern at s 3 = 1.4 nm −1 and s 4 = 2.4 nm −1 relate well with the maxima of the intensity in the diffraction pattern from an aperture whose diameter equals to the outer diameter of the pentamer, in our case, 12 nm.
From the graphs plotted in Fig. 5 we see the following amplitudes at s 1 : L coh = 20 nm: amplitude of CCF ≈ 6·10 −3 , L coh = 10 nm: amplitude of CCF ≈ 1·10 −3 , and L coh = 5 nm: amplitude of CCF ≈ 1.5·10 −4 , which agrees well with 1/number of pentamers = 1/843 = 1.12·10 −3 . These results are in agreement with the observation by Kurta et al. 3 : as the coherence decreased, the peaks associated with the local structure become more pronounced. Though the pentamers are all randomly oriented and no peaks are observed in the diffraction pattern at characteristic s, the CCF analysis helps to extract modulations at characteristic s which are related to the symmetry (five-fold) of the local structure. It is remarkable that at partial coherence, the CCF of the entire sample resembles the CCF of an individual pentamer, compare Fig. 5(b-d), which has been previously discussed by Vartanyants and Robinson 18 . Therefore, it should be possible to extract a diffraction pattern of an individual pentamer from the diffraction pattern of a dense sample via XCCA analysis, as previously mentioned by Kurta et al. 4 .

Pentamers of spheres of 5 nm surrounded by regular lattices, ordered.
To study the appearance of different symmetries under different coherence length conditions, we created a diluted sample organized as following. The pentamers (P = 206) are organized into a 4-fold lattice with the distance between pentamers being 30 nm. The total sample size is 500 nm × 500 nm. Around each pentamer there is a triangular lattice of point scatterers, with the distance between two closest scatterers being 2 nm. The sample is shown in Fig. 6(a). The diffraction pattern at infinite coherence was simulated by the Fourier transform of the sample; the diffraction patterns at partial coherence were simulated by convolution with the mutual coherence function, as given by equations (16)(17). At infinite coherence length, see Fig. 6(b), the peaks from all symmetries are observed in the CCF: the six-fold peaks at large s, ten-fold peaks at intermediate s and four-fold peaks at small s. As the coherence length decreases, the four-fold peaks disappear, but the six-and ten-fold peaks remain, see Fig. 6(b-d). The ten-fold modulations are observed  Fig. 1(d). The related s values are thus: s 5 = 2π /d 5 = 3.63 nm −1 and s 6 = 2π /d 6 = 6.28 nm −1 . Also, the second order of diffraction from the planes d 5 is observed at s 7 = 7.26 nm −1 . At these s values, six-fold modulations are pronounced even at low coherence L coh = 5 nm, see Fig. 6(d).
Pentamers of spheres of 5 nm surrounded by regular lattices, disordered. The results of studying a sample with random positions and rotation of the pentamers distributed within a fine lattice structure (P = 133) are shown in Fig. 7. The sample here is mimicking the situation of atoms ordered around nanoparticles, as for example atoms ordered in ligands attached to the surface of gold nanoparticles 20 .
As the coherence decreases, the modulations caused by the symmetry in the local structure emerge, see Fig. 7(b-d). The ten-fold modulations related to the five-fold symmetry of the pentamers are found at the same s as in the case of ordered pentamers: s 3 = 1.4 nm −1 and s 4 = 2.4 nm −1 , see Fig. 7(c). The twelve-fold modulations related to the six-fold symmetry of the fine lattices are found at the same s as in the previous example of ordered lattices: s 5 = 2π /d 5 = 3.63 nm −1 , s 6 = 2π /d 6 = 6.28 nm −1 and s 7 = 7.26 nm −1 , see Fig. 7(d). It is therefore possible to detect the symmetry of the local structure by means of CCF analysis of the diffraction pattern, provided that the diffraction pattern is recorded at partial coherence. Despite the fact that sub-structures are randomly distributed and randomly rotated throughout the sample, their intrinsic ordering produces well-pronounced modulations in the CCF.

Discussion
We studied the diffraction patterns and their CCFs in dense samples under different coherence lengths of the probing wave. For dense samples we developed a particle-by-particle algorithm for the simulation of the diffraction patterns, which allows obtaining more accurate results than those obtained by conventional approach by convolution with the mutual coherence function. For the studied dense samples, no peaks were observed in the diffraction patterns at any coherence length. However, at partial coherence, the characteristic symmetries of the sample were revealed by the cross-correlation analysis. We showed that as the coherence decreases, the modulation related to the ordering of local structure becomes more pronounced in the CCF. The sample with particles organized into domains (ordered subsystems), where each domain was randomly rotated, exhibited modulations in the CCF related to the ordering of the particles within a domain. We showed that the simple rule of the amplitude of the CCF~1/number of particles does not apply in the case of a dense system probed with partially coherent beam. In the case of such systems, the CCF has a much higher amplitude than predicted by the rule CCF~1/number of particles, and thus CCF can be easily measured for systems with a large number of particles. The modulations in the CCF are observed at the scattering vectors related to the distances between the periodically arranged particles; however the intensity of those modulations is inversely proportional to the number of ordered subsystems. Thus, the amplitude of the CCF is a measure of the degree of ordering in the system.
The dense sample of randomly distributed and rotated pentamers exhibited ten-fold modulations in the CCF at characteristic s. Moreover, the CCF distribution at partial coherence resembles that of a single pentamer, which indicates the possibility to extract the diffraction pattern of a single pentamer from a single-shot diffraction pattern of a dense sample.
To conclude, our study confirms that the cross-correlation analysis can be applied to study the arrangement of sub-systems in a disordered sample, revealing for example the ordering of the atoms in ligands attached to nanoparticles in two-dimensional supracrystals, even though the nanoparticles themselves are not arranged in a perfect lattice. In a dense sample, unlike in the case of diluted ones, even at a very low coherence length comparable to the size of particle, the interference effects between particles are not negligible. At infinite coherence of the probing beam these effects lead to a complete smearing out of the diffraction peaks. We demonstrated that at low coherence these effects lead to the appearance of peaks in the CCF that are a signature of certain symmetries in the sample.