Durham Adaptive Optics (DAO)

Durham Adaptive Optics

High-Performance Real-Time Framework for Adaptive Optics Systems

DAO is a modular, high-performance software framework designed for demanding adaptive optics applications. Built around shared memory architecture, it delivers low-latency data transfer, robust error handling, and cross-platform compatibility for scientific computing and real-time control systems.

Warning

Experimental Feature: FIFO Shared Memory

A FIFO (circular buffer) extension to the shared memory system is now available. It is experimental, and not yet enabled by default.

  • All shared memory segments default to a FIFO depth of 1 (standard single-frame behaviour). Existing code is unaffected unless you explicitly pass depth > 1.

  • When FIFO mode is used (depth > 1), you must use the new FIFO-aware C, C++, or Python API calls (daoShmImageCreate_FIFO, get_next_frame, get_data_next, etc.). Accessing the underlying array pointer directly or using legacy read paths against a FIFO segment will produce incorrect or undefined behaviour.

  • The API and memory layout may change before the feature is finalised.

  • Windows support is experimental. The FIFO code path has only been fully tested on Linux and macOS. Building or running FIFO-enabled code on Windows may fail or produce incorrect results.

See FIFO Shared Memory for full documentation.

Why Choose DAO?

Ultra-Low Latency

Shared memory architecture enables microsecond-level data transfer between processes, essential for real-time adaptive optics control loops.

🔧Modular Design

Flexible component-based architecture allows easy integration of wavefront sensors, deformable mirrors, and custom control algorithms.

🌐Cross-Platform

Full support for Linux, macOS, and Windows with consistent APIs and performance across all platforms.

🔬Scientific Computing

Built-in support for multi-dimensional arrays, various data types, and seamless integration with Python and C++ workflows.

🛡️Robust & Reliable

Advanced state machine management, comprehensive error handling, and real-time considerations for mission-critical applications.

📊High Throughput

Optimized for high-speed data processing with NUMA awareness, thread management, and efficient memory handling.

Quick Start

Get Up and Running in Minutes

Create your first shared memory block and start passing data between processes:

import dao
import numpy as np

# Create a shared memory block
shm = dao.shm('/tmp/mydata.im.shm', np.zeros([1024, 1024], dtype=np.uint16))

# Write data from one process
shm.set_data(my_camera_image)

# Read from another process
data = shm.get_data()

Repository Structure

DAO is organized into three main repositories, each serving a specific purpose in the adaptive optics ecosystem:

daoBase - The foundational shared memory library providing ultra-fast inter-process communication, data structures, and synchronization mechanisms.

daoTools - Essential utilities and helper functions for data manipulation, file I/O, and common adaptive optics tasks.

daoHw - Hardware abstraction layer supporting various wavefront sensors, deformable mirrors, and other AO hardware components.

Documentation Guide

daolite - Durham Adaptive Optics Latency Investigation and Timing Estimator

Need help optimising your adaptive optics real-time control system? We’ve recently released daolite, a tool for modelling and reducing computational latency in AO systems. daolite lets you build complex pipelines from a library of hardware components, estimate timing for each stage, compare configurations across CPUs, GPUs, and network architectures, and rapidly iterate on designs to meet your real-time performance requirements.

Model and optimise computational latency in Adaptive Optics real-time control systems.

Estimate per-component timing, compare hardware configurations (CPUs, GPUs, network), and iterate on pipeline designs to meet real-time constraints.

Indices and Tables