177HIGHLIGHTS 2020
THE BLISS BEAMLINE CONTROL SYSTEM Since the restart of the User Programme after the EBS upgrade, 16 ESRF beamlines are now controlling their experiments with BLISS [1]. With full deployment on all beamlines aimed for the end of 2023, BLISS turns a page in a history started 28 years ago with SPEC [2], the instrument-control and data-acquisition software in use at the ESRF until today.
BeamLine Instrumentation Support Software, or BLISS, is an open-source project run by the ESRF s Beamline Control Unit (BCU/SWG/ ISDD), with important contributions written by the Data Analysis Unit (DAU/SWG/ISDD). Development started in December 2015 with the ambition to provide a state-of-the-art integrated environment to enhance the ESRF user experience, thanks to a holistic approach to synchrotron experiments: from hardware control and configuration to data visualisation, BLISS allows engineers and scientists to set up and control the most demanding beamline experiments.
BLISS is entirely based on Python, a very popular programming language with a huge ecosystem, especially for the scientific community. Thousands of packages to solve any kind of problem, from very fast operations on big data arrays to Artificial Intelligence and machine learning, are now at the fingertips of ESRF users to improve data acquisition sequences. The main entry point to BLISS is a Unix-like command shell. When starting, the shell loads BLISS configuration from the Beacon (BEAmline CONfiguration) server and executes a Python setup file. BLISS is configured with simple text files in the YAML format. A few lines are enough to describe each beamline device. Then, users are ready to run their own custom scripts. Typed commands and error output from the BLISS shell are logged to the ESRF electronic logbook. Metadata for the ICAT [3] data-management system is collected in compliance with the ESRF data policy following the Nexus/HDF5 conventions and the PaNOSC initative [4].
Built-in support for a variety of devices is provided, and adding new equipment has never been easier. The BLISS architecture is organised as a modular pile of frameworks (Figure 153), for motion control and trajectories, sampling and integrating counters, multi-channel analysers, regulation loops and synchronisation electronics. Area detectors are also supported, thanks to the integration of Lima Tango servers. On top of hardware controllers, the scanning engine defines an adaptation layer to be able to create acquisition chains. They represent the synchronisation relationship of devices for a particular scan. This design has proved to be very flexible, both for step-by-step scans and
fast continuous scans. While a scan is running in the BLISS shell, devices producing scalars or 1D data send raw data to BLISS. 2D detectors send references. BLISS takes care of data aggregation and correlation and publishes data channels to a Redis instance via Redis streams. Redis is an open-source, in-memory data structure store, used as a database, cache and message broker [5]. Listeners can get access to the data in real time via the BLISS Application Programming Interface (API). The HDF5 Writer is a Tango [6] server that produces Nexus-compliant HDF5 files [7] out of the data stored in Redis. Data production is decoupled from archiving, in order to achieve the highest data rates. Flint, based on the Silx toolkit [8], is another Redis client that displays live data as curves, scatter plots and images in order to give immediate feedback while the acquisition is running (Figure 154). Scientists can write custom processing scripts in order to do online data analysis. This opens up a lot of opportunities, from pre-processing to advanced scans with live feedback to optimise experiment procedures.
Fig. 153: a) BLISS logo. b) BLISS architecture and data flow.