A new modular framework for high-level application development at HEPS

J Synchrotron Radiat. 2024 Mar 1;31(Pt 2):385-393. doi: 10.1107/S160057752301086X. Epub 2024 Feb 1.

Abstract

As a representative of the fourth-generation light sources, the High Energy Photon Source (HEPS) in Beijing, China, utilizes a multi-bend achromat lattice to obtain an approximately 100 times emittance reduction compared with third-generation light sources. New technologies bring new challenges to operate the storage ring. In order to meet the beam commissioning requirements of HEPS, a new framework for the development of high-level applications (HLAs) has been created. The key part of the new framework is a dual-layer physical module to facilitate the seamless fusion of physical simulation models with the real machine, allowing for fast switching between different simulation models to accommodate the various simulation scenarios. As a framework designed for development of physical applications, all variables are based on physical quantities. This allows physicists to analytically assess measurement parameters and optimize machine parameters in a more intuitive manner. To enhance both extensibility and adaptability, a modular design strategy is utilized, partitioning the entire framework into discrete modules in alignment with the requirements of HLA development. This strategy not only facilitates the independent development of each module but also minimizes inter-module coupling, thereby simplifying the maintenance and expansion of the entire framework. To simplify the development complexity, the design of the new framework is implemented using Python and is called Python-based Accelerator Physics Application Set (Pyapas). Taking advantage of Python's flexibility and robust library support, we are able to develop and iterate quickly, while also allowing for seamless integration with other scientific computing applications. HLAs for both the HEPS linac and booster have been successfully developed. During the beam commissioning process at the linac, Pyapas's ease of use and reliability have significantly reduced the time required for the beam commissioning operators. As a development framework for HLA designed for the new-generation light sources, Pyapas has the versatility to be employed with HEPS, as well as with other comparable light sources, due to its adaptability.

Keywords: Pyapas; high-level application; physical quantities.