# Covariance mapping

In statistics, covariance mapping is an extension of the covariance concept from random variables to random functions. Normal covariance is a scalar (a single number) that measures a statistical relation between two random variables. Covariance maps are matrices (arrays of numbers) that show statistical relations between different regions of random functions. Statistically independent regions of the functions show up on the map as zero-level flatland, while positive or negative correlations show up, respectively, as hills or valleys.

## Simple covariance mapping

Covariance mapping can be applied to any repetitive, fluctuating signal to reveal information hidden in the fluctuations. This technique was first used to analyse mass spectra of molecules ionised and fragmented by intense laser pulses.[1]

Figure 1: Schematics of a covariance mapping experiment. The experiment was performed at the LCLS FEL at Stanford University.[2]

Covariance mapping is particularly well suited to free-electron laser (FEL) research, where the x-ray intensity is so high that the large number of photoelectron and photoions produced at each pulse overwhelms simpler coincidence techniques. Figure 1 shows a typical experiment.[2] X-ray pulses are focused on neon atoms and ionise them. The kinetic energy spectra of the photoelectrons ejected from neon are recorded at each laser shot using a suitable spectrometer (here a time-of-flight spectrometer). The single-shot spectra are sent to a computer, which calculates and displays the covariance map.

### The need for correlations

Figure 2: Examples of ionisation processes in neon induced by intense x-ray photons of 1062 eV energy. When a photon is absorbed, it may eject a photoelectron from the atom core (P), inner valence shell (PL) or valence shell (PV). An Auger process fills any core hole ejecting an Auger electron (A). A core photoelectron on its way out may also kick out an additional valence electron giving double electron ejection by a single photon (DKV). The x-ray intensity is so high that several photons can be absorbed by a single atom producing a large variety of ionisation sequences.

Even in a relatively simple system, such as the neon atom, intense x-rays induce a plethora of ionisation processes (see Fig. 2). As the kinetic energies of the electrons ejected in different processes largely overlap, it is impossible to identify these processes using simple photoelectron spectrometry. To do so, one needs to correlate the kinetic energies of the electrons ejected in a given process. Covariance mapping is a method of revealing such correlations.

### The principle

Consider a random function ${\displaystyle X_{n}(E)}$, where index ${\displaystyle n}$ labels a particular instance of the function and ${\displaystyle E}$ is the independent variable. In the context of the FEL experiment, ${\displaystyle X_{n}(E)}$ is a digitized electron energy spectrum produced by laser shot ${\displaystyle n}$. As the electron energy ${\displaystyle E}$ takes a range of discrete values ${\displaystyle E_{i}}$ in places where the spectrum is sampled, the spectra can be regarded as row vectors of experimental data:

${\displaystyle \mathbf {X} =\mathbf {X} _{n}=[X_{n}(E_{1}),X_{n}(E_{2}),X_{n}(E_{3}),\ \ldots {\text{ up to the last sample}}].}$

The simplest way to analyse the data is to average the spectra over ${\displaystyle N}$ laser shots:

${\displaystyle \langle \mathbf {X} \rangle ={\frac {1}{N}}\sum _{n=1}^{N}\mathbf {X} _{n}.}$

Such spectra show kinetic energies of individual electrons but the correlations between the electrons are lost in the process of averaging. To reveal the correlations we need to calculate the covariance map:

${\displaystyle \mathbf {cov} (\mathbf {Y} ,\mathbf {X} )=\langle \mathbf {YX} \rangle -\langle \mathbf {Y} \rangle \langle \mathbf {X} \rangle ,}$

where vector ${\displaystyle \mathbf {Y} }$ is the transpose of vector ${\displaystyle \mathbf {X} }$ and the angular brackets denote averaging over many laser shots as before. Note that the ordering of the vectors (a column followed by a row) ensures that their multiplication gives a matrix. It is convenient to display the matrix as a false-colour map.

### How to read the map

Figure 3: A covariance map revealing correlations between electrons emitted from neon (and from some N2 and water vapour contamination). The map is constructed shot by shot from electron energy spectra recorded at the photon energy of 1062 eV, which are shown along the x and y axes after averaging over 480 000 FEL shots. Volumes of the features on the map give relative probabilities of various ionisation sequences, which can be classified as: (a) Ne core-core; (b) H2O core-core, core-Auger, and Auger-Auger; (c) Ne Auger-Auger; (d) Ne valence-valence; (e) N2 core-Auger; (f) H2O core-valence; (g) Ne core-Auger; (h) Ne core-valence; (i) double Auger and secondary electrons from electrode surfaces; and (j) Ne main (core) photoelectron line. Note that the false-colour scale is nonlinear to accommodate a large dynamic range.[2]

The covariance map obtained in the FEL experiment[2] is shown in Fig. 3. Along the x and y axes the averaged spectra ${\displaystyle \langle \mathbf {X} \rangle }$ and ${\displaystyle \langle \mathbf {Y} \rangle }$ are shown. These spectra are resolved on the map into pairwise correlations between energies of electrons coming from the same process. For example, if the process is the first process depicted in Fig. 2 (PP), then two low-energy electrons are ejected from the Ne core giving a positive island in the bottom-left corner of the map (one of the white ones). The island is positive because if one of the electrons is detected, there is higher than average probability of also detecting the other electron and the covariance of the signals at the two energies takes a positive value.

The volumes of the islands are directly proportional to the relative probabilities of the ionisation processes.[1] This useful quality of the map follows from a property of the Poisson distribution, which governs the number of neon atoms in the focal volume and the number of electrons produced at a particular energy, ${\displaystyle X_{n}(E_{i})}$. The property employed here is that the variance of a Poisson distribution is equal to its mean and this property is also inherited by covariance. Therefore, the covariance plotted on the map is proportional to the number of neon atoms that produce pairs of electrons of particular energies. This makes covariance much more suitable for particle counting experiments than other bivariate estimators, such as Pearson's correlation coefficient.

On the diagonal of the map there is an autocorrelation line. It is present there because the same spectra are used for the x and y axes. Thus, if an electron pulse is present at a particular energy on one axis, it is also present on the other axis giving the variance signal along the ${\displaystyle E_{x}=E_{y}}$ line, which is usually stronger than the neighbouring covariance islands. The mirror symmetry of the map with respect to this line has the same origin. The autocorrelation line and the mirror symmetry are not present if two different detectors are used for the x and y signals, for example where one detector is used to detect ions and another to detect electrons.[3]

Figure 4: Identification of neon ionisation processes in the core-core (left) and core-valence (right) correlation regions. The top of the autocorrelation line is cut off to show the features behind. Symbols P, D, and A denote, respectively, ejection of a photoelectron, two photoelectrons (direct double photoionisation by a single photon), and an Auger electron. The two detected electrons giving rise to the covariance signal are indicated by bold type.

Much more information is present on the map than on the averaged, 1D spectrum. The single, often broad and indistinct peaks on the 1D spectrum are resolved into several islands on the map. Fig. 4 shows magnified core-core and core-valence regions with several ionisation sequences identified unambiguously. In the DKV process the two electrons ejected share arbitrarily the energy available from a single proton producing a conspicuous line Ex + Ey = const in the left panel of Fig. 4. Impurities, such as water vapour or nitrogen, give islands usually away from the islands of the species studied (see Fig. 3b,e,f).

## Partial covariance mapping

Covariance maps expose all kinds of correlations, including indirect ones that are induced by a fluctuating common parameter. Such common-mode correlations are often uninteresting and they obscure the interesting ones. For example, in the laser experiments the pulse intensity may fluctuate from shot to shot. These fluctuations correlate every electron with every other electron, simply because a more intense pulse produces more electrons of every energy.

### Removal of uninteresting correlations

The influence of such uninteresting correlations can be removed using partial covariance mapping. This method exposes only a part of the correlations, the part that is independent of the fluctuating parameter ${\displaystyle I}$, which has to be measured at every laser shot. The formula for partial covariance[4] is

${\displaystyle \mathbf {pcov} (\mathbf {Y} ,\mathbf {X} ;I)=\mathbf {cov} (\mathbf {Y} ,\mathbf {X} )-\mathbf {cov} (\mathbf {Y} ,I)\mathbf {cov} (I,\mathbf {X} )/\operatorname {cov} (I,I),}$

where ${\displaystyle \operatorname {cov} (I,I)}$ is the variance of the fluctuating parameter.

### Stages of partial covariance mapping

Figure 5: Stages of partial covariance mapping to resolve the ion momentum correlations in Coulomb explosion of N2 molecules.[5] Owing to momentum conservation these correlations appear as lines approximately perpendicular to the autocorrelation line (and to the periodic modulations which are caused by detector ringing).

It is instructive to see how this formula works on an example of another experiment performed at the FLASH FEL in Hamburg. (In fact this method was also used to analyse the LCLS experiment described above, but to keep the Wikipedia description simple the partial covariance was not mentioned.) The FLASH experimental setup was very similar to the LCLS setup shown in Fig. 1, except molecular nitrogen was studied and its ions rather than electrons were detected.[5] Fig. 5a shows the correlated product ${\displaystyle \langle \mathbf {YX} \rangle }$ and Fig. 5b shows the uncorrelated product ${\displaystyle \langle \mathbf {Y} \rangle \langle \mathbf {X} \rangle }$. Their difference gives the simple covariance map (c). The momentum correlation lines start to be visible (note a change in the colour scale) but the map is overwhelmed by correlations induced by FEL intensity fluctuations. These correlations are calculated in panel (d) and the correction is subtracted from map (c) giving map (e). The momentum correlation lines are now clearly visible but some residual common-mode background is still present, which is likely to be induced by other fluctuating parameters, such as the sample density or the FEL pulse duration. As these parameters were not monitored, simply an excess of the correction (d) was subtracted from map (e) giving map (f). This crude, ad hoc method significantly suppresses the residual common-mode background in the region of interest but the overcorrection introduces negative regions (magenta) at long time of flights. The detailed algorithm of partial covariance mapping is given in the Supplemental Material of the LCLS paper.[2]