Abstract
X-ray photon correlation spectroscopy (XPCS) and dynamic light scattering (DLS) both reveal dynamics using coherent scattering, but X-rays permit investigating of dynamics in a much more diverse array of materials. Heterogeneous dynamics occur in many such materials, and we showed how classic tools employed in analysis of heterogeneous DLS dynamics extend to XPCS, revealing additional information that conventional Kohlrausch exponential fitting obscures. This work presents the software implementation of inverse transform analysis of XPCS data called CONTIN XPCS, an extension of traditional CONTIN that accommodates dynamics encountered in equilibrium XPCS measurements.
1. Introduction
X-ray photon correlation spectroscopy (XPCS) (Sutton et al., 1991; Grübel et al., 2000; Grübel et al., 2008; Shpyrko, 2014) and dynamic light scattering (DLS) (Berne & Pecora, 1976) both use coherent scattering for observation of material dynamics. With idealized monodisperse, dilute materials, both XPCS and DLS reveal simple exponential (Brownian) dynamics. However, the analytical treatment of measurements showing divergence from simple exponential dynamics differ considerably between XPCS and DLS, despite their operational similarity. Traditional DLS analysis commonly interprets nonexponential relaxation in terms of underlying dynamic heterogeneity using cumulant (Frisken, 2001) or CONTIN analysis (Provencher, 1979; Provencher, 1982a; Provencher, 1982b), whereas XPCS analysis uses a Kohlrausch function. (Kohlrausch, 1854a; Kohlrausch, 1854b; Madsen et al., 2010; Berberan-Santos et al., 2008) We demonstrated the use of modified CONTIN with XPCS measurements (Andrews et al., 2017) from XPCS data sets showing classic simple diffusive kinetics, compressed exponential dynamics and bimodal compressed exponential dynamics. The mathematical functions commonly used for DLS and XPCS analysis, as well as our notation for CONTIN- and MULTIQ-XPCS analysis, are summarized in Fig. 1. This work describes the software implementation of inverse transform methods for XPCS data analysis.
Fig. 1.

Principles of DLS and XPCS. Figure based upon our earlier work (Andrews et al., 2017). Techniques for analysis of DLS and XPCS temporal autocorrelation functions g2(t).Γ shows relaxation rate in its conventional definition. We introduce the parameter ϒ that represents a relaxation rate whose units reflect the transform used. Classic XPCS analysis uses the Kohlrausch exponent α to account for deviation from simple exponential decay, whereas DLS assumes this results from dynamic heterogeneity through cumulant or inverse transform approaches. The method of cumulants characterizes the underlying monomodal distribution using parameters Γ, μ2 and μ3. Inverse transformation seeks the underlying distribution Ψ(ϒ) itself by solving the inverse Laplace transform ( CONTIN) or simultaneously solving a single q2-dependent inverse Laplace transform on multiple data sets g2(q, t) measured at different q (MULTIQ). Inclusion of the measurement q allows inverse transform analysis into two distributions, Ψ(ϒ) and Ψ′(ϒ), each with different q dependency (q2 and q0, respectively). a, b, α, and β are constants.
Simultaneous analysis of g2(t)s measured at multiple q points mitigates effect of noise and truncation of the data, but also allows testing of more complicated hypothesis involving multiple q-dependent distributions. Here, , and q = 4π/λ sin θ, where λ is the X-ray wavelength and 2θ is the scattering angle. The original version of MULTIQ (Provencher & Štěpánek, 1996) defined a model using a Laplace transform of two distributions Ψ(Γ) and Ψ′(Γ), one independent of length scale and one with conventional q2 dependence of Brownian motion. In a solution of polystyrene in cyclohexane, q2-dependent diffusion of the gel occurred in the presence of q-independent structural relaxation (Nicolai et al., 1990). Analysis of concentrated poly(styrene) in diethyl malonate DLS data with MULTIQ over two grids isolated these two dynamic modes (Fig. 2). Measurements from four different scattering angles between 30° and 140° (q = 0.00117 to 0.00150 Å−1) resolved the q2-dependent distribution corresponding to concentration fluctuations from a q-independent distribution attributed to density fluctuations. The characteristics of these samples measured with DLS and analyzed with MULTIQ, semidilute solutions and plasticized polymers (Provencher & Štěpánek, 1996), have some similarity with samples currently used with XPCS, suggesting applicability of this double distribution MULTIQ approach for XPCS data analysis.
Fig. 2.

MULTIQ extraction of q-independent relaxation from q2-dependent diffusion from DLS data of concentrated poly(styrene) in diethyl malonate. Figure reproduced from Provincher’s original introduction of the MULTIQ technique (Provencher & Štěpánek, 1996).
Classical use of the Kohlrausch function in XPCS for spatially heterogeneous dynamics assumes not only monomodal underlying dynamics, but the presence of a nontrivial Pollard (Pollard, 1946) distribution that gives a stretched exponential function after Laplace transformation. As an alternative to Kohlrausch exponential analysis of heterogeneous dynamics, we demonstrated the use of modified CONTIN (Andrews et al., 2017) with XPCS data sets showing simple diffusive and compressed exponential dynamics. In the final example presented there, inverse transform analysis revealed a bimodal distribution of ballistic relaxation rates not obvious based upon classical Kohlrausch function analysis.
The modification of the CONTIN and MULTI transform kernel for use with XPCS is shown in the equations below. User-defined parameters ξ (the type of transform), q (the length scale dependence of the distribution) describe the type of dynamic model employed for inverse transformation. Selection of the classic inverse Laplace transform uses ξ = 1 describing slower than exponential dynamics. Faster than exponential decays require an inverse Gaussian transform, ξ = 2.
Equation 1 shows the adjustable transform model for analysis of a single g2, while Equations 2, 3, and 4 collectively analyze multiple g2s measured a multiple q. In Equation 4 the first transform includes a function S(q) for more complicated dynamic dependence on length scale q.
| (1) |
| (2) |
| (3) |
| (4) |
2. Program
2.1. Structure
The program XPCS CONTIN consists of a Python GUI frontend and a Fortran back-end. The Python GUI loads the data, allows user selection of parameters and starts the compiled Fortran CONTIN/MULTIQ executable. Python writes the input values to STDIN of the Fortran executable using Brendan Arnold’s FortranFormat library; when the Fortran program finishes, FortranFormat reads the output back into Python. Python dynamically updates the progress of CONTIN through the file system. The Fortran backend is the original CONTIN MULTIQ (Provencher, 1979; Provencher, 1982a; Provencher, 1982b; Provencher, 1984) written in FORTRAN66. Modifications to CONTIN MULTIQ allow user selection from Python of the time exponent and q-dependency of the transform, and exchange of other data between Python and Fortran through the file system. This modified version, called CONTIN XPCS, compiles and runs on Windows 7 or 10 machines. Analysis of typical XPCS data sets using nominal CONTIN XPCS inversion parameters requires about a minute on an average desktop computer. This software will analyze any XPCS data set, either as a standalone desktop application or integrated as part of online data analysis at the beamline. Argonne National Laboratory currently has CONTIN XPCS installed at 8-ID-I the XPCS beamline.
2.2. Interface
Figure 3 shows the user interface for XPCS CONTIN allowing definition of the transform type and selection of other parameters. CONTIN for batchwise analysis requires a user selection for the type of transform ξ and setting q independence by selecting qn with n = 0. Pressing Run CONTIN Batch will analyze each g2 individually and give one distribution for each g2. For MULTIQ, setting n to a nonzero value takes into account qn dependence of the data set. Pressing Run MULTIQ will analyze all g2 at once and give a single distribution Ψ(ϒ). Checking Add Second Distribution allows addition of Ψ′(ϒ) resulting from a different type of inverse transformation and q dependency. The Distribution Solution defines the lower ϒmin and upper ϒmax limits of integration, and the number of points (Bins) for discretization of the dϒ integral. CONTIN and MULTIQ automatically determine the most likely value for the Lagrange multiplier Λ the weights the relative amounts of fit and smoothness (Eq. 5). In most cases, while we find the automatic selection the best intuitive choice, one should investigate the solution behavior in the vicinity of . Here, represents a rejection probability metric as defined in (Andrews et al., 2017). XPCS CONTIN exports the distribution solution and inverse transform parameters into text files.
| (5) |
Fig. 3.

The CONTIN XPCS interface for user selection of parameters
2.3. Data Input Format
CONTIN XPCS requires the value of g2(q, t) and the points q and t of the measurement. This file containing a single array must have the format shown in the following array. The array consists of a single column of times t corresponding to all the g2, the g2 and the error σ; the lag time points of each g2 must be equal. A single row appended to the top of the array contains the q points of the measurement, followed by zeros to fill the remainder of the row. Instructions appear in the supporting information for modification of XPCSGUI in use at Argonne National Laboratory to output this array by default.
The program will look for the Kohlrausch exponential fit files and static SAXS intensity I(q) and display them in a plot for reference, but their absence does not inhibit the rest of the program or inverse transformation.
2.4. GUI
The Python/Qt GUI, shown in Figure 4, displays the input data as a three dimensional plot of g2 vs. log t vs. q (d). Presence of the fit file. TAUFIT2ASCII will populate the plots of the time constant γ (a) and Kohlrausch exponent (b) from the XPCS-GUI fit model g2(t) = a + β exp [− (t/γ)α]. After selection of the inverse transform parameters as detailed in Figure 3 and processing, the solution and its characteristics appear in the remaining panels (e,f,g,h). The solution Ψ(ϒ) (and Ψ′(ϒ) with addition of a second distribution) appears in (e). The data and CONTIN fit corresponding to the selected q point (Select g2) in addition to the fitting residuals appear in (f). CONTIN determines a Lagrange multiplier automatically by first testing a series of 30 (Search Points) from small to large. CONTIN then performs a more detailed search in the region where crosses from 0 → 1 to identify the value closest to . CONTIN then uses this value to determine and report the solution shown in (e). Panel (h) shows the relative χ2, background a(q) (Multiple selected for Backgrounds) and contrast/scaling factor β(q). CONTIN XPCS exports the solution into text files that contain the inverse transform parameters and the distribution solution(s).
Figure 4.

CONTIN XPCS Python/Qt GUI. Plots show the relaxation rate γ (a) and Kohlrausch exponent α (b) from conventional fitting with a Kohlrausch exponential function, and a 3D plot of the input g2 data as a function of scattering vector q on one axis and lag time log t on the other axis (d) − these data come from the input file(s). The selected inverse transform parameters in the interface (c, Gauss and q^2 for the first distribution and Gauss and q^0 for the second) correspond to the model . Pressing “Run MULTIQ” finds the distribution solutions Ψ(ϒ) and Ψ′(ϒ) shown in (e), the background a(q) and scale parameters β(q) shown in (h). The fit and data for the selected q point highlighted in blue (d) appear in panel (f). Panel (g) shows CONTIN’s search for the most likely value for the Lagrange multiplier Λ, displaying the goodness of fit χ2, degrees of freedom Ng and rejection probability as a function of Λ. MULTIQ performs a second search for Λ (large points) after rescaling the data by β(q) determined during a preliminary analysis (small points). The most likely solution occurs at the point where , indicated by the vertical magenta line in (g).
3. Conclusion
DLS traditionally uses inverse Laplace transform analysis for describing exponential decays in terms of an ensemble of classical dynamics, as results from, for example, dynamics occurring in suspensions of particles with polydisperse radii. We demonstrated the extension of the inverse transform technique to XPCS data analysis by including the inverse Gaussian transformation for faster than exponential dynamics (Andrews et al., 2017). The examples showed that inverse Gaussian transform analysis can reveal dynamics hidden by conventional Kohlrausch exponential analysis. In this work, we presented the software implementation of this technique in the program CONTIN XPCS.
The supporting information contains the source code for the Fortran backend and the Python frontend, and a user manual that describes compiling and installation instructions from the source code and analysis of the test data sets supplied. The results of these test data appeared in our earlier publication. The author will provide a ready-to-use version that includes the compiled Fortran executable and a full distribution of Python for free upon request.
Supplementary Material
Synopsis.
This work describes the software package CONTIN XPCS for inverse transform analysis of X-ray photon correlation spectroscopy.
Acknowledgments
Research sponsored by the U.S. Department of Energy, Assistant Secretary for Energy Efficiency and Renewable Energy, Office of Vehicle Technologies, as part of the Propulsion Materials Program. This research used resources of the Advanced Photon Source, a U.S. Department of Energy (DOE) Office of Science User Facility operated for the DOE Office of Science by Argonne National Laboratory under Contract No. DE-AC02-06CH11357. We thank Gabrielle Long, Randall Winans, Carlos C. Co and Chia-Chi Ho for helpful suggestions, Steven W. Provencher for providing the source code of CONTIN and MULTIQ (http://s-provencher.com/), and the Department of Energy for RNA’s fellowship.
References
- Andrews RN, Narayanan S, Zhang F, Kuzmenko I, Ilavsky J. Journal of Applied Crystallography. 2017 doi: 10.1107/S1600576717017113. accepted. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Berberan-Santos M, Bodunov E, Valeur B. arXiv preprint. 2008 arXiv:0804.1814. [Google Scholar]
- Berne BJ, Pecora R. Dynamic light scattering: with applications to chemistry, biology, and physics. Courier Corporation; 1976. [Google Scholar]
- Frisken BJ. Applied Optics. 2001;40(24):4087–4091. doi: 10.1364/ao.40.004087. [DOI] [PubMed] [Google Scholar]
- Grübel G, Abernathy DL, Riese DO, Vos W, Wegdam G. Journal of applied crystallography. 2000;33(3):424–427. [Google Scholar]
- Grübel G, Madsen A, Robert A. Soft Matter Characterization. Springer; 2008. pp. 953–995. [Google Scholar]
- Kohlrausch R. Annalen der Physik und Chemie (Poggendorff) 1854a;91:179–213. [Google Scholar]
- Kohlrausch R. Annalen der Physik und Chemie (Poggendorff) 1854b;91:56–82. [Google Scholar]
- Madsen A, Leheny RL, Guo H, Sprung M, Czakkel O. New Journal of Physics. 2010;12(5):055001. [Google Scholar]
- Nicolai T, Brown W, Hvidt S, Heller K. Macromolecules. 1990;23(24):5088–5096. [Google Scholar]
- Pollard H. Bull Amer Math Soc. 1946;52:908–910. [Google Scholar]
- Provencher SW. Die Makromolekulare Chemie. 1979;180(1):201–209. [Google Scholar]
- Provencher SW. Computer Physics Communications. 1982a;27(3):213–227. [Google Scholar]
- Provencher SW. Computer Physics Communications. 1982b;27(3):229–242. [Google Scholar]
- Provencher SW. CONTIN Users Manual 1984 [Google Scholar]
- Provencher SW, Štěpánek P. Particle & particle systems characterization. 1996;13(5):291–294. [Google Scholar]
- Shpyrko OG. Journal of synchrotron radiation. 2014;21(5):1057–1064. doi: 10.1107/S1600577514018232. [DOI] [PubMed] [Google Scholar]
- Sutton M, Mochrie S, Greytak T, Nagler S, Berman L, Held G, Stephenson G. Nature. 1991;352(6336):608–610. [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
