Diamond Annual Review 2023/24
70 D I A M O N D L I G H T S O U R C E A N N U A L R E V I E W 2 0 2 3 / 2 4 The new approach is as follows: data from the Eiger detectors is sent over a ZeroMQ (asynchronous messaging library) network stream to the processing computer. Previously the data was captured and saved to HDF5 files in the global file system by ODIN [1]. Now, the data is captured to a RAMDisk [2], to allow in-flight analysis, before being saved to disk, thereby reducing latency on the availability of data to well under one second. Images are analysed with a shared bank of compute clusters running the full DIALS [3] software suite and running a subset of the DIALS analysis. To accelerate processing, these algorithms have been ported to run on a GPU, and a subset of original functionality has been replicated. From data capture a stream of image data is written by the detector. The GPU spot finding service is notified within seconds of beginning the data collection via an internal Zocalo [4] workflow system, which launches the immediate GPU processing task. The GPU is then dedicated to this data processing activity while new images are being received. Each image is uploaded to the GPU, then every area on the image is examined to identify peaks where signal pixels appear higher than their local background. Where before this was a serial process, where one CPU was required to analyse the whole image, this is now done in parallel on the GPU by splitting up the separate areas of the image. Once every pixel has been examined, they are grouped into bulk reflections, and the results returned to the service, which forwards the results on to the same processing algorithms running on the compute cluster, which decide based on these results which specific areas of the sample to measure to get best data. [Reference Figure 3] This is now being run on beamline I03 [5] alongside the existing system. When the behaviour has been verified as equivalent, then the GPU system will be used full time. The analysis for X-ray centring is a critical step in acquisition workflow for automated data collection, but is not the only application of this technology. The serial data collection use case on beamline I24, where thousands of microscopic samples are streamed through the X-ray beam, will also benefit immediately from this technology. Firstly it gives feedback on the hit rate i.e. the frequency successful shots, and secondly by offering the possibility to perform data decimation at the edge i.e. not saving or transmitting the blank images back to the data centre, reducing the computational cost of low-hit- rate experiments such as sample injector experiments. Extending the analysis to include indexing will allow more sophisticated sample identification as well as more useful feedback for other modes of experiment and results in improved Diamond-II data analysis work, where users are given faster feedback with greater scientific value at lower energy cost. First user experiment using Athena Diamond is replacing its Generic Data Acquisition (GDA) software with Athena, a service-based experiment orchestration and data collection platform. At the heart of Athena is the scanning service BlueAPI, which uses NSLS-II’s Python libraries: Bluesky [7], a library for experiment control and collection of scientific data and metadata, and Ophyd [8], which allows the representation of hardware as hierarchical objects grouping together related values from the underlying control system. [Reference Figure 4] BlueAPI wraps Bluesky plans and Ophyd devices inside a server and exposes endpoints to send commands and receive data. This makes it useful for installation at labs where multiple people may control equipment, possibly from remote locations. As part of the Diamond-II upgrade, Diamond will deliver software solutions for three new flagship beamlines using Athena as the data acquisition platform. In order to extend and test the collection of services comprising Athena, Diamond is addressing challenging use cases across Diamond’s existing beamlines by applying the new architecture. Early applications of Bluesky/Ophyd have been trialled on MX beamlines such as I03 and these developments have reduced the complexity and improved the performance of the data acquisition software. The work also significantly de-risks the software development for the K04 Diamond-II flagship beamline. The first baseline Athena release has been deployed to beamline I22 in order to close out a long running project to implement Time Frame Generator (TFG) functionality using PandA [9]. The status of this project one year agowas that real space, hardware triggered, mapping scanning had been delivered with GDA and Malcolm, but more advanced modes requiring synchronised sample environment hardware triggering and timed scanning with uniform and non-uniform time frames throughout the acquisition had not been achieved. The advanced modes would have been difficult to realise using Section 4: New software architecture services and components deployed to I22. X-ray technologies
Made with FlippingBook
RkJQdWJsaXNoZXIy OTk3MjMx