Integration¶
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]:
Determination of the reflection mask — the definition of integration regions for each peak.
Background determination — division of pixels in the integration region into subsets of peak and background pixels, computing a mean background level.
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.
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:
The intensity is estimated as,
and the local background is estimated as,
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,
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,
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,
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,
In OpenHKL, the following procedure is used to solve these equations:
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.
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,
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,
and we take the find the numerical minimum,
See I/\sigma Integration for more details.
Gaussian integration¶
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.
W. Kabsch. Xds. Acta Crystallographica Section D Biological Crystallography, 66:125–132, 2010. doi:10.1107/s0907444909047337.
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.
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.