SearcharxivSearch

arXiv subjects

Xiao-Xue Bi

Publications and source records attributed to Xiao-Xue Bi.

4 recordsLinked to original sources

Beyond the EPICS: comprehensive Python IOC development with QueueIOC

Background and Purpose: Architectural deficiencies in EPICS lead to inefficiency in the development and application of EPICS IOCs. An unintrusive solution is replacing EPICS IOCs with more maintainable and flexible Python IOCs, only reusing the CA protocol of EPICS. While there are libraries like caproto and PCASPy that help to create Python IOCs, they still feel insufficient for more complex requirements. Methods: Noticing caput, caget and camonitor are just specialised combinations of requests/replies and notifications in client-server communication, by combining barebone caproto and event loops like those in server-like programs, the QueueIOC framework for Python IOCs is created, which has the potential to systematically reduce the development and maintenance cost of IOCs. Results: Examples based on QueueIOC are first given for workalikes of StreamDevice and asyn; also given are examples for "sequencer" applications, like those based on seq, include monochromators, motor anti-bumping and motor multiplexing. A QueueIOC-based framework for detector integration is presented in an accompanying paper. Also reported is a simple but expressive architecture for GUIs, as well as software to use with the ~/iocBoot convention which addresses some issues we find with a similar solution based on procServ.

physics.ins-det

A versatile framework for attitude tuning of beamlines at advanced light sources

Aside from regular beamline experiments at light sources, the preparation steps before these experiments are also worth systematic consideration in terms of automation; a representative category in these steps is attitude tuning, which typically appears in names like beam focusing, sample alignment etc. With the goal of saving time and manpower in both writing and using in mind, a Mamba-based attitude-tuning framework is created. It supports flexible input/output ports, easy integration of diverse evaluation functions, and free selection of optimisation algorithms; with the help from Mamba's infrastructure, machine learning (ML) and artificial intelligence (AI) technologies can also be readily integrated. The tuning of a polycapillary lens and of an X-ray emission spectrometer are given as examples for the general use of this framework, featuring powerful command-line interfaces (CLIs) and friendly graphical user interfaces (GUIs) that allow comfortable human-in-the-loop control. The tuning of a Raman spectrometer demonstrates more specialised use of the framework with customised optimisation algorithms. With similar applications in mind, our framework is estimated to be capable of fulfilling a majority of attitude-tuning needs. Also reported is a virtual-beamline mechanism based on easily customisable simulated detectors and motors, which facilitates both testing for developers and training for users.

physics.ins-det

PandA(Box) flies on Bluesky: maintainable and user-friendly fly scans with Mamba at HEPS

Purpose: Fly scans are indispensible in many experiments at the High Energy Photon Source (HEPS). PandABox, the main platform to implement fly scans at HEPS, needs to be integrated into Mamba, the experiment control system developed at HEPS based on Bluesky. Methods: In less than 600 lines of easily customisable and extensible backend code, provided are full control of PandABox's TCP server in native ophyd, automated configuration (also including wiring) of "PandA blocks" for constant-speed mapping experiments of various dimensions, as well as generation of scans deliberately fragmented to deal with hardware limits in numbers of exposure frames or sequencer table entries. Results: The upper-level control system for PandABox has been ported to Bluesky, enabling the combination of both components' flexibility in fly-scan applications. Based on this backend, a user-friendly Mamba frontend is developed for X-ray fluorescence (XRF) mapping experiments, which provides fully online visual feedback.

physics.ins-det

Mamba: a systematic software solution for beamline experiments at HEPS

To cater for the diverse experiment requirements at the High Energy Photon Source (HEPS) with often limited human resources, Bluesky is chosen as the basis for our software framework, Mamba. In our attempt to address Bluesky's lack of integrated GUIs, command injection with feedback is chosen as the main way for the GUIs to cooperate with the CLI; a RPC service is provided, which also covers functionalities unsuitable for command injection, as well as pushing of status updates. In order to fully support high-frequency applications like fly scans, Bluesky's support for asynchronous control is being improved; to support high-throughput experiments, Mamba Data Worker (MDW) is being developed to cover the complexity in asynchronous online data processing for these experiments. To systematically simplify the specification of metadata, scan parameters and data-processing graphs for each type of experiments, an experiment parameter generator (EPG) will be developed; experiment-specific modules to automate preparation steps will also be made. The integration of off-the-shelf code in Mamba for domain-specific needs is under investigation, and Mamba GUI Studio (MGS) is being developed to simplify the implementation and integration of GUIs.

physics.ins-det