Scientific Reports (Jan 2023)
Fast calculation of scattering patterns using hypergeometric function algorithms
Abstract
Abstract The scattering of light, X-rays, electrons or neutrons by matter is used widespread for structural characterization from atomic to macroscopic length scales. With the advent of high-brilliance beam sources and the development fast, large area pixelated detectors, scattering patterns are now acquired at unprecedented frame rates and frame sizes. The slow analysis of these scattering patterns has evolved into a severe bottleneck retarding scientific insight. Here we introduce an algorithm based on the use of hypergeometric functions providing gains in computational speed of up to 105 compared to present numerical integration algorithms. Hypergeometric functions provide analytical descriptions of geometrical shapes, can be rapidly computed as series and asymptotic expansions, and can be efficiently implemented in GPUs. The algorithm provides the necessary computational speed to calculate scattering patterns on timescales required for real-time experiment feedback, the analysis of large volumes of scattering data, and for the generation of training data sets for machine learning.