How overlaps.mode=deconvolve splits shared counts between reflections whose integration boxes overlap.
DIALS branch tof-overlap-handling · November 2026
← → or click to move · p pause animations · t light/dark · f full screen
On MANDI a peak has σ ≈ 2.9 × 2.1 px on the detector, so a box that holds it is 15 px or more across.
overlaps.mode=reject throws away every reflection whose box touches another.Illustration: random spots with MANDI peak widths. Overlap is judged here on the detector face only; the code also requires the boxes to overlap in ToF.
mask stops after step 4; deconvolve goes on to fit the clusters jointly.
Each voxel in two boxes goes to one reflection. The other copy is flagged Overlapped. This runs before any mask, so a strong neighbour can't capture a weak reflection's foreground.
The ellipse mask is seeded and weighted ignoring Overlapped voxels. Labelling is still geometric, so a real overlap still shows.
A voxel in one reflection's foreground is excluded from every other box. Overlapping reflections are flagged overlapped_fg if their own foreground reaches a neighbour, else overlapped_bg.
overlapped_bg reflections are integrated as usual ("recovered"). The profile library is built here, from strong clean reflections.
Reflections whose foregrounds reach each other are coupled. Clusters are the connected components. With estimator=joint, everything else is a cluster of one.
One weighted linear solve per cluster for all member intensities, with shapes and positions from the library. Threaded.
The nearest predicted centroid wins, with each axis scaled by that reflection's box half-width h:
Without the scaling ToF would decide every case: a box is far deeper in frames than it is wide in pixels.
Shaded: box A ■ / box B ■; strong shading marks shared voxels. Dots: foreground. ✕: a foreground voxel owned by the neighbour.
One ToF line through two peaks. Nothing in P is fitted: only the amplitudes ak.
Far apart, each amplitude is measured independently. As the peaks close in, the fit still splits the counts, but the two estimates become anticorrelated and their errors grow.
Simulated counts, iBIX ToF shape, flat background, 4 reweighting passes.
Strong clean reflections give, per panel: the ToF shape, the face covariance, the median offset of observed from predicted position, and the scatter s of that offset.
A peak is placed at its prediction plus the median offset. Its true position is off by an unknown δ. A sharp profile in the wrong place always loses intensity. Averaged over δ, the expected peak is the shape convolved with the scatter:
σp = width of the fitted profile. It equals 1 when σp² = σ² + s².
The K × K system is inverted by eigendecomposition. For two equal Gaussians a distance d apart:
At d → 0 only a₁ + a₂ is measured. A cluster whose smallest eigenvalue is below 10⁻¹² of the largest is left unfitted.
Most voxels hold 0 or 1 count. Weighting by the observed counts gives the voxels that saw a count less weight than the empty ones, and the estimate reads low.
Instead, each voxel's variance comes from the current model, and the solve is repeated (first pass flat, then 4 passes):
At convergence this is the Poisson maximum-likelihood solution.
gi: corrected value of one count (bin width, Lorentz, incident spectrum). Bi: background in counts.
1 · Counting. C from the solve. The voxel variance from the corrector already holds the background, B(1 + nsig/nbg); that part is taken out so it is not counted twice.
2 · Model misfit. Reduced χ² over the peak voxels (profile ≥ 5% of its maximum):
3 · Background level. One common shift of every voxel an owner o supplies, propagated through the fit:
The background level is estimated, not known. Its error moves every voxel of a shoebox together, so it moves the fitted intensities together: one correlated term, not independent noise in each voxel.
With P normalised over the box, a is the intensity inside the box, as summation measures it.
Normalising over the whole peak instead extrapolates past the box edge: the estimate becomes a/f, with f the fraction of the model inside. Every error in the model's tails is multiplied by 1/f.
Tried and reverted: reflections with small f blow up, and cut-offs on f still merge worse than box normalisation. f is kept as overlap.fit.fraction.
separate: only overlapped_fg reflections take the 3D fit; the rest keep the 1D profilelib fit, rescaled by one median 3D/1D ratio.joint: every reflection is fitted with the 3D model, coupled ones in their clusters, the rest alone. The 1D fit is kept as intensity.prf_1d.Schematic: a weak reflection (true I = 0.5σ) measured many times by an unbiased estimator and by one that cannot return a negative value.
dials.export intensity=profile+sum drops deconvolved reflections; xia2 does not expose the options yet.method=profile_1d_profileliboverlaps.mode=deconvolveoverlaps.estimator=jointbbox_xy_padding=6
plus dials.generate_mask border=N for dead panel edges