WorksPhysics and Astronomy
Automatic indexing of wide-band quasi-Laue neutron diffraction patterns of large unit cells
Abstract
With a continuous spectrum of incident neutron wavelengths, quasi-Laue diffraction records many Bragg reflections from a stationary crystal, each satisfying the diffraction condition at a particular wavelength. Because the wavelength of each reflection is not measured, the crystal orientation must be determined from the scattering directions alone. At the new IMAGINE-X instrument, instant-readout detectors and many short exposures per experiment require this indexing to run automatically, yet for a protein crystal at the full 2-10 Angstrom band a single peak can have approximately candidate reflections, and a random orientation indexes a large fraction of the observed peaks. We describe an algorithm that indexes such patterns for a known unit cell and wavelength band. Differential evolution searches uniformly sampled rotations, matching observed directions to band-limited shells of candidate directions, and each solution is tested against the indexing expected for a random orientation. In a benchmark search, a k-d tree and a persistent pool of 32 worker processes reduce the wall time 270-fold relative to a serial scan of all candidates. The algorithm is first validated on the time-of-flight diffractometer MANDI, where the measured wavelengths give a reference solution by standard indexing. With the wavelengths discarded, every indexed reflection from 93 rare-earth garnet patterns agrees up to harmonic order. The algorithm then reliably indexes the natural mineral mesolite, measured on the original image plate at IMAGINE before the upgrade, and the protein T4 lysozyme, measured on the new IMAGINE-X instrument over the full band.
describe an algorithm that indexes such patterns for a known unit cell and wavelength band. Differential evolution searches uniformly sampled rotations, matching observed directions to band-limited shells of candidate directions, and each solution is tested against the indexing expected for a random orientation. In a benchmark search, a -d tree and a persistent pool of 32 worker processes reduce the wall time 270-fold relative to a serial scan of all candidates. The algorithm is first validated on the time-of-flight diffractometer MANDI, where the measured wavelengths give a reference solution by standard indexing. With the wavelengths discarded, every indexed reflection from 93 rare-earth garnet patterns agrees up to harmonic order. The algorithm then reliably indexes the natural mineral mesolite, measured on the original image plate at IMAGINE before the upgrade, and the protein T4 lysozyme, measured on the new IMAGINE-X instrument over the full band.
Introduction
The first observation of X-ray diffraction by a crystal, recorded in 1912 by Friedrich, Knipping and Laue [17], was made with the unfiltered radiation of an X-ray tube. Its spots were initially attributed to a few discrete wavelengths present in the incident beam. W. L. Bragg showed instead that the beam has a continuous spectrum, from which each set of lattice planes of spacing reflects only the wavelengths that satisfy at the scattering angle [7, 6]. A stationary crystal in a polychromatic beam therefore records many Bragg reflections at once, but not the wavelength, or the harmonic order , of any of them. Identifying the reflection behind each spot without its wavelength has remained the central difficulty of indexing Laue patterns ever since.
With modern position-sensitive area detectors [22, 32], Laue diffraction remains a powerful technique for rapid single-crystal measurements across X-ray, neutron, and electron diffraction. Its ability to collect many reflections in a single exposure makes efficient use of the available flux and measurement time, which is particularly useful for weakly scattering samples, small crystals and neutron experiments [42, 34]. Recording a full pattern in a single exposure also enables time-resolved studies [38]. Neutron diffraction provides sensitivity to hydrogen and deuterium positions, making it possible to identify protonation states, hydrogen-bonding networks, and chemically active sites in biological structures [33] (Niimura & Podjarny 2011). Dynamic nuclear polarization can further enhance the contrast from hydrogen [47, 3].
At Oak Ridge National Laboratory, single-crystal neutron diffraction experiments are performed using both continuous and pulsed neutron sources [12]. The High Flux Isotope Reactor (HFIR) provides a steady neutron flux, whereas the Spallation Neutron Source (SNS) provides a time-structured, pulsed neutron beam suitable for time-of-flight measurements, in which the flight time of each detected neutron gives its wavelength. As a result, observed detector-space peak positions can be converted directly into reciprocal-space scattering vectors, enabling automated determination of the UB matrix, which describes the lattice and its orientation relative to the instrument, in software packages such as Mantid [1] and NeuXtalViz [41], building on earlier tools developed for pulsed-source neutron diffraction [25].
Laue diffraction at continuous-source instruments presents a different indexing problem. At IMAGINE, a macromolecular crystallography beamline at HFIR [35, 34], the wavelength associated with each observed Laue spot cannot be obtained directly. The detector position therefore constrains the scattered-beam direction, but not the full, unique reciprocal-space vector. Indexing therefore requires finding the crystal orientation for which reflections within the accessible wavelength band are predicted at the observed spots. For the image-plate detector of IMAGINE, indexing and integration are done with LAUEGEN, adapted for neutron diffraction and cylindrical detectors [9, 34]. LAUEGEN finds the orientation for a known cell by matching the angles between observed and predicted low-index spots, and the user selects and refines a solution with an interactive display of the predicted and observed patterns [9].
IMAGINE is currently being upgraded to IMAGINE-X, which replaces the cylindrical image plate with up to 80 instant-readout Anger cameras [31] in two arrays of 40. Furthermore, it adds dynamic nuclear polarization of the sample [47, 3], with a cryogenic neutron spin flipper (Fu et al., 2026). Before and after the upgrade, the instrument uses the same beamline optics on cold guide CG-4D of HFIR, which delivers neutrons over –. Exchangeable flat mirrors and filters set a short-wavelength cutoff of 2.0, 2.8 or 3.3 Å and a long-wavelength cutoff of 3.0, 4.0 or 4.5 Å, and a pair of elliptical mirrors focuses the beam to at the sample [33, 34]. The standard quasi-Laue window is 2.8–4.5 Å. With the long-wavelength cutoff left open, as for the T4 lysozyme data here, the band extends to the full 2–10 Å spectrum of the guide, and a short exposure records many reflections. This open mode is used to assess the crystal quality and confirm the unit cell efficiently before data are collected in the quasi-Laue window, and the orientation from such an image can be used to plan the crystal settings for the rest of the experiment [34, 41]. This requires indexing a single exposure on its own, without a rotation series. Polarization experiments need short exposures from many crystal orientations, and the instant-readout detectors make each exposure available as it is collected. Indexing therefore has to run without user intervention, be reliable for protein unit cells over the full band, and keep up with data collection.
Indexing of diffraction patterns has a large literature [40], and many of its ideas carry over to this problem. Autoindexing of monochromatic oscillation data [59, 50, 66] is well established and uses the known wavelength to obtain scattering vectors directly. For single-crystal Laue data without wavelength information, an early semi-automatic method recognized zone conics to construct candidate cells [52], and ab initio methods determine the cell without prior knowledge [39]. LAUEGEN, developed for synchrotron X-ray Laue data [9], has been used to index neutron quasi-Laue data from macromolecules on cylindrical image plates since LADI [42, 34]. On neutron Laue diffractometers at reactor sources [46, 45], LaueG obtains an initial orientation from a user-supplied cell by automated spot detection and indexing, with graphical tools to inspect the solution, change the lattice or guide the indexing manually [49], before the orientation is refined and the intensities corrected [48]. LauePt4 finds the orientation of a single crystal from the interplanar angles of spots selected interactively [24]. Laue-DIALS indexes polychromatic X-ray data from macromolecular crystals in two steps [23]. Monochromatic autoindexing at a nominal wavelength, applied to the reflections of all images in a series, gives the cell and an initial orientation. Miller indices and wavelengths within the band are then assigned by matching observed and predicted scattering directions, while the orientation of each image is refined.
Related methods address grain mapping and serial crystallography. In X-ray microdiffraction, angular matching of reflection pairs with a known unit cell identifies grain orientations [11, 61]. A dictionary–branch–bound search indexes superimposed Laue patterns from many grains [56]. LaueMatching instead correlates images directly with a precomputed library on a dense orientation grid, avoiding peak finding [57]. Neural networks trained on simulated patterns recognize Laue spot indices [51], while physics-informed machine learning enables mapping of grains smaller than the beam [10]. For neutrons, forward-model approaches recover grain positions and orientations from Laue patterns recorded at multiple sample orientations [53, 27].
Serial crystallography requires independent indexing of diffraction snapshots from many crystals. Pair-angle matching combined with nearest-neighbor matching indexes both Laue and monochromatic serial data [15]. pinkIndexer indexes polychromatic snapshots, including pink-beam macromolecular data [20]. For monochromatic serial data, XGANDALF uses extended gradient descent [21], TORO uses robust optimization [19], and a recent method searches orientations globally using differential evolution [43].
On IMAGINE-X, each image comes from a single crystal of known cell, as in single-crystal Laue diffraction, but has to be indexed unattended, from a single exposure, as it is collected, as in serial crystallography. The band can also span a factor of five in wavelength, so a high-angle peak of a protein crystal can have candidate reflections. With so many candidates, a random orientation indexes a large fraction of the observed peaks, so a solution has to be judged against the indexing expected by chance.
Here we describe an indexing algorithm for this regime. Given a known cell and wavelength band, it finds the crystal orientation by a global search over orientations that compares observed and predicted scattering directions, without assigning wavelengths in advance. The main developments are: (i) a formulation of quasi-Laue indexing as matching of directions against band-limited candidate shells, with harmonics collapsed to one direction per reciprocal-lattice row; (ii) a chance-match score that compares a solution with the indexing expected for a random orientation, which also selects the peaks that carry information about the orientation; (iii) an exact nearest-candidate search with a - tree and a persistent pool of worker processes, which together shorten a search for a protein crystal lattice by more than two orders of magnitude; and (iv) validation against time-of-flight indexing on MANDI and the first indexing of data from IMAGINE-X, including the detector geometry calibration this required.
The algorithm is evaluated using diffraction data from mesolite, rare-earth garnet and T4 lysozyme crystals collected on the IMAGINE, MANDI and IMAGINE-X instruments. We conclude with the limitations of the method and its place in the data reduction for IMAGINE-X.
Quasi-Laue diffraction geometry
This section sets out the geometry on which the indexing algorithm is built. We first fix the laboratory and reciprocal-space conventions, then write the Laue condition for a peak whose wavelength is unknown, and show how the wavelength band limits the reflections that can produce each peak. Two consequences of the missing wavelength, an undetermined cell scale and harmonic reflections that share a direction, shape the algorithm of § 3.
Conventions
Laboratory coordinates follow Mantid [1]. The incident beam travels along , points vertically up and horizontal completes a right-handed frame. A detected neutron of wavelength , scattered by the scattering (polar) angle (with the Bragg angle) at azimuth , travels along the direction of its final (scattered) wavevector, while the incident wavevector points along ,
and detector views are displayed with the horizontal and vertical angles and of the pixel position . We use the crystallographic convention without the factor . A reflection has scattering vector
where , , are the reciprocal basis vectors, is the interplanar spacing, is the upper-triangular reciprocal-lattice matrix, the Cholesky factor of the reciprocal metric tensor , is the orientation of the crystal on the goniometer and is the goniometer rotation [8]. The momentum transfer of Mantid is (with Q.convention set to Crystallography).
Laue condition and wavelength ambiguity
For each observed peak the detector position gives
the dimensionless scattering vector of the peak, with . Bragg’s law in vector form, , reads
Without time-of-flight, is unknown, so a peak fixes only the direction of :
The band restricts the reflections that can produce peak to the reciprocal-space shell
of candidates (Figure 1). Harmonics are collinear with and diffract into the same direction at , so the shell contains distinct directions, one per primitive reciprocal-lattice row ([14]).

Figure 1. Geometry of quasi-Laue diffraction in the horizontal plane. (a) Ewald construction for the band : reciprocal-lattice points (orange) between the Ewald spheres of radius and diffract, with scattering vector for the incident and final wavevectors and of length . Lines through the origin (green) are reciprocal-lattice rows, whose harmonics diffract into the same direction. (b) The same reflections in laboratory coordinates, with scattered rays (blue) from the sample at scattering angle to the detector (orange) at distance , for the incident beam . (c) Reciprocal lattice within in the crystal frame (open circles) and the region covered by the band for two orientations, with the reflections in the band for the actual orientation of the crystal filled.
Two consequences shape the algorithm. First, scaling every cell length by scales by , which is absorbed by in Eq. (4), so the absolute cell scale is not determined, only length ratios and angles. In the cubic case and Eq. (5) becomes , independent of . Second, the number of candidate directions grows with and with the cell volume, so high-angle peaks of large cells can be matched by almost any orientation.
Indexing algorithm
Laue indexing has to determine the Miller indices and the wavelength of every reflection at once, since many reciprocal-lattice vectors may satisfy a given scattering direction [11]. Autoindexing methods for monochromatic oscillation data [59, 50, 66] rely on a known wavelength. For polychromatic data, approaches include ab initio indexing of Laue patterns [39] and pink-beam indexing [20]. For large unit cells such as those of proteins, combinatorial matching must consider many candidate reflections per peak, missing and spurious peaks add to the combinations, and the orientation search space has many local minima [54]. In quasi-Laue diffraction the restricted band reduces, but does not remove, the coupling between wavelength and indexing [65, 42, 36, 5]. We therefore treat indexing as a global optimization over orientation for a known cell and band, using differential evolution (DE) [60], a population-based global optimizer that, like particle swarm optimization [28], needs neither gradients nor an initial guess. Miller indices and wavelengths are assigned implicitly for each trial orientation, with the band acting as a constraint Eq. (6).
Peak finding and scattering directions
Each camera image is background-subtracted with a median filter, and its noise is estimated from the median absolute deviation of the residual [64]. Row and column medians are then subtracted to remove line artifacts. The residual is convolved with a normalized Gaussian kernel of the spot size (one pixel) and divided by the noise of the result, giving the significance , where denotes convolution and the Euclidean norm of the kernel. Peaks are local maxima with , located by the residual-weighted centroid. A matched filter thresholds the summed signal of a spot rather than its brightest pixel, which matters for the faint spots that dominate at high scattering angles. Pixel positions, including any calibration, give through Eq. (3), and in the sample frame.
Orientation parameterization
The candidate orientation matrix is parameterized by a rotation about the unit axis ,
with the cross-product matrix (written out in Appendix § 7). The optimizer works on with
so that , and . The axis is uniform on the sphere and follows the density , so a uniform draw of is a uniform random rotation [37] (Appendix § 8). The DE initial population therefore covers orientation space without bias, while later generations concentrate near good solutions.
Objective function
For a trial , the angular error of peak is the angle to the nearest candidate direction in its shell,
which assigns and, through Eq. (5), . Unlike a residual in fractional indices, , Eq. (9) does not require , which is unknown. The objective is
a capped quadratic in with a bonus for every peak indexed within the tolerance (, ). Matching observed directions to lattice directions by a rotation, with spurious peaks present, is the constellation problem, and Eq. (10) is a trial-and-error objective of the kind reviewed by Morawiec [40], which requires a term that favors solutions with many matched peaks, here the bonus . The weights , normalized to unit mean, favor strong peaks with few candidates, where is the background-subtracted peak height clipped to its 10th–95th percentiles. The weights are capped at twice their mean so that no single peak dominates the objective. Peaks close to the direct beam have the fewest candidates and would otherwise receive the largest weights, although spurious features from the direct beam can also be detected there.
Evaluating Eq. (9) by scanning every candidate costs dot products per trial orientation, which reaches – for proteins at a wide band. The cost can be reduced with a nearest-neighbor search. Each candidate is represented by its direction in the Cartesian frame of the crystal, and each peak by its observed direction rotated into the same frame, . The distance between two unit vectors separated by an angle is , which increases monotonically with , so the candidate at the smallest angle is also the nearest neighbor of the rotated peak direction. Nearest neighbors can be found quickly in a -d tree (Bentley [4]), which is built once, before the search, because the candidate directions do not depend on the orientation.
One restriction must be respected. Each peak may be matched only by the candidates in its own shell , since a reflection from another shell would require a wavelength outside the band at that scattering angle. A single tree of all candidate directions would ignore this, and a separate tree for each peak would require hundreds of separate searches per trial orientation. Instead, we add a fourth coordinate that records which peak a candidate belongs to. Every candidate of peak is stored as the point and the peak is queried at , where is the index of the peak in the peak list and is a constant. The fourth coordinate is a dimensionless label with no physical meaning. It places the candidates of each peak in a separate layer of the four-dimensional space (Figure 2). Within a layer, two points are at most 2 apart, the largest distance between unit vectors, whereas points in different layers are at least apart. With (we use ), the nearest neighbor of the query for peak is therefore always one of its own candidates, exactly as if peak had a tree of its own. All peaks are then searched in a single call to one tree, which gives the same minimum as the scan at a fraction of the cost.
Figure 2. Labeled -d tree for the nearest-candidate search (schematic, not to scale). Left: the candidate directions of each peak are placed in a layer at height (here three peaks), and the space is split alternately along the direction and label coordinates. Right: the corresponding tree. The query for peak is its rotated observed direction in layer (×, peak 2). Because the layer spacing exceeds the largest chord between directions, its nearest neighbor (dashed circle) is always one of the candidates of the same peak (C).
Global search
The cost is minimized over by DE, which has also been used to search orientations in monochromatic serial indexing [43], with the rand/1/bin strategy, 300 population members per parameter (900, rounded up to 1024 by the Sobol initialization), dithered mutation in , crossover probability 0.5, up to 1000 generations and no final gradient polishing [60, 62]. Each generation is evaluated in parallel by worker processes (Algorithm 1). Only informative peaks are used. A peak whose chance of being matched by a random orientation exceeds 0.7 at the final tolerance is likely to match even at an incorrect orientation and therefore provides little discrimination, so it is indexed only once the orientation is known. This chance is evaluated with Eq. (12), conservatively for all candidates rather than the distinct directions, so that peaks with many harmonics are also excluded. From the informative peaks, the search uses a subset of up to 80. The peaks are ranked by , which favors strong peaks with few candidates, and taken in order, skipping any within of a peak already chosen so that the subset is spread over the detector. If fewer than 80 remain, the subset is filled by rank. Peaks with more than candidates are left out. The search uses a wide tolerance, , which broadens the basin of the true orientation. Its result is refined by assignment and alignment (§ 3.5) in two cycles on the subset and three on all informative peaks at , followed by three cycles at the final tolerance . Each attempt is scored by the chance-match score (§ 3.6), taking the more significant of its values at and . Up to three attempts are made with new seeds, stopping at the first that reaches . If none does, the most significant attempt is returned with its score, and the pattern is reported as not indexed. Differential evolution was chosen over particle swarm optimization [28] after a comparison with identical objective and peaks and equal numbers of objective evaluations (Appendix § 10). On six synthetic T4 lysozyme patterns and the measured T4 lysozyme pattern, at the largest tested budget, which uses the default population size, it found the correct orientation in 94% of single searches, against 83% for the best of four particle-swarm settings and 34–60% for the others, with one parameter setting for all test problems.
The workers can be organized in two ways. In our implementation the objective is a method of the optimizer object, so SciPy’s built-in pool sends it with every task, and with it the optimizer object and its candidate tables, which are copied to the workers again in every generation. In the persistent pool used here, the workers are started once, before the search, and each keeps its own copy of the prepared - tree (step 3 of Algorithm 1). In every generation they receive only the trial orientations, three numbers per member of the population, and return the objective values (steps 8–10).
Algorithm 1. Orientation search for a known cell and wavelength band.
Require: peak vectors and heights, cell , band , tolerances ,
find the candidate shell of each peak (Eq. (6)); keep informative peaks, (Eq. (12) with )
select the search subset (up to 80 peaks); build the labeled - tree of the points of its candidates
start worker processes, each holding a copy of ▷ once
for restart do
initialize a population of 1024 points in (Sobol)
for generation do
form trial points by mutation and crossover
send one chunk of trial points to each worker ▷ 3 numbers each
on each worker: ; nearest neighbor of in ; by Eq. (10) at
gather ; keep the better of each trial point and its parent
end for
assign and refine (Eq. (11)), reducing the tolerance from to
compute (Eq. (13)) at and at and keep the more significant; if then
stop
14: end for
15: keep the most significant restart; if then report the pattern as not indexed
16: index all peaks with its
17: return , ,
Assignment and orientation refinement
After the search, Miller indices are assigned by Eq. (9) and is updated by the weighted alignment of observed and predicted directions,
Wahba’s problem, solved in closed form by singular value decomposition [63, 26]. The same orthogonal Procrustes problem updates the orientation of each image in Laue-DIALS [23]. Assignment and alignment alternate, first on the search subset and then on all informative peaks, as is reduced from to .
Chance-match score
For a large cell at a wide band, many peaks are matched by chance whatever the orientation. At , a random orientation of T4 lysozyme indexes about two thirds of the observed peaks. The indexed fraction alone therefore cannot show whether a solution is correct, and we judge a solution instead by how far its number of indexed peaks exceeds the number expected for a random orientation. This plays the role that the figures of merit and play in powder indexing, which compare the observed matches with the number expected by chance for the proposed cell [67, 58]. In orientation indexing, figures of merit commonly count or fit the indexed reflections, or compare the best solution with the second best [40]; with candidates per peak, the number of matches expected by chance is large enough here that we compute it explicitly.
A cap of angular radius covers a fraction of the sphere. Under a random orientation each of the candidate directions of peak is uniformly distributed, and treating them as independent, the probability that at least one falls within of the peak is
The expected number of peaks indexed by a random orientation is .
The count itself is a sum of Bernoulli variables with probabilities , which we approximate by a Poisson distribution with mean . If a solution indexes peaks, its score is the Poisson tail
reported as , with more negative values indicating a larger excess over the chance background. To compare restarts and decide acceptance, a solution is scored at both the final and the search tolerance, each with its own , and the more significant value is used (§ 3.4), since residuals comparable to the final tolerance can place true matches just outside it. The same per-peak probabilities select the informative peaks used in the search.
Two approximations make a score for comparing restarts and stopping the search, rather than a calibrated probability that a solution is wrong. First, the candidate directions belong to one lattice and rotate together, so Eq. (12) only approximates each , and hence . The matches of different peaks are also correlated, which affects the shape of the distribution and in particular its tail. Second, Eq. (13) refers to one orientation fixed in advance, whereas the search examines many. Orientation space contains about distinguishable orientations at (Appendix § 11). A heuristic correction for this search volume would therefore require to be much smaller than before accidental matches anywhere in orientation space become unlikely, and for an adaptive search even this is only indicative. The acceptance threshold, , is therefore an empirically tested stopping criterion, not a false-positive rate of . Every final accepted solution reported below reaches .
Two tests check the score. The first checks the reference model. For the 351 informative T4 lysozyme peaks (§ 4.3), random orientations index on average 140.5 peaks within , with a standard deviation of 9.4, against and a Poisson standard deviation of 11.5. The model underestimates the mean by about 6% but overestimates the spread. A normal approximation using the measured mean and variance suggests that the score is conservative near the acceptance threshold (Appendix § 11). The second test checks the search itself, which could find chance solutions that random sampling would miss. Each observed peak was rotated about the incident beam by an independent random angle, which keeps its scattering angle and candidate shell but removes the lattice. Each scrambled pattern was searched with the full procedure of § 3.4, with up to three restarts scored by the more significant of the values at and . None of 20 such null searches for T4 lysozyme and 10 for mesolite was accepted, and the best scores were and . In half of the mesolite searches the score at was the more significant, but none came closer to the threshold than the best score at . Thirty searches (90 restarts) cannot establish a small false-positive rate, but none produced an accepted solution.
Lattice refinement and centering
With the assignments fixed, the lattice constants (constrained by the lattice system) and are refined by least squares on the vector residuals
clipped to the band. {#eq:14}
Since the scale is undetermined, one length is held fixed and only ratios and angles are refined. Centered cells are searched in a primitive cell, which has fewer systematically absent candidates. Let the columns of and be the conventional and primitive basis vectors, with for a centering matrix (Appendix § 9). The metric tensors and are related by and the indices transform as . The solution is returned in the conventional setting as , and its Miller indices obey the reflection conditions of the centering.
Detector geometry calibration
Angular residuals of a few tenths of a degree limit indexing of large cells, so the detector geometry of IMAGINE-X was calibrated with a garnet crystal (, , ) measured in 68 orientations with the 50 cameras installed at the time (24 in the back and 26 in the forward array). The 2722 reflections () were refined together with the goniometer axis, the reference orientation and an angle offset for each run. Each array was treated as rigid, with the sample at the origin. A common rotation of both arrays about the vertical axis is degenerate with the goniometer, so only their relative rotation was refined. Terms were added one at a time and kept only if they increased the fraction of peaks indexed within in a held-out half of the runs, for which only the angle offsets were refitted (Table 1). The relative rotation and the vertical and horizontal positions of the arrays raised this fraction from 25% to 59%. In-plane shifts of the individual cameras improved the fitted half but not the held-out half, which indicates overfitting, and were not retained.
| Refined terms | Added | Training | Held out | Residual |
| Goniometer1 | – | 32% | 25% | 0.22° |
| + relative array rotation | 1 | 57% | 33% | 0.23° |
| + array vertical positions | 2 | 75% | 42% | 0.24° |
| + array horizontal positions | 4 | 90% | 59% | 0.21° |
| + camera in-plane shifts | 100 | 95% | 60% | 0.18° |
Table 1. Calibration of the IMAGINE-X detector geometry on garnet as terms are added to the model, with the parameters added, the fraction of peaks indexed within 0.35° in the half of the runs used for the fit (training) and in the other half (held out, orientations refitted), and the median angular residual of the held-out reflections indexed within 0.35° (1361 peaks in each half), which can rise as more marginal peaks are indexed.
The second array is rotated by −1.17(7)° about the vertical axis relative to the first, the arrays are displaced vertically by 6.3(2) and 5.2(1) mm and horizontally by (−1.5, −3.8) and (4.0, 2.2) mm (uncertainties ≤ 0.5 mm), and the goniometer axis is tilted by 0.44° from the vertical. Since the arrays can be rotated about the sample, these corrections reflect the positions at which they are locked, together with the beam center. A repeated calibration, from which Table 1 is taken, reproduced these values. The uncertainties are formal. Residuals within a run are correlated, so they underestimate the true uncertainties, and the relative rotation varied between −0.76° and −1.17° depending on which other terms were refined. On the calibration runs, the median angular residual fell from 0.30° to 0.20°. The result is stored as ISAW DetCal files.
The calibration was tested on a crystal it was not fitted to, 79 mesolite runs (, , , Å) measured on IMAGINE-X and refined with the geometry held fixed. The fraction of held-out peaks indexed within 0.35° rose from 6% with the nominal geometry to 38%, and the refined ratios and deviate from the reference values (3.0788 and 0.3554) by 0.05% and 0.14%, against 0.21% and 0.68% before calibration.
Peak profiles
For display and validation (Figure 3 and Figure 4), each indexed or predicted peak is fitted in a box around its position with a two-dimensional Gaussian on a constant background,

Figure 3. Mesolite (NaCaAlSiO · 8HO, , , , Å) measured at IMAGINE on the cylindrical image plate in a single 15-minute exposure at Å, shown in unrolled detector coordinates. (a) Peaks found by the peak search, drawn as the ellipses of the fitted profiles (§ 3.9). (b) Peaks indexed with the determined matrix, labeled with . (c) Reflections predicted within the band down to Å. (d) Crystal structure of mesolite with the long axis vertical (Artioli et al., [2]; Ross et al., [55]); crystal axes , and in red, green and blue.

Figure 4. Garnet (, , Å) measured at MANDI (run 12607, 24 min, Å), with the time-of-flight information not used for indexing. (a) Detector counts of the main array of Anger cameras displayed with horizontal and vertical angles and , with reflection positions predicted down to Å (red circles). The smaller detectors in the upper left and right corners are prototype silicon photomultiplier (SiPM) detectors. (b) The bottom panel of detectors, mounted differently from the main array, in physical units. (c) One camera (bank 57) with indexed reflections labeled with and drawn as the ellipses of the fitted profiles (§ 3.9). (d) Crystal structure of the garnet ([16]); crystal axes , and in red, green and blue.
where is the pixel position, the peak amplitude, the peak center, the background, and the covariance has principal widths , and orientation . The parameters are obtained by least squares with a robust (soft-) loss, the integrated intensity is with its uncertainty propagated from the parameter covariance, and the peaks are drawn as the ellipses at three standard deviations. The indexing itself uses only peak positions and, as weights, their heights. The fitted profiles could, however, serve as an outlier diagnostic. Spurious detections such as hot pixels, streaks or edge artifacts tend to have a low signal-to-noise ratio or implausible shapes (widths at the fit bounds or extreme elongation), so they could be removed or down-weighted before the search.
Results
The algorithm was tested on three crystals spanning unit-cell volumes from to Å, measured on three instruments (Table 2). For every dataset, the cell and wavelength band were supplied, with no initial orientation. All timings are wall times on an Intel i9-13950HX workstation with 16 worker processes and the default search settings of § 3.4 (1024 population members, at most 1000 generations, up to three restarts).
Indexing results. Found: peaks detected. Informative: peaks with , used for refinement and scoring, from which the search subset of up to 80 peaks is drawn (§ 3.4). Indexed: share of informative peaks indexed within , with the share expected for a random orientation (chance) and counts in parentheses, with from Eq. (13). Residual: median angular error of indexed reflections. Time: wall time of the orientation search with 16 workers, for the run shown (mesolite, T4 lysozyme) or the median over the 93 settings (garnet).
| Crystal | Instrument | (Å) | Found | Informative | Indexed | Chance | Residual | Time | |
| Mesolite () | IMAGINE | 2–4.5 | 173 | 173 | 91% (157) | 3.1% (5.3) | −167 | 43 s | |
| Garnet () | MANDI | 1–3 | 43 | 43 | 100% (43) | 4.2% (1.8) | −41.7 | 45 s | |
| T4 lysozyme () | IMAGINE-X | 2–10 | 833 | 351 | 65% (229) | 38% (132) | −13.8 | 101 s |
Table 2. Indexing results. Found: peaks detected. Informative: peaks with , used for refinement and scoring, from which the search subset of up to 80 peaks is drawn (§ 3.4). Indexed: share of informative peaks indexed within , with the share expected for a random orientation (chance) and counts in parentheses, with from Eq. (13). Residual: median angular error of indexed reflections. Time: wall time of the orientation search with 16 workers, for the run shown (mesolite, T4 lysozyme) or the median over the 93 settings (garnet).
Garnet: medians over 93 goniometer settings (3851 reflections), with 84.3% of assignments identical to time-of-flight indexing, 15.5% harmonics, none different.
Mesolite on IMAGINE
A single 15-minute image-plate exposure of mesolite (, , , Å) at Å gave 173 peaks, of which 157 were indexed within against 5.3 expected for a random orientation (), with a median angular residual of (Figure 3). The long axis makes the reflections dense along one direction, but the narrow band keeps the number of candidates per peak small, so a single search of 43 s sufficed. Ten searches with independent seeds found the identical orientation.
Garnet on MANDI: comparison with time-of-flight indexing
MANDI (Coates et al., [13]) resolves the wavelength of every reflection by time-of-flight, which gives an independent reference. The 3851 reflections of a garnet calibration series (YbAlO, , Å, 93 goniometer settings, Å) were indexed by the time-of-flight matrix determined with Mantid (Arnold et al., [1]). We discarded their wavelengths, kept only their directions, and indexed each setting independently as if it were a quasi-Laue measurement (Figure 4). All 93 searches succeeded, with between and , and 99.8% of the reflections tions were indexed with a median residual of . The assignments agree with time-of-flight for 84.3% of the reflections, and the remaining 15.5% are harmonics ( in place of ), which diffract into the same direction and cannot be distinguished without wavelength [14]; no peak received a different reciprocal-lattice row. With the band restricted to the observed Å, the harmonic share falls to 3.2% while the score is unchanged, since the wider band adds only lower orders of reciprocal-lattice rows already among the candidates. For each setting, the wavelengths implied by the assignment, , were compared with the time-of-flight values over all indexed reflections. The median across the 93 settings of the within-setting median absolute relative difference is 0.07%. Harmonic assignments are included. Their wavelengths differ by an integer factor, but they form a minority of the observations, so the median primarily characterizes the non-harmonic assignments. The orientations differ from the common time-of-flight UB by a median of 0.27°, which reflects the per-setting goniometer errors absorbed by the independent searches rather than errors of the indexing.
The time-of-flight peak list contains no false detections, so we also tested the effect of spurious peaks. For 19 of the settings, directions of peaks from other settings, which fall on the detector but are unrelated to the lattice in that setting, were added in numbers equal to 10, 25, 50 and 100% of the true peaks. Every search still found the correct orientation and indexed at least 97% of the true peaks, with a median of and a worst case of even with as many spurious as true peaks. The spurious peaks were indexed at the rate expected by chance (4.3% against 4.1% when they equaled the true peaks in number), so they weaken the score but do not mislead the search.
T4 lysozyme on IMAGINE-X
T4 lysozyme (, Å) at the full band of IMAGINE-X ( Å) is the hardest case. A high-angle peak has up to candidate reflections, and a random orientation indexes about two thirds of the found peaks within . With the matched-filter peak search, 833 peaks were found, of which 351 were informative (§ 3.4; Figure 5). The solution indexes 229 of them within against 132 expected by chance (), and 127 within against 53 (), and ten searches with independent seeds converged to the same orientation within (median 75 s each, against 101 s for the run in Table 2).

Figure 5. T4 lysozyme (, refined room-temperature cell , Å) measured at IMAGINE-X (run 1816, Å) with the 50 cameras installed at the time, after array-level calibration of the detector geometry on garnet (§ 3.8). (a) Background-subtracted counts of the forward (left) and back (right) arrays displayed with horizontal and vertical angles and , with the 833 peaks found by the matched-filter search colored by their angular error to the nearest candidate reflection direction within the band (values above 0.5° in the top color). At high scattering angles the candidate directions are dense, so small errors there are also expected by chance. (b) Percentage of the 351 informative peaks (chance-match probability below 0.7, used for refinement and scoring) indexed by the refined solution as a function of angular tolerance, compared with the expectation (dashed) and Poisson band (shaded) for a random orientation. (c) Crystal structure of T4 lysozyme ((Li et al., 2017)); crystal axes , and in red, green and blue.
The solution was tested on the five following runs of the same crystal, each rotated by a further about the vertical goniometer axis (Table 3). Each run was indexed from the refined orientation of the previous run, rotated by the goniometer step, and refined locally. This tests the transfer of an established orientation and its local refinement, not independent global indexing of each pattern. Successful prediction across the series provides evidence that the orientation of the first run is correct. The predicted orientations already passed the threshold before refinement ( between and ), refinement moved them by only –, and the refined solutions reached between and . A rotation of the same size in the opposite sense did not index the second run (). Over the series, the refined orientations rotate by about an axis from vertical, against expected, with between and . The third run () was also indexed on its own by the global search. Five searches with independent seeds converged within of the orientation predicted by the series and reached after refinement.
| Run | Informative peaks | Predicted Indexed | Predicted | Refined Indexed | Refined | Correction | |
| 1816 | 351 | – | – | 237 / 132 | – | ||
| 1818 | 383 | 225 / 142 | 251 / 142 | ||||
| 1820 | 379 | 218 / 143 | 243 / 143 | ||||
| 1822 | 357 | 197 / 131 | 225 / 132 | ||||
| 1824 | 347 | 215 / 131 | 239 / 132 | ||||
| 1826 | 347 | 198 / 129 | 224 / 130 |
Table 3. Rotation series of T4 lysozyme on IMAGINE-X. Run 1816 was indexed by the global search (seed 1, which gives a slightly more significant solution than the run of Table 2). Every run starts from the same room-temperature cell (, Å). Each later run was indexed from the refined orientation of the previous run rotated by about the vertical goniometer axis (predicted) and then refined locally (refined). Indexed: informative peaks indexed within against the number expected for a random orientation. The local refinement also refines the cell ratio , which changes the candidate shells and hence the expected count. : nominal goniometer rotation relative to run 1816. Correction: rotation applied by the local refinement.
Indexing required the array-level calibration. With the nominal geometry the best orientation did not pass the threshold (), within the range of the null searches (§ 3.6). This highlights the importance of a well-calibrated instrument, since for a large cell at a wide band the angular tolerance that separates true from chance matches is only a few tenths of a degree. The search was first run with the cell of the 80 K structure 5VNQ (Li et al., 2017) (). On an earlier list of 282 peaks from a local-maximum search, it found an orientation of marginal significance (), and two of four seeds did not pass the threshold. Searches with trial room-temperature cells (–) converged to within of the same orientation with more significant scores, and refining from one of these solutions, with fixed, gave . This room-temperature cell (, Å), longer in than the 80 K cell, is used for all T4 lysozyme results here. A plausible refined cell is a consistency check on the solution, although not an independent one, since the cell and the score both use the assigned reflections. The remaining angular errors are largest on the forward low-angle cameras (Figure 5a), which points to per-camera geometry beyond the array-level model. Many of the peaks outside the tolerance appear to be true reflections with larger errors. Increasing the tolerance to indexes 95% of the informative peaks (334 of 351; Figure 5b), and the peaks that need the larger tolerance are concentrated at small scattering angles ( for 47% of them, against 15% of the peaks indexed within ) and near the edges of the cameras (40% within 16 of the 128 pixels of an edge, against 21%). In our experience with time-of-flight diffraction, these are also the regions where the detector geometry is hardest to calibrate, which suggests that much of the remaining error comes from the calibration. More chance matches are also expected at the larger tolerance (Figure 5b), so not every additional match at need be correct.
Computational performance
The cost of a trial orientation is dominated by the nearest-candidate search of Eq. (9). Figure 6 compares complete searches for T4 lysozyme in a reduced configuration, smaller than the default search (the pattern of Table 2, 80 search peaks, 60 population members per parameter, rounded up to 256, 300 generations, same seed), and every search reaches the same orientation. All three configurations use SciPy’s differential_evolution ([62]); they differ only in how the objective is evaluated and how the population is distributed over worker processes (Table 4).
| Configuration | Objective | Parallel evaluation |
| Candidate scan, SciPy pool | full scan | SciPy, workers= |
| -d tree, SciPy pool | -d tree | SciPy, workers= |
| -d tree, persistent pool | -d tree | persistent pool |
Table 4. Configurations compared in Figure 6. All use SciPy’s differential evolution, and workers is its argument for evaluating the population in parallel.

Figure 6. Wall time of one differential-evolution search for T4 lysozyme (run 1816; 80 peaks, 60 population members per parameter, 300 generations, same seed) against the number of worker processes (Intel i9-13950HX, 32 threads), for the scan over all candidate reflections and the -d tree, each distributed with SciPy’s pool, and for the -d tree distributed with a persistent pool. Lines: fits of Eq. (15), with s, s, s (scan) and s, s, s (tree, persistent pool), and s with negligible and (tree, SciPy pool, fitted from 2 workers, since SciPy evaluates serially without a pool for one worker, and the dotted line marks this switch). All searches reach the same orientation.
Replacing the scan over all candidates by the -d tree shortens a serial search from 1320 s to 24 s. Distributing the population with SciPy’s built-in pool re-sends the optimizer, including its candidate tables, with every task (§ 3.4), so the scan stops improving beyond 8 workers (362 s) and slows down at 32 (511 s). The two changes are separated by the third curve, the -d tree distributed with SciPy’s pool.
Serially it takes 23 s, as with the persistent pool, but with workers its wall time grows in proportion to their number, from 949 s with 2 workers to 15 671 s with 32. Sending the optimizer, now including the -d tree, to the workers costs far more than the search it distributes, so the fast objective pays off only together with the persistent pool. This overhead arises because our objective is a method of an optimizer object that carries the candidate tables, so it is a property of this implementation rather than of SciPy’s parallel evaluation in general. A persistent pool that receives the -d tree once and is sent only trial orientations reaches 4.9 s with 32 workers, 270 times faster than the serial scan (1320 s with one worker). The wall times follow
Amdahl’s law with a serial part and a parallel part , plus an overhead per worker. Both implementations parallelize about 90% of the work ( for the scan and 0.89 for the tree), and the remainder is the serial per-generation step of differential evolution. With SciPy’s pool, the per-worker overhead is s for the scan and s for the -d tree, whose larger optimizer is more expensive. to send. The persistent pool reduces it to 0.06 0.03 s, which moves the optimum from about 11 workers for the scan to 18 for the tree.
Discussion
The chance-match score changes how a quasi-Laue indexing result can be judged. For small cells, such as mesolite and garnet, a random orientation indexes a few percent of the peaks, and the indexed fraction is a sufficient criterion. For T4 lysozyme at the full band of IMAGINE-X, a random orientation indexes almost 40% of the informative peaks and about two thirds of all peaks. A correct and an incorrect orientation then differ by tens of peaks out of hundreds, and the comparison with the chance expectation gives an explicit measure of their separation. The same comparison identifies the peaks to use in the search. Excluding the 58% of peaks that a random orientation matches more than 70% of the time reduced of the T4 lysozyme search solution by more than five orders of magnitude, with decreasing from −7.9 to −13.3.
The method has limitations. The unit cell must be known, and because wavelengths are not measured, only ratios of cell lengths and the angles can be refined. The absolute scale must come from elsewhere. The repeated T4 lysozyme searches test orientation recovery for the prepared room-temperature cell. They do not establish unattended recovery from the 80 K reference cell, which gave only a marginal solution, so for large cells an approximate cell may first have to be refined. On MANDI, 15.5% of the reflections were assigned a different harmonic order than by time-of-flight at a band of 1–3 Å, and 3.2% at 1–2 Å. Deconvolution of harmonic overlaps is left to integration [14, 9]. For large cells, the angular precision required is a few tenths of a degree, and the T4 lysozyme data could be indexed only after the detector geometry had been calibrated. The remaining errors on the low-angle cameras suggest that further calibration of the individual cameras could improve it. Finally, each image is assumed to contain one lattice.
This work was developed alongside subhkl (https://github.com/neutrons/subhkl), an open-source package for the reduction of IMAGINE-X data under development by several of the authors. subhkl uses a related global search by differential evolution, implemented for graphics processors, together with refinement of the instrument geometry, integration of overlapping and harmonic reflections, wavelength normalization and scaling, and will be described separately. The chance-match score, the selection of informative peaks and the -d tree search introduced here are complementary to that implementation and can be adopted within it. Interactive indexing, with visualization of the solutions, may be made available in NeuXtalViz (Morgan et al., [41]).
Conclusion
We have described an algorithm that indexes quasi-Laue neutron diffraction patterns for a known cell and wavelength band without measuring wavelengths. A global search by differential evolution, an exact -d tree search of candidate reflection directions and a chance-match score against random orientations together make the indexing automatic, fast and verifiable, from small inorganic cells to protein crystals at a wide band. On MANDI, the indexing agrees with time-of-flight for every indexed reflection up to the harmonic order, and on the new IMAGINE-X instrument it indexes T4 lysozyme over the full 2–10 Å band, where ten independent searches converge to the same orientation within . Rotated by the goniometer and refined locally, that orientation also indexes five further runs of a rotation series.
The implementation described here uses Mantid (Arnold et al., [1]) for the instrument geometry, data loading and peak prediction, and SciPy (Virtanen et al., [62]) for the optimization. The source code, together with the scripts that reproduce the results, is available at https://github.com/zjmorgan/quasi-laue-reduction.
Rotation matrix
Rotation matrix
The orientation search of § 3.2 does not vary the nine elements of directly, which would also produce matrices that are not rotations, but the three angles of an axis and a rotation about it. Every set of angles then gives a proper rotation, and the search space has the three dimensions of orientation space. For reference, the rotation matrix of Eq. (7) is written out here in terms of these angles.
With and , , Eq. (7) is
with , , , and , , .
Uniform sampling of orientations
A global search is only unbiased if its trial orientations cover orientation space evenly. Otherwise some orientations are examined far more often than others, and a crystal in a sparsely sampled orientation may be missed. Drawing the axis angles and the rotation angle uniformly does not achieve this, because equal ranges of these angles do not correspond to equal volumes of orientation space. This appendix shows how the parameterization of Eq. (8) corrects for this, and illustrates the difference.
Uniform give uniform on , uniform on and with cumulative distribution , the angle distribution of uniformly random rotations [37]. Sampling or uniformly instead would concentrate trial orientations near the poles of the axis sphere or near the identity. The distributions of the three parameters are shown in Figure 7, and the resulting orientations in Figure 8.

Figure 7. Probability densities (green, left axes) and cumulative distributions (orange, right axes) of the orientation parameters for uniformly random rotations. (a) Polar angle of the rotation axis, . (b) Azimuthal angle of the rotation axis, . (c) Rotation angle, . Drawing , and uniformly and inverting (Eq. (8)) samples each distribution.

Figure 8. Directions of the rotated basis vectors , and for random orientations. (a)–(c) Rotation axis drawn uniformly on the sphere (uniform sphere point picking) but rotation angle drawn uniformly in , which over-weights small rotations and concentrates each pole near its starting direction. (d)–(f) Uniform orientation sampling by Eq. (8), which covers the sphere uniformly.
Centering matrices
For a centered lattice, the conventional cell contains two, three or four lattice points, and many of its reflections are systematically absent. Searching in the conventional cell would include these absent reflections among the candidates of every peak, adding chance matches without adding information. The search is therefore carried out in a primitive cell of the same lattice (§ 3.7), and the solution is converted back to the conventional setting. This appendix lists the matrices used for that conversion.
The columns of are the primitive basis vectors in units of the conventional ones,
:
with for the obverse setting of a rhombohedral lattice on hexagonal axes. Each has a positive determinant, equal to the inverse of the number of lattice points in the conventional cell (, or ), so the primitive cell has the same handedness and remains a proper rotation. Miller indices transform as , which gives integer obeying the reflection conditions of the centering. The reflection conditions applied to the conventional indices are listed in Table 5.
| Centering | Symbol | Condition |
| Primitive | none | |
| -face centered | ||
| -face centered | ||
| -face centered | ||
| Body centered | ||
| All-face centered | , , | |
| Rhombohedral (obverse) |
Table 5. Lattice centerings and the reflection conditions applied to conventional Miller indices, where is an integer.
Comparison of optimizers
The global search could use any population-based optimizer that needs neither gradients nor an initial guess. To choose one, differential evolution was compared with particle swarm optimization [28] under identical conditions. with the same informative peaks and coarse subset, objective, -d tree, worker pool and subsequent assignment and Wahba refinement (Algorithm 1) and only the optimizer replaced. The test problems were six synthetic T4 lysozyme patterns at random orientations (, 300 peaks, angular noise) and the measured pattern of Table 2, with the refined solution as reference. Each combination of problem, optimizer and budget was searched once, without restarts, with five seeds. A search succeeded if the refined orientation was within of the reference, up to the symmetry of the lattice, and . Particle swarm used a global-best swarm with as many particles as the differential-evolution population, which SciPy’s Sobol initialization rounds up to a power of two (256 for a nominal 180 and 1024 for 900), so that both optimizers made the same number of objective evaluations, with four combinations of the inertia and the acceleration coefficients , while differential evolution used the settings of § 3.4.
Table 6 lists the successes. At the smallest budget the best particle-swarm setting succeeded more often than differential evolution (16 against 9 of 35), and at the intermediate budget about as often (20 against 19). At the largest tested budget, which uses the default population size, differential evolution succeeded in 94% of searches against 83% for the best particle swarm. Particle swarm was also sensitive to its parameters, with 34–83% success at the largest budget depending on the setting, whereas differential evolution used one parameter setting for all test problems.
| Optimizer | () | () | () |
| DE | 9 (26%) | 19 (54%) | 33 (94%) |
| PSO, , | 6 (17%) | 8 (23%) | 12 (34%) |
| PSO, , | 7 (20%) | 10 (29%) | 21 (60%) |
| PSO, , | 12 (34%) | 13 (37%) | 20 (57%) |
| PSO, , | 16 (46%) | 20 (57%) | 29 (83%) |
Table 6. Successful searches out of 35 (seven problems, five seeds) for differential evolution (DE) and particle swarm optimization (PSO) at three budgets (nominal population per parameter generations), with the number of objective evaluations, equal for both optimizers, below each budget and the success rate in parentheses.
The difference is consistent with how the two optimizers keep the population diverse. The objective has a narrow basin at the true orientation and many local minima where chance matches accumulate. In global-best particle swarm every particle is drawn toward the single best position found so far, so the swarm can contract onto one of these false minima before the true basin is sampled. With the rand/1/bin strategy, differential evolution has no such common attractor. Each trial vector is built from randomly chosen members and replaces only its own parent, and its steps, scaled differences between members, shrink only as the population itself contracts. In line with this, particle swarm did better with the more exploratory settings, larger inertia and acceleration coefficients (Table 6). Its faster contraction is an advantage when few evaluations are available, while at the largest tested budget the results are consistent with more frequent trapping in false minima.
Chance-match model
This appendix gives the details behind the interpretation of the chance-match score in § 3.6.
For a sum of independent Bernoulli variables with probabilities , the error of a Poisson approximation with mean is bounded by ([29]), so the approximation is best for peaks with small . For large cells at a wide band this bound is uninformative ( for the T4 lysozyme peaks). For independent matches the Poisson variance would exceed the Bernoulli variance and widen the tail, making the score conservative, but because the matches are correlated this is not guaranteed.
The number of distinguishable orientations follows from the density of rotation angles [37]. Integrating it up to gives the probability that a random rotation lies within of a given one, so orientation space contains about distinguishable orientations, at , comparable to the orientations of the grid used for library-based Laue indexing [57]. Multiplying by this count estimates the expected number of chance solutions with that score anywhere in orientation space, so must be well below before such a solution becomes unlikely. It treats the orientations as independent trials, which an adaptive search followed by refinement is not, so it is a heuristic rather than a rigorous bound.
For the 351 informative T4 lysozyme peaks, the random orientations give a mean of 140.5 indexed peaks and a variance of 89, against and a Poisson variance of 132. A normal distribution with the observed mean and variance has a larger upper tail than Eq. (13) below about 170 indexed peaks and a smaller one above. The acceptance threshold, , corresponds to about 184 peaks, above this crossover, which suggests that the score is conservative near the threshold. Because orientations do not sample the far tail, this is not a guarantee.
Acknowledgements
The authors would like to acknowledge Aaron Celestian, Minerals Curator at the Natural History Museum of Los Angeles County, who provided the mesolite single crystal sample used as a standard crystal for diffraction comparison in this work.
This material is based upon work supported by the US Department of Energy, Office of Science, Office of Basic Energy Sciences Biopreparedness Research Virtual Environment (BRaVE) program.
NW and IY acknowledge support through the ORNL Next Generation Pathways to Computing (NextGen) program. FH acknowledges the ORNL Next Generation STEM Internship (NGSI) program.
This research used resources at the High Flux Isotope Reactor and Spallation Neutron Source, a DOE Office of Science User Facility operated by the Oak Ridge National Laboratory. The beam time was allocated to IMAGINE and MANDI on proposal numbers IPTS-8776, 34720 and 37331.
This manuscript has been authored by UT-Battelle, LLC, under contract DE-AC05-00OR22725 with the US Department of Energy (DOE). The US government retains and the publisher, by accepting the article for publication, acknowledges that the US government retains a nonexclusive, paid-up, irrevocable, worldwide license to publish or reproduce the published form of this manuscript, or allow others to do so, for US government purposes. DOE will provide public access to these results of federally sponsored research in accordance with the DOE Public Access Plan (https://www.energy.gov/doe-public-access-plan).
References
- [1]Arnold, O., Bilheux, J. C., Borrero, J. M., Buts, A., Campbell, S. I., Chapon, L., Doucet, M., Draper, N., Ferraz Leal, R., Geiger, M. A., Lynch, V. E., Markvardsen, A., Mikkelson, D. J., Mikkelson, R. L., Miller, R., Palmen, K., Parker, P., Passos, G., Perring, T. G., Peterson, P. F., Ren, S., Reuter, M. A., Savici, A. T., Taylor, J. W., Taylor, R. J., Tolchenov, R., Zhou, W. & Zikowsky, J. (2014). Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment, 764, 156–166.
- [2]Artioli, G., Smith, J. V. & Pluth, J. J. (1986). Acta Crystallographica Section C, 42(8), 937–942.
- [3]Begam, K., Morgan, Z., Myles, D. A. A. & Glaser, J. (2025). Acta Crystallographica Section D: Structural Biology, 81(12), 758–768.
- [4]Bentley, J. L. (1975). Communications of the ACM, 18(9), 509–517.
- [5]Blakeley, M. P., Teixeira, S. C. M., Petit-Haertlein, I., Hazemann, I., Mitschler, A., Haertlein, M., Howard, E. & Podjarny, A. D. (2010). Acta Crystallographica. Section D, Biological Crystallography, 66(11), 1198–1205.
- [6]Bragg, W. H. & Bragg, W. L. (1913). Proceedings of the Royal Society of London. Series A, 88(605), 428–438.
- [7]Bragg, W. L. (1913). Proceedings of the Cambridge Philosophical Society, 17, 43–57.
- [8]Busing, W. R. & Levy, H. A. (1967). Acta Crystallographica, 22(4), 457–464.
- [9]Campbell, J. W. (1995). Journal of Applied Crystallography, 28(2), 228–236.
- [10]Chan, K. H., Huang, X., Tamura, N. & Chen, X. (2025). Journal of Applied Crystallography, 58(6), 1880–1886.
- [11]Chung, J.-S. & Ice, G. E. (1999). Journal of Applied Physics, 86(9), 5249–5255.
- [12]Coates, L., Cao, H. B., Chakoumakos, B. C., Frontzek, M. D., Hoffmann, C., Kovalevsky, A. Y., Liu, H., Meilleur, F., dos Santos, A. M., Myles, D. A. A., Wang, X. P. & Ye, F. (2018). Review of Scientific Instruments, 89(9), 092802.
- [13]Coates, L., Cuneo, M. J., Frost, M. J., He, J., Weiss, K. L., Tomanicek, S. J., McFeeters, H., Vandavasi, V. G., Langan, P. & Iverson, E. B. (2015). Journal of Applied Crystallography, 48(4), 1302–1306.
- [14]Cruickshank, D. W. J., Helliwell, J. R. & Moffat, K. (1987). Acta Crystallographica Section A: Foundations of Crystallography, 43(5), 656–674.
- [15]Dejoie, C. & Tamura, N. (2020). Journal of Applied Crystallography, 53(3), 824–836.
- [16]Dobrzycki, L., Bulska, E., Pawlak, D. A., Frukacz, Z. & Woźniak, K. (2004). Inorganic Chemistry, 43(24), 7656–7664.
- [17]Friedrich, W., Knipping, P. & Laue, M. (1913). Annalen der Physik, 346, 971–988.
- [19]Gasparotto, P., Barba, L., Stadler, H.-C., Assmann, G., Mendonça, H., Ashton, A. W., Janousch, M., Leonarski, F. & Béjar, B. (2024). Journal of Applied Crystallography, 57(4), 931–944.
- [20]Gevorkov, Y., Barty, A., Brehm, W., White, T. A., Tolstikova, A., Wiedorn, M. O., Meents, A., Grigat, R.-R., Chapman, H. N. & Yefanov, O. (2020). Acta Crystallographica Section A: Foundations and Advances, 76(2), 121–131.
- [21]Gevorkov, Y., Yefanov, O., Barty, A., White, T. A., Mariani, V., Brehm, W., Tolstikova, A., Grigat, R.-R. & Chapman, H. N. (2019). Acta Crystallographica Section A: Foundations and Advances, 75(5), 694–704.
- [22]Helliwell, J. R., Habash, J., Cruickshank, D. W. J., Harding, M. M., Greenhough, T. J., Campbell, J. W., Clifton, I. J., Elder, M., Machin, P. A., Papiz, M. Z. & Zurek, S. (1989). Journal of Applied Crystallography, 22(5), 483–497.
- [23]Hewitt, R. A., Dalton, K. M., Mendez, D. A., Wang, H. K., Klureza, M. A., Brookner, D. E., Greisman, J. B., McDonagh, D., Šrajer, V., Sauter, N. K., Brewster, A. S. & Hekstra, D. R. (2024). Structural Dynamics, 11(5), 054701.
- [24]Huang, V. W., Liu, Y., Raghothamachar, B. & Dudley, M. (2023). Journal of Applied Crystallography, 56(5), 1610–1615.
- [25]Jacobson, R. A. (1986). Journal of Applied Crystallography, 19(5), 283–286.
- [26]Kabsch, W. (1976). Acta Crystallographica Section A: Crystal Physics, Diffraction, Theoretical and General Crystallography, 32(5), 922–923.
- [27]Kacprzak, T., Samothrakitis, S., Larsen, C. B., Kopeček, J., Strobl, M., Polatidis, E. & Obozinski, G. (2024). Laue indexing with optimal transport. arXiv:2404.06478.arxiv.org/abs/2404.06478
- [28]Kennedy, J. & Eberhart, R. (1995). In Proceedings of ICNN’95 - International Conference on Neural Networks, vol. 4, pp. 1942–1948 vol.4.
- [29]Le Cam, L. (1960). Pacific Journal of Mathematics, 10(4), 1181–1197.
- [31]Loyd, M., Khaplanov, A., Sedov, V., Beal, J., Visscher, T., Donahue, C., Montcalm, C., Warren, G., Butz, R., Boone, C., Hart, C., Riedel, R. & Diawara, Y. (2024). Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment, 1058, 168871.
- [32]McIntyre, G. J. (2015). Journal of Physics D: Applied Physics, 48(50), 504002.
- [33]Meilleur, F., Coates, L., Cuneo, M. J., Kovalevsky, A. & Myles, D. A. A. (2018). Crystals, 8(10), 388.
- [34]Meilleur, F., Kovalevsky, A. Y. & Myles, D. A. A. (2020). Methods in Enzymology, 634(1), 69–85.
- [35]Meilleur, F., Munshi, P., Robertson, L., Stoica, A. D., Crow, L., Kovalevsky, A., Koritsanszky, T., Chakoumakos, B. C., Blessing, R. & Myles, D. A. A. (2013). Acta Crystallographica Section D: Biological Crystallography, 69(10), 2157–2160.
- [36]Meilleur, F., Myles, D. A. A. & Blakeley, M. P. (2006). European biophysics journal: EBJ, 35(7), 611–620.
- [37]Miles, R. E. (1965). Biometrika, 52(3-4), 636–639.
- [38]Moffat, K. (2001). Chemical reviews, 101(6), 1569–1582.
- [39]Morawiec, A. (2021). Journal of Applied Crystallography, 54(1), 333–337.
- [40]Morawiec, A. (2022). Indexing of Crystal Diffraction Patterns: From Crystallography Basics to Methods of Automatic Indexing, vol. 326 of Springer Series in Materials Science. Cham: Springer.
- [41]Morgan, Z., Xiao, Z., Pawledzio, S., Ye, I., Loughlin, K., Jin, S., Lynch, V., Proffen, T., Hoffmann, C. & Wang, X. (2026). Journal of Applied Crystallography, 59(6).
- [42]Myles, D. A. A., Bon, C., Langan, P., Cipriani, F., Castagna, J. C., Lehmann, M. S. & Wilkinson, C. (1997). Physica B: Condensed Matter, 241-243, 1122–1130.
- [43]Nasser, M. M., Poitevin, F. & Dalton, K. M., (2025). Robust indexing for challenging serial X-ray diffraction patterns. arXiv:2511.22875.arxiv.org/abs/2511.22875
- [45]Ouladdiaf, B., Archer, J., Allibon, J. R., Decapentrie, P., Lemée-Caillau, M.-H., Rodríguez-Carvajal, J., Hewat, A. W., York, S., Brau, D. & McIntyre, G. J. (2011). Journal of Applied Crystallography, 44(2), 392–397.
- [46]Ouladdiaf, B., Archer, J., McIntyre, G. J., Hewat, A. W., Brau, D. & York, S. (2006). Physica B: Condensed Matter, 385–386, 1052–1054.
- [47]Pierce, J., Cuneo, M. J., Jennings, A. I., Li, L., Meilleur, F., Zhao, J. & Myles, D. A. A. (2020). In Methods in Enzymology, edited by P. C. E. Moody, vol. 634 of Neutron Crystallography in Structural Biology, pp. 153–175. Academic Press.
- [48]Piltz, R. O. (2018a). Journal of Applied Crystallography, 51(3), 635–645.
- [49]Piltz, R. O. (2018b). Journal of Applied Crystallography, 51(3), 963–965.
- [50]Powell, H. R., Johnson, O. & Leslie, A. G. W. (2013). Acta Crystallographica Section D: Biological Crystallography, 69(7), 1195–1203.
- [51]Purushottam Raj Purohit, R. R. P., Tardif, S., Castelnau, O., Eymery, J., Guinebretière, R., Robach, O., Ors, T. & Micha, J.-S. (2022). Journal of Applied Crystallography, 55(4), 737–750.
- [52]Ravelli, R. B. G., Hezemans, A. M. F., Krabbendam, H. & Kroon, J. (1996). Journal of Applied Crystallography, 29(3), 270–278.
- [53]Raventós, M., Tovar, M., Mader, M., Shang, T., Strobl, M., Samothrakitis, S., Pomjakushina, E., Grünzweig, C. & Schmidt, S. (2019). Scientific Reports, 9, 4798.
- [54]Ren, Z., Bourgeois, D., Helliwell, J. R., Moffat, K., Srajer, V. & Stoddard, B. L. (1999). Journal of Synchrotron Radiation, 6(4), 891–917.
- [55]Ross, M., Flohr, M. J. K. & Ross, D. R. (1992). American Mineralogist, 77(7-8), 685–703.
- [56]Seret, A., Gao, W., Juul Jensen, D., Godfrey, A. & Zhang, Y. (2022). Journal of Applied Crystallography, 55(5), 1085–1096.
- [57]Sharma, H., Sheyfer, D., Harder, R. & Tischler, J. Z. (2026). Journal of Applied Crystallography, 59(2), 552–563.
- [58]Smith, G. S. & Snyder, R. L. (1979). Journal of Applied Crystallography, 12(1), 60–65.
- [59]Steller, I., Bolotovsky, R. & Rossmann, M. G. (1997). Journal of Applied Crystallography, 30(6), 1036–1040.
- [60]Storn, R. & Price, K. (1997). Journal of Global Optimization, 11(4), 341–359.
- [61]Tamura, N., MacDowell, A. A., Spolenak, R., Valek, B. C., Bravman, J. C., Brown, W. L., Celestre, R. S., Padmore, H. A., Batterman, B. W. & Patel, J. R. (2003). Journal of Synchrotron Radiation, 10(2), 137–143.
- [62]Virtanen, P., Gommers, R., Oliphant, T. E., Haberland, M., Reddy, T., Cournapeau, D., Burovski, E., Peterson, P., Weckesser, W., Bright, J., van der Walt, S. J., Brett, M., Wilson, J., Millman, K. J., Mayorov, N., Nelson, A. R. J., Jones, E. K. R., Larson, E., Carey, C. J., Polat, I., Feng, Y., Moore, E. W., VanderPlas, J., Laxalde, D., Perktold, J., Cimmrman, R., Henriksen, I., Quintero, E. A., Harris, C. R., Archibald, A. M., Ribeiro, A. H., Pedregosa, F. & van Mulbregt, P. (2020). Nature Methods, 17(3), 261–272.
- [63]Wahba, G. (1965). SIAM Review, 7(3), 409–409.
- [64]Weng, J., Dill, E. D., Martin, J. D., Whitfield, R., Hoffmann, C. & Ye, F. (2020). Journal of Applied Crystallography, 53(1), 159–169.
- [65]Wilkinson, C. & Lehmann, M. S. (1991). Nuclear Instruments and Methods in Physics Research Section A: Accelerators, Spectrometers, Detectors and Associated Equipment, 310(1), 411–415.
- [66]Winter, G., Waterman, D. G., Parkhurst, J. M., Brewster, A. S., Gildea, R. J., Gerstel, M., Fuentes-Montero, L., Vollmar, M., Michels-Clark, T., Young, L. D., Sauter, N. K. & Evans, G. (2018). Acta Crystallographica. Section D, Structural Biology, 74(2), 85–97.
- [67]de Wolff, P. M. (1968). Journal of Applied Crystallography, 1(2), 108–113.
