Peaks on a set of detector images are integrated to determine their intensity and variance by summing up the counts in pixels assigned to their respective peaks. There are four basic steps [I1]:

  1. Determination of the reflection mask — the definition of integration regions for each peak.

  2. Background determination — division of pixels in the integration region into subsets of peak and background pixels, computing a mean background level.

  3. Reference profile generation — strong peaks are used to generate mean profiles, and weak peaks are integrated using a profile generated as the mean of neighbouring strong profiles.

  4. Integration by profile fitting — summing the peak pixels to determine the intensity and variance of the peaks.

There are five main integrators implemented in OpenHKL. The pixel sum integrator is the most lightweight and naive, since it does not use any form of profile fitting. It is intended to generate an initial guess for the intensities. The 1D (used in DENZO) and 3D (used in XDS) Profile integrators [I1, I2, I3] use the same least squares fitting procedure, but the 1D method uses the distance of the pixel from the elliptical peak centroid to fit a profile, whereas the 3D method uses all pixel coordinates. The \(I/\sigma\) integrator [I4, I5] uses the Lehman-Larsen \(\sigma/I\) criterion to distinguish the peak and background regions. Finally, the Gaussian integrator assumes a Gaussian profile shape.

Pixel sum integration

For a peak \(Q\) in sample-fixed reciprocal space, the background-subtracted intensity distrubution in the neighbourhood of \(Q\) has a covariance matrix \(\Sigma\) that is either computed for strong peaks, or predicted for weak peaks. The pixel sum integration routine takes three parameters, \(r_1\), \(r_2\) and \(r_3\) and produces two sets \(\mathcal{B}\) and \(\mathcal{P}\) of background and peak pixels respectively:

\[\begin{split}\begin{aligned} \mathcal{P} &= \{ p ~|~ (\mathbf{q}_p-\mathbf{Q})^\intercal \mathbf{\Sigma}^{-1} (\mathbf{q}_p-\mathbf{Q}) < r_1^2 \} \\ \mathcal{B} &= \{ p ~|~ r_2^2 < (\mathbf{q}_p-\mathbf{Q})^\intercal \mathbf{\Sigma}^{-1} (\mathbf{q}_p-\mathbf{Q}) < r_3^2 \}\end{aligned}\end{split}\]

The intensity is estimated as,

\[\begin{split}\begin{aligned} I &= \sum_{i \in \mathcal{P}} (M_i - \mu_B) \\ \sigma^2_I &= I + \frac{|\mathcal{P}|^2}{|\mathcal{B}|} \overline{B} \end{aligned}\end{split}\]

and the local background is estimated as,

\[\begin{split}\begin{aligned} \mu_B &= \frac{1}{|\mathcal{B}|} \sum_{p \in \mathcal{B}} M_p \\ \sigma^2_B &= \frac{1}{|\mathcal{B}|-1} \sum_{p \in \mathcal{B}} (M_p - \mu_B)^2\end{aligned}\end{split}\]

This integrator is somewhat naïve since it does not employ any profile fitting, and is used only to get a rough estimate of intensities. The final integration should be performed using a more rigorous integrator (see below).

3D Profile integration

This method is employed by XDS [I3], and is described in more detail in Theory.

For the intensity distribution \(\{ p_i | i \in D_0 \}\) of a profile \(p_i\) in domain \(D_0\), the intensity of the observed peak is,

\[I = \frac{\sum_{i \in D}(c_i - b_i)p_i/v_i}{\sum_{i \in D}p_i^2/v_i},\]

where \(c_i\), \(b_i\), \(v_i\) and \(p_i\) are the contents (i.e. count), background, variance and profile of pixel \(i\) in the subdomain \(D \subseteq D_0\). This minimises the chi-squared loss,

(1)\[\psi(I) = \sum_{i \in D}(c_i - I\cdot p_i - b_i)^2/v_i,\]

subject to the normalisation \(\sum_{i \in D_0}p_i = 1\). The background is assumed to be constant, and is estimated from the neighbourhood of the reflection; variations on this method normally differ in their assumptions with respect to the variace \(v_i\). The variance is computed as in DENZO, as,

(2)\[v_i = b_i - I\cdot p_i\]

Starting with \(v_i = b_i\), the intensity is computed iteratively, stopping when it becomes negative or smaller than some tolerance. This normally takes no more than three cycles.

We minimise equation (1) with respect to the intensity and profile count by setting \(\partial\psi/\partial I\) and \(\partial\psi/\partial p_i\) to zero for fixed variances, resulting in the 2x2 linear system,

(3)\[\begin{split} \begin{bmatrix} \sum 1/v_i^2 && \sum p_i/v_i^2 \\ p_i/v_i^2 && p_i^2/v_i^2 \end{bmatrix} \begin{bmatrix} B \\ I \end{bmatrix} = \begin{bmatrix} \sum c_i/v_i^2 \\ \sum c_ip_i/v_i^2 \end{bmatrix}\end{split}\]

In OpenHKL, the following procedure is used to solve these equations:

  1. Set \(v_i = b_i\) as an initial guess

  2. Solve equations (3) by inversion

  3. compute updated \(v_i\) from equation (2)

  4. repeat from step 2 until convergence.

1D Profile integration

This method is used in DENZO [I1], and is similar to 3D profile integration, since the same least squares fitting procedure is employed. However, in this instance the 3D coordinates of pixels are replaced with a 1D “radius” from the centroid of the ellipsoid peak.

I/\(\sigma\) integration

The Lehman-Larsen \(\sigma/I\) criterion states that the boundary between the peak and background region occurs when \(\sigma(I)/I\) is a minimum with respect to the peak of the reflection. This works in practice for 1D profiles, but fails for 2D and 3D profiles due to statistical fluctuations in the background, the increase computational expense and the increase difficulty in choosing which points to test for the criterion. It can, however, be made to work if the peak shape is known from statistically well-observed (strong) neighbouring peaks.

Peak profile for :math:`\sigma /I` integration

Peak profile for \(\sigma /I\) integration [I5]

For a peak containing \(p_0\) points, with total integrated intensity \(I(p_0)\), define a intensity contour containing \(p\) points with integrated intensity \(I(p)\) (see figure). the points \(p\) are a fraction \(x(p)\) of the total \(p_0\). The background is determined from \(q/2\) grid points either side of the peak boundary. The minimum of \(\sigma(I)/I\) occurs when,

(4)\[ \frac{d(p/p_0)}{dx} - 2\frac{(p/p_0)}{x} = \frac{I_0}{p_0B},\]

is satisfied. For a strong peak (\(I_0/p_0B \gg 1\)), the minimum will be close to \(p_0\), and the parameters for such peaks are used to on the left-hand side of equation eq_isigma1 to predict the minimum of \(\sigma(I)/I\) for weak reflections. The aim is to minimise \(\sigma(I_0) = \sigma(I/x)\) for weak reflections. If the intensity of the weak peak is a small fraction of that of the strong profile peak, it can be shown that \(\sigma(I/x)\) coincides with \(\sigma(I)/I\) [I4], where \(I_0 = I(p_0) = I/x\). In practice, we measure \(x(p)\) from a strong peak with the same shape, and since the errors in \(I\) and \(1/x\) are independent,

\[\frac{\sigma^2(I/x)}{(I/x)^2} = \frac{\sigma^2(1/x)}{(1/x)^2} + \frac{\sigma^2(I)}{I^2},\]

and we take the find the numerical minimum,

\[\textrm{argmin}\left( \frac{\sigma^2(p)}{p^2} + \frac{\sigma^2(I)}{I^2} \right)\]

See I/\sigma Integration for more details.

Gaussian integration

[I1] (1,2,3)

W. Kabsch. Integration, scaling, space-group assignment and post-refinement. Acta Crystallographica Section D Biological Crystallography, 66:133–144, 2010. doi:10.1107/s0907444909047374.


W. Kabsch. Evaluation of single-crystal x-ray diffraction data from a position-sensitive detector. Journal of Applied Crystallography, 21:916–924, 1988. doi:10.1107/S0021889888007903.

[I3] (1,2)

W. Kabsch. Xds. Acta Crystallographica Section D Biological Crystallography, 66:125–132, 2010. doi:10.1107/s0907444909047337.

[I4] (1,2)

C. Wilkinson, H. W. Khamis, R. F. D. Stansfield, and G. J. McIntyre. Integration of single-crystal reflections using area multidetectors. Journal of Applied Crystallography, 21:471–478, 1988. doi:10.1107/S0021889888005400.

[I5] (1,2)

E. Prince, C. Wilkinson, and G. J. McIntyre. Comparison of the sigma(\it I)/\it I and least-squares methods for integration of bragg reflections. Journal of Applied Crystallography, 30:133–137, 1997. doi:10.1107/S0021889896012824.

Go to top.