MIR2-Toolkit: a Python program for multiple-image radiography analysis with integrated silicon-crystal diffraction modeling tools.
Abstract
Analyzer-based multiple-image radiography (MIR) is an X-ray phase-contrast imaging technique. It retrieves absorption, refraction, and ultra-small-angle X-ray scattering signals using the angular selectivity of a perfect-crystal analyzer. Conventional MIR processing typically relies on normalization between the object and reference datasets and on precise angular alignment, thereby increasing sensitivity to mechanical and thermal instabilities. The recently developed MIR2 framework addresses these limitations by independently analyzing object and reference datasets, eliminating explicit normalization and global alignment steps, and incorporating angular calibration based on the dynamical theory of diffraction. To facilitate the practical application of this method, MIR2-Toolkit has been developed as a Python-based graphical software package for MIR2 analysis. The software carries out dark correction, region-of-interest selection, rocking-curve handling, independent angular calibration, and pixel-wise Gaussian fitting of angular intensity profiles to retrieve contrast images. In addition to the main MIR2 workflow, the toolkit includes silicon-crystal diffraction modules for calculation and visualization of diffraction properties, reflectivity curves, and Darwin widths in symmetric Bragg and Laue geometries. In this paper, the MIR2 workflow implemented in the software is described, the program structure is outlined, and the main analysis and diffraction-modeling features are presented.