A cacao loop is a collection of interconnected processes, each performing a step of the AO loop
Edit me

1. Overview

1.1. Compute Unit (CU)

cacao runs a collection of compute units to perform all required operations. A compute unit performs a specific step of the AO loop, such as extracting modal coefficients from the WFS signal stream.

Each CU consists of a function parameter structure (FPS) holding the parameters for the computation, and a tmux sesssion within which code is executed. Two processes can run within a CU: the configuration process that manages function parameters, and the run process that executes the computation (often a loop in a real-time environment). The configuration and run processes are executed in tmux windows 1 and 2, with window 0 reserved for housekeeping.

1.2. Selecting CUs

The user must first select which CUs will be deployed.

CUs are registered by adding entries in the cacaovars.bash file. For example, the following entry will register the mlat (measure latency) CU:

export CACAO_FPSPROC_MLAT="ON"

During deployment, the cacao-fpslistadd script is called to add registered CUs to the fpslist.txt ASCII file. The script calls all instances of cacao-fpslistadd- scripts, each one handling a single CU registration. For example, the mlat process is registered by cacao-fpslistadd-MLAT, which will test if the CACAO_FPSPROC_MLAT environment variable is set to ON, and register the CU if so.

cacao-fpslistadd is typically not called directly by the user, but is part of the cacao-setup (which reads the cacaovars.bash file prior to calling cacao-fpslistadd). The full list of registered CUs available, and their status (registered ?) can be inspected by running :

source cacaovars.LOOPNAME.bash; cacao-fpslistadd -l

Registered CUs will be labeled as ON, while others are labeled as OFF.

1.3. CU categories

System Setup

Connecting to devices, pre-processing

Learn More

Simulation

Simulating hardware devices

Learn More

Calibration

Measure and store system response

Learn More

Loop control

Closing and running the control loop

Learn More

Optimization

Monitoring and optimizing loop performance

Learn More

Telemetry

Recording and storing telemetry

Learn More

Advanced

Advanced processes for expert users

Learn More

2. List of processes

2.1. System Setup

Name Description cacaovar Notes
DMch2disp- DM control, manage and coadd channels DMCH2DISP Optional
acquWFS- Pre-process WFS input to WFS signal ACQUWFS Optional

2.2. Simulation

Name Description cacaovar Notes
simmvmgpu- Simulate WFS response SIMMVMGPU  
Add simulated turbulence to DM DMATMTURB    
Add delay to DM commands DMSIMDELAY    
Simulate WFS camera WFSCAMSIM    

2.3. Calibration

Name Description cacaovar Notes
mlat- Measure hardware latency MLAT  
measlinresp- Measure WFS linear response to DM commands MEASURELINRESP  
compstrCM- Compute simple control matrix COMPSTRCM  

2.4. Loop Control

Name Description cacaovar Notes
wfs2cmodeval- Compute modal coefficients from WFS signal MVMGPU_WFS2CMODEVAL  
mfilt- Modal filtering: compute modal control MODALFILTERING  
mvalC2dm- Compute DM correction from modal coeffs MVMGPU_CMODEVAL2DM  

2.5. Performance Optimization, Monitoring

Tags: CU