X-ray spectrometer simulation code with a detailed support of mosaic crystals
We present a newly developed ray tracing code called mmpxrt, dedicated to study and design X-ray crystal optics, with a special focus on mosaic crystal spectrometers. Its main advantage over other currently available ray tracing codes is that it includes a detailed and benchmarked algorithm to treat mosaic crystals, especially HOPG and HAPG (Highly Oriented/Annealed Pyrolitic Graphite). The code is primarily designed to study crystal spectrometers, therefore their implementation is very straightforward and includes the automated evaluation of their performance. It can, however, be used universally to study other Bragg crystal based instruments, such as monochromators, mirrors, and analyzers. The code is publicly available, written in Python3 and is distributed as a Python library with test cases and user manual included.