.. DAO documentation master file Durham Adaptive Optics (DAO) ============================ .. raw:: html

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.

Get Started Install DAO
.. 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 :doc:`fifo` for full documentation. Why Choose DAO? =============== .. raw:: html

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 =========== .. raw:: html

Get Up and Running in Minutes

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

.. code-block:: python 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() .. raw:: html
Repository Structure ==================== .. raw:: html
🏗️ daoBase - Core Library 🛠️ daoTools - Utilities ⚙️ daoHw - Hardware Layer
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 =================== .. raw:: html

🚀 Getting Started

Installation Guide

Complete setup instructions for all supported platforms

Quick Start Guide

Your first DAO application in minutes

About DAO

Project overview and architecture principles

💡 Core Concepts

Shared Memory System

Low-latency inter-process communication foundation

Distributed SHM Server

Redis-backed registry and ZMQ streaming across machines

FIFO Shared Memory (Experimental)

Circular-buffer extension for multi-frame shared memory

Thread Management

Real-time thread system and lifecycle management

State Machine

System state management and transitions

DAO Components

Modular component architecture and interfaces

🔧 Advanced Topics

NUMA Optimization

Memory architecture considerations for performance

Double Buffering

Advanced buffering strategies for smooth data flow

Performance Tuning

Optimization techniques for maximum performance

Logging & Debugging

Comprehensive logging and diagnostic tools

📚 Reference & Support

API Reference

Complete function and class documentation

DAO Tools

Utility functions and helper libraries

Hardware Support

Hardware abstraction and device drivers

Troubleshooting

Common issues and solutions

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. .. raw:: html

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.

.. toctree:: :maxdepth: 2 :hidden: :caption: Getting Started about installation_guide quick_start_guide cite .. toctree:: :maxdepth: 2 :hidden: :caption: Core Concepts shared_memory daoServer fifo daoComponent threads state_machine doubleBuffer daoroot_daodata .. toctree:: :maxdepth: 2 :hidden: :caption: Advanced Topics numa tuning_guide logging troubleshooting .. toctree:: :maxdepth: 2 :hidden: :caption: Reference api_reference daoTools daoHw Indices and Tables ================== * :ref:`genindex` * :ref:`modindex` * :ref:`search`