The inversion of large-scale diffraction datasets from modern synchrotron sources presents a fundamental challenge in computational crystallography. This paper presents a unified algorithmic framework for the analysis of both near-field (morphological) and far-field (orientational and strain) high-energy diffraction microscopy (HEDM) data. We detail the mathematical formalisms and physical models that form the foundation of this methodology. Key aspects include a generalized model for detector distortion correction, robust algorithms for peak identification in noisy and overlapping patterns, a computationally efficient indexing formalism based on Friedel pair symmetry, and a decoupled iterative refinement scheme that exploits the differing sensitivities of position, orientation and lattice parameters to diffraction observables. We also describe the synergistic integration of near-field and far-field data streams, a critical feature of a truly comprehensive approach. The framework is validated in Part II of this series Sharma et al. (2026). Acta Cryst. A82, https://doi.org/10.1107/S2053273326004018 using both experimental Ti-7 Al datasets and synthetic reconstructions with known ground truth, achieving orientation accuracy of ∼0.05° and position accuracy of ∼10 µm on experimental data, and a 190× improvement in lattice parameter precision over conventional simultaneous parameter refinement on synthetic data. This integrated framework provides a powerful and extensible solution for turning raw diffraction images into actionable microstructural and micromechanical information.
Sharma et al. (Thu,) studied this question.