Software infrastructure for the highly-distributed semi-autonomous Dragonfly Spectral Line Mapper

Imad Pasha,Seery Chen,Deborah Lokhorst,William P. Bowman,Zili Shen,Qing Liu,Evgeni I. Malakhov,Roberto Abraham,Pieter G. van Dokkum
2024-06-22
Abstract:The Dragonfly Spectral Line Mapper (DSLM) is a semi-autonomous, distributed-aperture based telescope design, featuring a modular setup of 120 Canon telephoto lenses, and equal numbers of ultra-narrowband filters, detectors, and other peripherals. Here we introduce the observatory software stack for this highly-distributed system. Its core is the Dragonfly Communication Protocol (DCP), a pure-Python hardware communication framework for standardized hardware interaction. On top of this are 120 REST-ful FastAPI web servers, hosted on Raspberry Pis attached to each unit, orchestrating command translation to the hardware and providing diagnostic feedback to a central control system running the global instrument control software. We discuss key features of this software suite, including docker containerization for environment management, class composition as a flexible framework for array commands, and a state machine algorithm which controls the telescope during autonomous observations.
Instrumentation and Methods for Astrophysics,Astrophysics of Galaxies
What problem does this paper attempt to address?
The main problem that this paper attempts to solve is to design and implement a highly distributed, semi - autonomous telescope system - Dragonfly Spectral Line Mapper (DSLM), and build a set of software infrastructure for it to effectively manage and coordinate the hardware components of up to 120 independent units. Specifically, the paper focuses on the following aspects: 1. **Management and Coordination of Distributed Aperture Telescopes**: - How to effectively manage and coordinate a large number (120) of independent and repetitive hardware components (such as lenses, filters, detectors, etc.) to ensure smooth communication between all components. - How to integrate multiple hardware devices (such as cameras, focusing devices, filter tilt motors, etc.) in each unit and perform unified control through software. 2. **Automated Observation**: - How to achieve semi - autonomous or fully autonomous observation of the telescope system, enabling the telescope to execute predetermined observation tasks without human intervention. - How to design and implement a state - machine algorithm to control the behavior of the telescope during autonomous observation and ensure the smooth progress of the observation process. 3. **Design and Implementation of Software Architecture**: - How to design a modular, extensible software architecture to adapt to possible future system expansion. - How to use Docker containerization technology to manage the software environment, ensure the consistency of software dependencies in each unit, and simplify the deployment and update process. 4. **Low - Surface - Brightness Imaging**: - How to achieve an unprecedented depth of observation of low - surface - brightness line - emission features through the DSLM's ultra - narrow - band filter (0.8 nm) and large - field - of - view design, especially in the circumgalactic medium. - How to study the nearby galaxies and their surrounding baryonic matter reservoirs by observing three key diagnostic optical emission lines, Hα, [NII], and [OIII]. ### Specific Solutions To address the above problems, the paper proposes the following solutions: - **Dragonfly Communication Protocol (DCP)**: A hardware communication framework written in pure Python for standardizing hardware interactions. Each hardware component has a corresponding class responsible for sending raw serial commands and parsing results. - **RESTful FastAPI Web Server**: Each unit is equipped with a Raspberry Pi running a FastAPI Web server to handle commands from the central control system and provide diagnostic feedback. These servers communicate with the hardware through API interfaces. - **Docker Containerization**: Use Docker containerization technology to manage the software environment, ensure the consistency of software dependencies in all units, and simplify the deployment and update process. Docker also provides container orchestration tools for easy management and maintenance of multiple containers. - **Hierarchical Software Architecture**: From the bottom - layer hardware classes to the top - layer autonomous - observation software, the entire system is divided into five main layers, and each layer encapsulates the functions of the lower layer, providing flexible command combination and state - monitoring capabilities. Through these technical means, DSLM can achieve efficient and reliable distributed observation, providing new tools and methods for low - surface - brightness astronomy research.