Journal article
Cite …

Shimexpy: A python package for spatial harmonic imaging

Jorge Luis Beltran Diaz 1 and Danays Kunka  ORCID iD icon 1
1 Institute of Microstructure Technology (IMT), Karlsruhe Institute of Technology (KIT)
Abstract

Spatial Harmonic Imaging (SHI) is a multicontrast and single-shot X-ray imaging modality that retrieves attenuation, differential phase, and scattering information from Fourier space. Although single-shot measurements are inherently fast, obtaining the three SHI contrasts in a fully processed form still requires a dedicated and efficient computational pipeline, particularly one that is cross-platform and integrable into user-defined workflows—capabilities that existing implementations do not currently provide. In this paper, we present Shimexpy, an open-source Python package that automates Fourier-domain processing, harmonic extraction, and the reconstruction of attenuation, differential phase, and scattering contrasts. The package provides a modular design and Python API, supports cross-platform environments, and promotes reproducibility through scripted pipelines and open licensing. We outline the software architecture, the core algorithms, open experimental datasets, and a minimal reproducible example. We additionally discuss performance, portability, and extensibility.