HEART: A new X-ray tracing code for mosaic crystal spectrometers

We introduce a new open-source Python x-ray tracing code for modelling Bragg diffracting mosaic crystal spectrometers: High Energy Applications Ray Tracer (HEART) . HEART 's high modularity enables customizable workflows as well as efficient development of novel features. Utilizing Numba's just-in-time (JIT) compiler and the message-passing interface (MPI) allows running HEART in parallel leading to excellent performance. HEART is intended to be used for modelling x-ray spectra as they would be seen in experiments that measure x-ray spectroscopy with a mosaic crystal spectrometer. This enables the user to make predictions about what will be seen on a detector in experiment, perform optimizations on the design of the spectrometer setup, or to study the effect of the spectrometer on measured spectra. However, the code certainly has further uses beyond these example use cases. Here, we discuss the physical model used in the code, and explore a number of different mosaic distribution functions, intrinsic rocking curves, and sampling approaches which are available to the user. Finally, we demonstrate its strong predictive capability in comparison to spectroscopic data collected at the European XFEL in Germany. Program Title: High Energy Applications Ray Tracer (HEART) CPC Library link to program files: https://doi.org/10.17632/d3wc5jxdgj.1 Developer's repository link: https://gitlab.com/heart-ray-tracing/HEART Licensing provisions:: GPLv3 Programming language: Python ≥3.10 Nature of problem: Mosaic crystal spectrometers are widely-used at high energy density (HED) facilities owing to their very high integrated reflectivities. However, the mosaic nature of the crystal introduces a lot of complexity into the instrument functions of these spectrometers. Understanding how the mosaic crystal will impact the measured spectrum is vital for reliably inferring conditions measured via x-ray spectroscopy and for planning experiments. Solution method: We have developed a ray tracing code with specific support for mosaic crystals. With the implemented precise dynamical theory models, our ray tracing code simulates accurate detector images enabling realistic comparisons with experiments. It takes advantage of the inherent randomness of mosaic crystals to run Monte Carlo simulations of rays passing through the crystal. This also means the detector images produced contain similar photon counting noise that would appear in experiments. A number of options for crystal materials, geometries, mosaic distribution functions, and rocking curves are supported. Effects such as absorption and multiple ray reflections are also treated explicitly.

Authors

Institutions

Publication Details

Journal
Computer Physics Communications
Published
2025-09-29
DOI
https://doi.org/10.1016/j.cpc.2025.109878
Primary Topic
Particle Detector Development and Performance
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

HEART: A new X-ray tracing code for mosaic crystal spectrometers

Sebastian Schwalbe, Tobias Dornheim, Uwe Hernandez Acosta, Thomas R. Preston et al.
Computer Physics Communications
Particle Detector Development and Performance
article

HEART: A new X-ray tracing code for mosaic crystal spectrometers

Sebastian Schwalbe, Tobias Dornheim, Uwe Hernandez Acosta, Thomas R. Preston, Thomas Gawne, Thomas Chuna
article en

Abstract

We introduce a new open-source Python x-ray tracing code for modelling Bragg diffracting mosaic crystal spectrometers: High Energy Applications Ray Tracer (HEART) . HEART 's high modularity enables customizable workflows as well as efficient development of novel features. Utilizing Numba's just-in-time (JIT) compiler and the message-passing interface (MPI) allows running HEART in parallel leading to excellent performance. HEART is intended to be used for modelling x-ray spectra as they would be seen in experiments that measure x-ray spectroscopy with a mosaic crystal spectrometer. This enables the user to make predictions about what will be seen on a detector in experiment, perform optimizations on the design of the spectrometer setup, or to study the effect of the spectrometer on measured spectra. However, the code certainly has further uses beyond these example use cases. Here, we discuss the physical model used in the code, and explore a number of different mosaic distribution functions, intrinsic rocking curves, and sampling approaches which are available to the user. Finally, we demonstrate its strong predictive capability in comparison to spectroscopic data collected at the European XFEL in Germany. Program Title: High Energy Applications Ray Tracer (HEART) CPC Library link to program files: https://doi.org/10.17632/d3wc5jxdgj.1 Developer's repository link: https://gitlab.com/heart-ray-tracing/HEART Licensing provisions:: GPLv3 Programming language: Python ≥3.10 Nature of problem: Mosaic crystal spectrometers are widely-used at high energy density (HED) facilities owing to their very high integrated reflectivities. However, the mosaic nature of the crystal introduces a lot of complexity into the instrument functions of these spectrometers. Understanding how the mosaic crystal will impact the measured spectrum is vital for reliably inferring conditions measured via x-ray spectroscopy and for planning experiments. Solution method: We have developed a ray tracing code with specific support for mosaic crystals. With the implemented precise dynamical theory models, our ray tracing code simulates accurate detector images enabling realistic comparisons with experiments. It takes advantage of the inherent randomness of mosaic crystals to run Monte Carlo simulations of rays passing through the crystal. This also means the detector images produced contain similar photon counting noise that would appear in experiments. A number of options for crystal materials, geometries, mosaic distribution functions, and rocking curves are supported. Effects such as absorption and multiple ray reflections are also treated explicitly.

Computer Physics CommunicationsVol. 318
Helmholtz-Zentrum Dresden-Rossendorf (DE), Center for Advanced Systems Understanding (DE), European X-Ray Free-Electron Laser (DE)
Openalex Percentile: Top 88%
Particle Detector Development and Performance
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.