Reliability of multigrain indexing for orthorhombic polycrystals above 1 Mbar: application to MgSiO3 post-perovskite

UMET – Unité Matériaux et Transformations, CNRS, ENSCL, INRA, Université de Lille, 59000 Lille, France, School of Earth and Space Exploration, Arizona State University, Tempe, Arizona, USA, Department of Material Physics, Eötvös University, Budapest, Hungary, Laboratory of Excellence on Design of Alloy Metals for Low-Mass Structures (DAMAS), Université de Lorraine, France, ESRF, 38000 Grenoble, France, and Institut Universitaire de France, 75005 Paris, France. *Correspondence e-mail: christopher.langrand@ed.univ-lille1.fr


Introduction
Traditionally, X-ray crystallography analyses either single crystals, which produce a discrete set of diffraction spots, or powders, with smooth diffraction rings. Although successful single-crystal indexing has been performed at pressures near 100 GPa (Finkelstein et al., 2014), samples with mixed characteristics are common in high-pressure diamond anvil cell (DAC) experiments. Such samples are often composed of crystallites with heterogeneous grain sizes, giving numerous diffraction spots within a smoother powder-like diffraction pattern. Recently, multigrain crystallography has emerged as a new approach which, when combined with third-generation synchrotrons, allows the characterization of hundreds of crystals in a polycrystal (Sørensen et al., 2012). Therefore, multigrain crystallography allows microstructural investigations at the grain scale that go beyond averaged polycrystal measurements such as in texture or residual stress analysis (Merkel et al., 2002).
The method has been used with polycrystals for determining grain orientations (Poulsen et al., 2001;Margulies, 2001;Edmiston et al., 2011), refining a crystal structure (Schmidt et al., 2003;Vaughan et al., 2004), analysing strain tensors and positions of individual grains (Martins et al., 2004; Wang et al., 2013), and following phase transformations (Rosa et al., 2015;Offerman & Sharma, 2012). Multigrain crystallography, however, remains a fairly new technique with numerous pitfalls and potential errors that need to be addressed (Sharma et al., 2012a,b). This technique has been adapted for DAC experiments to characterize microstructure evolution in situ at high pressure (Ice et al., 2005;Nisr et al., 2012Nisr et al., , 2014Barton & Bernier, 2012;Rosa et al., 2015) as well as to study highpressure phases which are not quenchable or can not be synthesized as a single crystal (Zhang et al., 2013). However, in situ experiments in the DAC introduce further complications because of the limited access to reciprocal space in such devices.
The present study addresses the applicability of in situ multigrain crystallography at high pressure. We rely on an experimental data set collected at 135 GPa on MgSiO 3 postperovskite, which has an orthorhombic structure and is believed to be important for understanding the nature of the Earth's D 00 layer. Using both simulations and experimental data, we validate an indexing protocol and estimate the resolution of the method for determining grain orientations and positions. The first section describes the experiment, the simulation parameters and the data-processing techniques. The second section is dedicated to the analysis of the simulation results by testing the indexing capabilities and associated errors. We then apply the methodology to experimental data collected at 135 GPa on MgSiO 3 post-perovskite in a DAC.

Experimental methods
The starting material was MgSiO 3 enstatite glass, mixed with platinum powder that served as both a pressure standard and laser absorber (Dewaele et al., 2004). The mixed MgSiO 3 -Pt powder was loaded in a DAC. In order to avoid contamination, pure MgSiO 3 enstatite glass was used as a pressure medium. The DAC was equipped with two bevelled diamonds with a conical support (100 mm culet diameter with bevels at 7.5 up to 300 mm diameter, 4 X-ray aperture 70 ). Sample, calibrant and pressure medium were contained in a 50 mm diameter hole drilled in a rhenium gasket indented to 26 mm thickness.
The experiment was performed using monochromatic synchrotron X-ray radiation on beamline ID11 of the ESRF. The X-ray beam was focused to 5 mm vertically and 36 mm horizontally. The beam wavelength was 0.2949 Å (42.04 keV). Diffraction images were acquired on a FReLoN4M detector (Labiche et al., 2007) with 2048 Â 2048 pixels of 48.08 Â 46.78 mm pixel size at 200.64 mm from the sample. The DAC was placed on an !-goniometer, with a similar setup to that reported by Rosa et al. (2015) (Fig. 1). Diffraction images were collected while the DAC was rotated in !. The sample-todetector distance, beam centre position and detector tilt were determined using an LaB 6 standard with the software Fit2D (Hammersley et al., 1996;Hammersley, 2016).
The sample was first compressed at ambient temperature to 132 GPa. It was then heated using off-line lasers for 45 min while scanning the DAC perpendicular to the laser beam over the sample to produce post-perovskite (pPv). After laser heating, the pressure in the sample was 127 GPa and postperovskite peaks were clearly visible in the diffraction pattern. The pressure was increased to 135 GPa. Multigrain crystallography data were then collected at ambient temperature at this pressure.
Diffraction data for in situ multigrain analysis were collected over Á! ranges of [À120 ; À65 ] and [60 ; 115 ]. Images were individually exposed for 10-15 s while the cell was rotated in steps of ! = 0.5 , resulting in 220 diffraction images. The available 2 ranged between 4 and 13.5 because of the shadows induced by the diamond supporting seats.

Simulations of high-pressure three-dimensional diffraction data sets
The Fable software package (http://sourceforge.net/p/fable/ wiki/Home/) includes the simulator PolyXSim Le Page, 1979), which can be used to estimate the applicability of multigrain crystallography. PolyXSim generates three-dimensional X-ray diffraction (XRD) patterns with a given number of grains. For the simulation, we used a horizontal monochromatic incident X-ray beam of 0.2949 Å , a detector with the same specifications as the FReLoN4M and the same sample-to-detector distance as in the experiment.
The sample geometry was cylindrical, with a diameter of 10 mm and a height of 45 mm. We assumed a fully illuminated sample. The number of input grains in the simulation ranged between 50 and 500. We assumed crystallographic properties similar to those of MgSiO 3 pPv obtained in the experiment: an orthorhombic lattice with space group No. 63 (CmCm), and cell parameters a = 2.446 Å , b = 7.984 Å and c = 6.073 Å . According to the experimental data, the full widths at halfmaximum of the peaks were set to 0.07, 0.1 and 0.5 in 2, and !, respectively. The grain positions and orientations were randomly generated within the cylinder shape, producing a random texture. Strain tensors for each grain were also randomly generated, imposing a normal distribution with a mean value of 0 and a spread of 0.003 on each component of the strain tensor [corresponding to a stress of $10 GPa, using elastic moduli published by Townsend et al. (2015)]. Each grain was assumed to be spherical and the grain sizes were generated with a mean value of 1.5 mm. This value is reasonable for samples in DAC experiments. It was also chosen to match globally the number of reflections in the experiment.
At the end of the procedure, PolyXSim generates simulated diffraction patterns and an additional file containing a list of the grain diffraction vectors. Here, we used the generated diffraction images and processed them exactly as we would with the experimental data.
To examine various geometries of DAC experiments, simulations were performed with ! steps of 0.25 and 1 with the following Á! ranges: [

Pre-processing of experimental diffraction images
DAC experiments induce artefacts in the diffraction images that should be removed before further analysis. These include large single-crystal diffraction spots from the diamond anvils and shadows due to the opening of the DAC body (Fig. 2). The diamond diffraction spots and shadows from the DAC are detected from their large and weak intensities, respectively. For both, we generate a mask grown in Y, Z and ! and filter them out from the diffraction data.
For each pixel on the detector, we calculate the median value of the intensities measured over a range of !. The median image includes the diffraction originating from the smaller grains within the sample, along with the background signal. For each diffraction image, we subtract this median. Spots from the population of individual larger grains are then clearly visible (Fig. 2c) and can be extracted using a simple high-pass filter (Fig. 2d). Also note that continuous diffraction rings from the sample gasket are most often efficiently removed by this median subtraction procedure.
As described by Nisr et al. (2012Nisr et al. ( , 2014 and Rosa et al. (2015), the median image can be used for evaluating the sample crystal structure, extracting average cell parameters and obtaining phase proportions with a Rietvield refinement using the MAUD software package (Lutterotti et al., 1997).

Peak extraction and calculation of G vectors
For both synchrotron and simulated diffraction images, an ImageD11 algorithm, called PEAKSEARCH (Wright, 2005), is used to locate single-crystal peaks and to extract their positions in Y, Z and ! and their intensity. It allows the subtraction of a dark-current image and correction for the spatial distortion of the detector. Peaks are located on the basis of an intensity threshold defined by the user. In our experimental images, the average background noise after preprocessing (median, diamond spot and DAC shadow removal) was $5 absolute counts. The average peak intensity was $70 absolute counts. The threshold was hence set to 20. A similar procedure was used in the simulation. At the end of the procedure, a file containing all peak information is created.
After peak extraction, and only for DAC experiments, the data contain diffraction spots from the calibrant Pt and artefacts such as second-order diffraction from the diamond, which need to be removed. Only well defined MgSiO 3 postperovskite diffraction rings were preserved (  to ensure proper indexing of MgSiO 3 post-perovskite, i.e. to avoid confusion due to peak overlap between phases. For both experiments and simulations, we then calculate the corresponding G vectors with ImageD11 (Wright, 2005). The average cell parameters, sample-to-detector distance, detector tilt and diffraction image centre are optimized again with this software. The final output of the procedure is a file containing a list of G vectors. Note that the indexing software (GrainSpotter, see below) simulates grain orientations and then scans through the G vector database for possible matches, based on G vector orientation only. Hence, this original assignment of G vector types with ImageD11 does not affect the final indexing.

Indexing of individual grains
Indexing of individual grains is performed using Grain-Spotter (Schmidt, 2014). GrainSpotter first generates a number of random grain orientations (here 600 000) and, for each, calculates the corresponding theoretical G vectors. For each grain orientation, GrainSpotter looks for a possible match between the theoretical G vectors and those found in the experiment. If the convergence criteria are met (see details below), the grain is assigned. The procedure is repeated for the 600 000 random orientations. We then remove the assigned G vectors from the experimental database and add the new grain to the list of indexed grains. This procedure is repeated 1200 times.
GrainSpotter reduces the available orientation space as the number of trials increases. The choice of 600 000 random orientations appeared to be a good compromise above which GrainSpotter did not find any new grains. Twelve hundred GrainSpotter iterations is an upper limit above which Grain-Spotter did not find any new grains. The overall procedure takes about 5 h.
During the indexing, experimental and theoretical G vectors match if both fall within a given range in !, and 2.
On the basis of the experimental data and in order to avoid peak overlap, we use 2 = 0.07 . For ! and , the uncertainties are estimated from the spread of the experimental diffraction spots. We use a first set of restricted conditions with = 0.1 and ! = 0.5 , and a second set of extended conditions with = 1.0 and ! = 1.0 . In GrainSpotter, a grain orientation is accepted when a minimum number of G vectors is assigned to the orientation (peak threshold) and when the completeness ratio, which relates the number of expected and found G vectors for a given orientation, is higher than a given ratio. We investigate the effect of these criteria on the simulated data by varying the peak threshold between 10 and 30 and the minimum completeness ratio between 20 and 75%. The parameters used for indexing experimental data are based on the simulation results and will be described later.
At the end of the process, GrainSpotter provides a list of indexed grains and their associated G vectors. For each grain, GrainSpotter also calculates the 'mean internal angle'. This is a descriptor for the quality of the indexed grain orientation, representing the average angle between the theoretical and observed G vectors for the reflections associated with a grain. Note that GrainSpotter associates a grain with an orientation matrix (U matrix) and does not refine the cell parameters (B matrix).
The grain position and strain tensor also affect the G vector orientations. The FitAllB software (Oddershede et al., 2010) is a second-stage program working with outputs from peak searching and GrainSpotter. For each grain, on the basis of the GrainSpotter indexing, the FitAllB algorithm refines the centre-of-mass position, orientation and elastic strain tensor. It can also optimize a number of global parameters relating to the experimental setup (Oddershede et al., 2010). Here, we use the default parameters for FitAllB, except for the tolerance for grain refinement (set at 0.0001), the limit for mean internal angle (set at 1) and the minimum number of reflections for each grain (set at 10). At the end of this second refinement stage, each grain is assigned a new orientation matrix, centreof-mass position and strain tensor.

Grain indexing efficiency
In order to validate the indexing procedure, we compare the grains indexed using GrainSpotter with the input grains by looking at the product U s U À1 i , where U s and U i are the orientation matrices of a starting input grain and an indexed grain, respectively. The input grain is considered as 'retrieved' by the indexing process if one of the indexed grains matches the following conditions: each diagonal term of U s Ã U À1 i is greater than 0.998 and each non-diagonal term is under a threshold of 0.002; we took into account all possible symme-    For Á! = [À30 ; 30 ] and strict conditions on and ! (Figs. 4a and 4c), the number of indexed grains depends strongly on the peak threshold. The number of erroneous grains remains low and becomes acceptable (fewer than 50 erroneous grains for 500 input grains) if the completeness ratio is above 50%. Optimal parameters in this case are a peak threshold of 10 and a completeness ratio above 50%. For Á! = [À30 ; 30 ] and looser conditions on and ! (Figs. 4b and 4d), the number of indexed grains depends weakly on the peak threshold. The number of erroneous grains, on the other hand, can become dangerously large (more than 600 erroneous grains for 500 input grains). Optimal parameters in this case are a peak threshold above 20 with little effect of the completeness ratio.
For Á! = [À60 ; 60 ] and strict conditions on and ! (Figs. 5a and 5c), optimal parameters are a peak threshold below 30 and a completeness ratio above 50%. For looser conditions on and ! (Figs. 5b and 5d), the number of erroneous grains remains large if the peak threshold is below 30. With such a Á! range, strict conditions on and ! or a peak threshold above 30 are preferable.
In summary, 95-100% of the input grains can be retrieved with appropriate parameters. For strict conditions on and !, a low peak threshold is preferable as long as the completeness ratio is sufficiently high. Looser conditions on and ! also permit a proper indexing but require a higher peak threshold.

Orientation and position errors
We now test the potential angular and spatial resolution of multigrain crystallography in a DAC. We evaluate the error in the grain orientation by comparing the orientation of an indexed grain with that of the corresponding input grain. To do so, we calculate the relative orientation matrix between the two grains, from which we deduce the orientation error in the indexing. This error evaluation is performed with both orientation matrices, obtained after first-stage indexing (GrainSpotter) and second-stage refinement (FitAllB) (Fig. 6 and Table 1). This error in the grain orientation will be analysed in comparison with the mean internal angle of the grain (deduced from the indexing or refinement).
With data simulated for single-side data collection (Á! = [À30 ; 30 ]), the average orientation error is 0.19 after GrainSpotter indexing and 0.02 after FitAllB refinement. The  Table 1 Simulation results: error estimations for 500 starting random grains after first-stage indexing with GrainSpotter and second-stage refinements with FitAllB.
Position errors are estimated in the transverse plane (X s Z s ) and parallel to the compression (Y s ). Indexing parameters are exactly the same as in Fig. 6   As for the potential spatial resolution, we recover the distance between the input grain and the corresponding indexed grain along the compression direction and in the transverse plane. With single-side indexing, the average error in the transverse plane is 3.3 mm, and 99% (12%) of the grains are found within 10 mm (1 mm) of their original position. Parallel to the compression direction, the average error is 7.7 mm, and 75% (11%) of the grains are found within 10 mm (1 mm) of their original position. With a symmetric indexing, the average error in the transverse plane is 1.4 mm, and 99% (51%) of the grains are found within 10 mm (1 mm) of their original position. Parallel to the compression direction, the average error is 1.2 mm, and 100% (55%) of the grains are found within 10 mm (1 mm) of their original position. Note, however, that in both cases there are a few outlier grains found far from their original position.

Effect of rotation range
A DAC limits the rotation range Á!. Hence, we test the effect of Á! on the indexing (Table 2). Indexing is poor with Á! = [À5 ; 5 ], with a lower number of input grains retrieved. For the other ranges, the sample can be indexed with about 80-90% of the G vectors assigned.
As shown in Fig. 7, the average error in the grain orientation after GrainSpotter indexing depends only weakly on Á! above Á! = [À10 ; 10 ] and is of the order of 0.2 . The FitAllB second-stage refinement does not improve the results for Á! ranges up to [À20 ; 20 ]. For larger Á!, the improvement is significant with average orientation errors of 0.02 ( Fig. 7 and Table 1).

Indexing of experimental data sets 4.1. Indexing procedure
The indexing of experimental data is based on the simulation results and optimized to increase the number of indexed grains. We use G vectors extracted for both Á! ranges available in the data. We start with G vector matching tolerances of 2 = 0.07 , = 0.1 and ! = 0.5 . We perform 400 cycles of GrainSpotter indexing with each of the 600 000 random starting orientations. The number of peaks and the completeness threshold are set at 20 peaks and 50%, respectively, allowing the indexing of a first set of well defined grains. The indexed G vectors are removed from the list and less well defined grains are found by repeating the procedure with peak thresholds of 18, 16 and 15. The G vector matching tolerances are then increased to 2 = 0.07 , = 1.0 and ! = 1.0 for a final indexing with a peak threshold of 15. At the end of the procedure, all indexed grains in GrainSpotter are re-processed through the second-stage refinement in FitAllB.

Number of grains
The experimental diffraction patterns include diffraction from the post-perovskite sample and the platinum pressure calibrant. To avoid mis-indexing of post-perovskite grains, 2 regions with platinum peaks were entirely removed from the analysis. We also removed 2 regions where the postperovskite peaks were not clearly defined.
We then extracted 8598 diffraction spots (Fig. 2d) at 135 GPa. Comparing the number of spots with those from the simulations is not straightforward because of the supplementary shadows introduced by the DAC body, the effects of diamond single-crystal diffraction spots and the limitation in 2 regions to avoid overlap with the pressure calibrant. A rough estimate predicts between 100 and 200 grains. At the end of the indexing, we had indexed 159 grains. Simulation results: average errors in grain orientation for several Á! ranges after first-stage GrainSpotter indexing (white squares with thin error bars) and second-stage FitAllB refinements (black squares with thick error bars). The completeness and uncertainties in GrainSpotter were set to 50% and { 2 , , ! } = {0.07 , 1.0 , 1.0 }, respectively. Error bars represent two standard deviations from the average value.  Fig. 8 presents the individual grain orientations plotted as pole figures. They are calculated from the Euler angles of each grain using the MTEX software (Bachmann et al., 2010). This information is important for understanding the microstructural properties of post-perovskite at high pressure. A detailed analysis of texture information collected on this data set, however, is beyond the scope of the current paper. Fig. 8 shows a texture with the [100] and [010] axes at approximately 30 from the compression axis.

Grain orientations
It is not possible to evaluate orientation errors as was done with the simulations since, in the experiment, the true grain orientations are unknown. The averages of the mean internal angles for the indexed grains are 0.19 for grains indexed with 18 or more peaks and 0.39 for grains indexed with 15-18 peaks.

Grain positions
In the experiment, the pPv sample was confined within a 50 mm diameter and $15 mm thickness hole in the DAC gasket. The adjusted positions of the centres of mass of the indexed grains should therefore lie within those limits. The actual results are presented in Fig. 9.
The adjusted centre-of-mass positions of grains indexed with a peak threshold of 18 and above are found to lie mostly within the gasket hole (Fig. 9a). In contrast, grains indexed with a peak threshold between 15 and 17 can be up to 30 mm away from the hole. As in previous DAC studies (Nisr et al., 2012(Nisr et al., , 2014, the spatial resolution along the compression direction is very poor, with errors of up to 300 mm.

Grain retrieval capabilities
The simulations indicate that $95% of 500 input grains can be successfully indexed with $80% of the diffraction peaks assigned. For such a number of grains, peak overlap is not significant. Tolerances in , ! and 2 for G vector matching should be set according to the data to avoid confusion between different G vectors. Other parameters controlling the quality of the indexing are the peak threshold and the completeness ratio. We find that a successful indexing can be obtained by first setting strict parameters and then progressively decreasing the peak threshold and tolerances on and !. The tolerances on 2 should remain strict to avoid confusion between diffraction lines. This procedure allows the indexing of a first set of well defined and less strained grains with a large number of associated G vectors. Supplementary collections of less well defined or highly stressed grains are then indexed after removing the assigned G vectors from the database and lowering the indexing conditions.
In the experimental data at 135 GPa, we indexed 159 grains with an average of 17 peaks per grain, corresponding to $30% of the diffraction peaks. The weaker performance of the indexing for the experimental data compared with the simulated data set can be attributed to multiple reasons. First, the experimental data are filtered to avoid confusion with the pressure calibrant. Second, the grains in the experiment can move in and out of the incoming X-ray beam while the DAC is being rotated, which was not taken into account in the    simulation. Third, despite our efforts, the DAC itself might have been wobbling on the rotation stage as data were being collected. Fourth, the stress levels in the experiment might be higher than in the simulations, making the indexing more difficult.

Errors in grain orientations
In the simulations, errors in grain orientation after secondstage FitAllB refinements and for sufficient rotation ranges are 0.02 on average and up to 0.19 and 0.15 for single-side and symmetric indexing, respectively. In comparison, the mean internal angles of the indexed grains are 0.02 on average and up to 0.20 and 0.16 , respectively ( Table 1). The mean internal angle and the global error in the grain orientation are hence of the same order of magnitude. We did not, however, find a direct correlation between the actual error in the grain orientation and the mean internal angle in the indexing.
Symmetric data collection, which includes Friedel pairs, does improve the accuracy of grain orientation determination. There are still, however, a few grains remaining with an orientation error of up to 0.15 . Hence, symmetric indexing does not fully guarantee better results in orientation.
Another important consequence of this analysis is that the reduced rotation range in a DAC is not a limitation for determining the grain orientation in multigrain crystallography, as long as the parameters are optimized to avoid erroneous grain indexing (Fig. 7). Above rotation ranges of Á! = [À20 ; 20 ], the grain orientations are well retrieved.
In the experiment, the averages of the mean internal angles of the indexed grains are 0.19 for grains indexed with 18 or more peaks and 0.39 for grains indexed with 15-18 peaks. The errors in the grain orientation should be of the same order of magnitude. The grain orientation is determined from measurements of multiple G vectors well constrained by the diffraction geometry. This allows precise measurements of orientation distributions in the DAC, which can be useful for understanding processes such as plasticity-induced grain rotations or phase transformations.

Errors in grain positions
From the simulation, we expect average errors of the order of 3.3 and 1.4 mm in the transverse plane for single-side and symmetric indexing, respectively. Parallel to the beam, we expect average errors of 7.7 and 1.2 mm, respectively. Unlike for grain orientation, the simulations indicate that symmetric data collection drastically improves the resolution in grain localization.
In our best simulation, the average error in grain location should be 1.2 mm (Fig. 6f ). Considering the size of a sample in the DAC, this theoretical resolution might remain insufficient for microstructural studies at high pressure as grain sizes can often reach below 1 mm. It should be noted, however, that in the best simulation 50% of the grains are located within 1 mm (Table 1) and there are developments underway for improving the spatial resolution of multigrain crystallography on beamlines such as ID11 at the ESRF.
In the experimental data, the observed errors in grain localization in the plane of the gasket are larger than those estimated in the simulations (Fig. 9). With a peak threshold of 18, the retrieved grain positions lie mostly within the gasket hole. On the other hand, grains indexed with a peak threshold between 15 and 17 can be up to 30 mm away from the hole. Decreasing the peak threshold decreases the resolution in grain localization. The average mean internal angle for grains with a peak threshold above 18 is 0.19 , while that for grains indexed with 15-17 G vectors is 0.39 . Hence, there is a correlation between the mean internal angle of an indexed grain and the capability of retrieving its position. As in previous DAC studies (Nisr et al., 2012(Nisr et al., , 2014, the spatial resolution along the compression direction is very poor, with errors of up to 300 mm (ten times larger than estimated from the simulations).
A minimum of 12 observables are necessary to retrieve grain orientation (three parameters), position (three parameters) and strain tensors (six parameters). Each G vector provides three observables. In theory, four independent G vectors could be sufficient to invert the full grain properties. As shown in Fig. 9, experimental errors and non-independent sets of diffraction peaks greatly increase this threshold.
The reasons for the loss of spatial resolution in the experiment versus the simulation are not clear but may be purely mechanical, such as a motion of the !-rotation axis or a wobble of the DAC and, hence, of the sample with rotation. The spatial resolution along the compression direction may be improved by collecting diffraction data in a radial geometry in addition to the conventional axial diffraction geometry. Note, however, that the average resolution found in the simulations is $1 mm. This is larger than the crystal size in a DAC experiment and hence might be of limited use. The analysis of experimental data, based on a symmetric indexing, indicates that the actual errors in the grain positions are larger, of the order of 30 mm. As it stands, this spatial resolution may not be sufficient for microstructural studies in a DAC.

Effect of rotation range and step
From the simulations, we find that a rotation range Á! between 20 and 120 and rotation step of ! = 1 is sufficient for indexing at least 500 pPv grains in a DAC at 135 GPa. With rotation ranges up to 40 , the expected error in grain orientation is well below 1 . For rotation ranges above 40 , the expected orientation error for each grain is below 0.1 . This is important when designing multigrain crystallography DAC experiments, as increasing the rotation range is geometrically difficult.
We find that ! can be increased to 1 as long as peak overlap in ! is not significant. With most current beamline designs, data collection for small ! steps is time consuming. As shown here, this is not an issue for grain orientation determination. The experimental setups, however, could be greatly improved by the use of continuous data collection during sample rotation, as for some tomography experiments. This would greatly enhance data-collection times and also the research papers resolution of the method. Indeed, in the analysis, some images are lost owing to the high background of a diamond singlecrystal spot. The impact of diamond single-crystal spots would be limited with shorter rotation intervals. Moreover, collection over smaller rotation intervals would allow the calculation of local median images for limited ranges of rotation, and hence improve the efficiency of background removal.

Conclusion
High-pressure experiment samples are typically of the order of 10-100 mm overall with micrometre-sized individual grains. Such small samples lead to spotty diffraction patterns. This limitation is generally regarded as a flaw in high-pressure studies. Here, we use both simulations and experiments to demonstrate that multigrain crystallography can make constructive use of these spotty diffraction patterns for highpressure research. The method allows the indexing of hundreds of grains at pressures well above 100 GPa and determines their orientation matrices within $0.2-0.4 .
The spatial resolution, on the other hand, is weaker. Simulations indicate that current experimental setups with data collection on a symmetric ! range can lead to a 1.2-1.4 mm theoretical resolution in the grain position. The analysis of actual experimental data, however, shows that the true resolution is much weaker. In any case, sample grain sizes in experiments under extreme conditions can often be below 1 mm. We thus expect that, as it stands, the spatial resolution of multigrain XRD might be too weak for full microstructural studies at high pressure, including spatial/topotactic relations.
According to simulations, a rotation range Á! of 40 and a rotation step ! of 1 are sufficient to index nearly all of 500 pPv grains in a DAC at 135 GPa, with good results concerning the orientations of the indexed grains. The limited range of rotation in DAC experiments is not limiting while trying to index a sample grain by grain and decipher their orientations. This will be useful for multiple studies, such as the search for new high-pressure phases or the analysis of microstructures and textures induced by phase transformations or plastic deformation.
According to our results, a good indexing strategy, and the most successful, involves recovering the most complete and less strained grains first by setting strict parameters on the G vector locations, completeness ratio and number of peaks per grain. One can then successively attempt to extract the less complete and potentially less defined grains.
Strains in each individual crystallite were included in the simulation (x2.2) but we did not investigate the capability of multigrain XRD for retrieving strain tensors in detail. The present study also did not account for the complicated background that can occur in DAC experiments, such as a supplementary powder or amorphous signal in the data set. This would have an effect on peak detection and probably explain some of the disagreement between the performance of the indexing on experimental and simulated data. These could be the focus of a further study.
Supplementary information attached to this paper includes the input files for PolyXSim and the peaks extracted from the experimental data at 135 GPa, along with the ImageD11 input file for calibration. These are provided as a reference data set to the community for the development of algorithms and methods related to multigrain crystallography at high pressure.