Correlation Functions in XPCS¶
X-ray Photon Correlation Spectroscopy (XPCS) measures intensity fluctuations in the speckle pattern formed at the detector. These fluctuations encode the collective dynamics of the scattering sample. This page derives the two-time correlation function \(c_2\) from first principles and explains why the equilibrium approximation \(g_2(q,\tau)\) is insufficient for non-stationary systems.
Position Density and Scattered Field¶
For a sample containing \(N\) scattering centres at positions \(\mathbf{r}_j(t)\), the position density in Fourier space is:
where \(f_j\) is the form factor of particle \(j\) and \(\mathbf{q}\) is the momentum transfer vector with \(|\mathbf{q}| = q = 4\pi\sin(\theta)/\lambda\).
The scattered electric field at the detector is proportional to \(\rho\):
and the measured intensity is:
First-Order Correlation Function¶
The normalized first-order correlation function is:
For a Gaussian process (valid for large \(N\) by the central limit theorem), \(c_1\) depends only on the transport coefficient \(J(t)\) and the mean drift:
The first factor is the Debye-Waller-like diffusive decay; the second is a phase shift from the mean flow. This factorization is exact for Gaussian displacement statistics.
Factorization into internal and external contributions:
where the internal (diffusive) part is:
and the external (drift) part is:
Second-Order Correlation Function¶
The normalized second-order (intensity) correlation function is:
This is the quantity measured directly in XPCS experiments. Each pixel in the 2D detector contributes one time series \(I(\mathbf{q}, t)\), and the correlation is accumulated as a function of the two absolute times \(t_1\) and \(t_2\).
Note
\(c_2\) is dimensionless and satisfies \(c_2 \geq 1\) for classical fluctuations (Cauchy-Schwarz inequality). The baseline \(c_2 \to 1\) as \(|t_2 - t_1| \to \infty\) when fluctuations decorrelate.
Siegert Relation¶
For a Gaussian field (single-mode, thermal light statistics), Wick’s theorem gives the Siegert relation:
where \(\beta(t_1, t_2) \in (0, 1]\) is the speckle contrast (also called the optical coherence parameter). For a perfectly coherent X-ray beam and ideal single-mode detection \(\beta = 1\); realistic experiments yield \(\beta \approx 0.05–0.8\).
The Siegert relation is the foundation of all homodyne models implemented in this package. Combining (5) and (8) gives the general homodyne result:
The phase (drift) term drops out of \(|c_1|^2\) for homodyne detection. Heterodyne detection retains it — see Heterodyne Scattering: Multi-Component Models.
Note
In homodyne’s implementation, the integral \(\int J(t')\,dt'\) is computed as \(\int D(t')\,dt'\) using cumulative trapezoidal integration, where \(D(t) = D_0 t^\alpha + D_\mathrm{offset}\) is homodyne’s parameterization with \(D_0 = 2 D_\mathrm{SE}\). See Transport Coefficient J(t) for the convention details.
Equilibrium Approximation: g₂(q, τ)¶
When the sample is in thermal equilibrium, the dynamics are stationary and \(c_2\) depends only on the lag time \(\tau = t_2 - t_1\), not on the absolute time \(t_1\). The standard equilibrium correlation function is:
For Brownian diffusion, \(\Gamma = Dq^2\) and the decay is a simple exponential.
Why equilibrium fails for yielding systems: During a yielding transition, the sample properties change on timescales comparable to (or shorter than) the experiment duration. The diagonal average \(g_2(q, \tau) = \langle c_2(q, t_1, t_1+\tau)\rangle_{t_1}\) washes out genuine transient behaviour. The full \(c_2(q, t_1, t_2)\) matrix is required.
Warning
Using \(g_2(q, \tau)\) analysis on a non-stationary sample produces artifact-corrupted parameters: \(D\) absorbs time-averaged heterogeneity, \(\beta\) appears artificially depressed, and the functional form may no longer be a single exponential even when the underlying physics is simple.
Two-Time Correlation Matrix¶
In practice, the two-time correlation function is represented as a matrix indexed by discrete time points \((t_i, t_j)\):
The matrix is symmetric (\(c_2^{ij} = c_2^{ji}\)) and has \(c_2^{ii} = 1 + \beta\) on the diagonal (zero lag). The standard \(g_2(\tau)\) corresponds to the average along each off-diagonal at lag \(\tau = (j-i)\Delta t\).
Homodyne accesses this full matrix from the HDF5 data file loaded by
homodyne.data.XPCSDataLoader.
Model Fitting¶
Given measured \(\{c_2^{ij}\}\), homodyne fits the theoretical model by minimizing:
where \(\theta = (D_0, \alpha, D_\mathrm{offset})\) for static mode and \(\theta = (D_0, \alpha, D_\mathrm{offset}, \dot{\gamma}_0, \beta_\gamma, \dot{\gamma}_\mathrm{offset}, \phi_0)\) for laminar flow mode.
The weights \(w_{ij}\) are determined by the measurement variance (Poisson statistics for photon counting). See Computational Methods for solver details.
See also
Transport Coefficient J(t) — definition and physical interpretation of \(J(t)\)
Homodyne Scattering: Laminar Flow Model — full laminar-flow equation
Heterodyne Scattering: Multi-Component Models — multi-component extension
homodyne.data.XPCSDataLoader— HDF5 data loadinghomodyne.core.jax_backend— JIT-compiled \(g_2\) computation