Orateur
Description
Attitude tuning—encompassing tasks such as beam focusing and sample alignment—is a critical yet time-consuming preparation step in synchrotron radiation experiments. This paper presents a Mamba-based software framework designed to automate and streamline attitude tuning at light source facilities such as HEPS and BSRF. The framework treats attitude tuning as a numerical optimization problem, integrating flexible input/output interfaces, diverse evaluation functions, and a variety of optimization algorithms, including support for machine learning and AI-based methods. It features both command-line and graphical user interfaces, enabling human-in-the-loop control when needed. Three real-world applications demonstrate its versatility: the tuning of a polycapillary lens, an X-ray emission spectrometer, and an X-ray Raman scattering spectrometer.