AO Optical & Control Report: Subaru 7.95m AO3k + SCExAO + Lyot Coronagraph (LLOWFS Loop Open + PSOL Block-EOF(B=32, P=24) Predictive Control) · How to Run It

Maintained Standard Preset (STAGE1): Run directly with ./scripts/run-ao3k-scexao.sh --preset STAGE1 (Stage 1 AO3k only, Stage 2/3 open; any CLI flag overrides preset defaults).

This simulation uses the exact Default Turbulence & Perturbation Model with no parameter overrides: 7-layer Maunakea von Karman turbulence at 0.80" seeing (r0=10.7 cm, tau0=3.46 ms, v_eff=9.7 m/s), Matern-3/2 wind meandering & gust bursts ON (1.0x), 5-line telescope/bench vibrations ON (45.0 nm RMS), and 4-island Subaru thermal petaling ON (1000 nm RMS, tau=3.0 s).

Realized telemetry: Wind scale 0.63–2.56x (mean 1.12x)Heading -59.2°..+85.6°Gust peak 1.00 (27% active), Cn2 max 1.39xRealized Vib 47.0 nm RMSRealized Petaling 1253 nm mean (max PTV 5141 nm)
SimulationAtmospheric turbulence & polychromatic cacaosim optical benchCalibrationLatency measurement, Hadamard RM, SVD CM, PF solver & 2-WFS/1-DM SysIDLoop OperationReal-time WFS acquisition, MVM, modal filtering, PSOL, ZPO & DM drivingAnalysisModal RMS monitors, FITS/telemetry loggers, PSF & performance reporting

1. Turnkey Command & Interactive Parameter Customizer

Pre-loaded with this simulation's exact parameters. Adjust any field below to generate custom commands for run-ao3k-scexao.sh, cacaosim-bench, and cacaoloop-ao3k-scexao.milk. Click any label to open its definition in the Options Reference, or review baseline atmosphere, wind, vibration, and petaling settings in the Default Turbulence & Perturbation Model:

Advanced Options (152 flags from run-ao3k-scexao.sh) · Full Reference →
Loop Operation
Run on scexaoda →

Exact Simulation Command (run-ao3k-scexao.sh) SimulationCalibrationLoop OperationAnalysis

./scripts/run-ao3k-scexao.sh --seeing 0.80 --phys-time 30.0 --oversample 4 --bench-mode fused --gain1 0.45 --gain2 0.35 --mult1 0.99 --mult2 0.98 --mgain-alpha 0.75 --mgain-floor 0.02 --mgain-tt 1.05 --svdlim1 0.0001 --svdlim2 0.002 --no-lowfs --predictive --pf-mix 0.82 --pf-order 24 --save-rm _work/ao3k_scexao_rm --outdir _work/ao3k_stage1 --save-telemetry standard

Optical Bench Only (cacaosim-bench) Simulation

CACAO Loops Only (cacaoloop-ao3k-scexao.milk) CalibrationLoop Operation

2. Launching cacaosim for This Configuration Simulation

Always isolate shared memory under /dev/shm/cacao_* so /milk/shm remains untouched. Inspect or launch the declarative optical bench benches/ao3k_scexao/ao3k_scexao.bench as follows:

source env.sh
export MILK_SHM_DIR=/dev/shm/cacao_demo MILK_PROC_DIR=/dev/shm/cacao_demo/proc
mkdir -p "${MILK_PROC_DIR}"

# Inspect schematic in terminal or launch interactive cacaosim-CTRL GUI
cacaosim-bench view -c benches/ao3k_scexao/ao3k_scexao.bench
cacaosim-bench gui  -c benches/ao3k_scexao/ao3k_scexao.bench

# Deploy optical bench with zero turbulence first for response-matrix calibration
cacaosim-bench deploy -c benches/ao3k_scexao/ao3k_scexao.bench --mode fused --oversample 4 --atmturb --seeing 0.80
milk-fps-set "csim_htsim.turb_gain=0.0"  # Toggle to 1.0 after calibration
DirectionCategorySHM Stream(s)Grid / RateDescription
InputSimulationoutarraypha256x256 @ 2 kHzAtmospheric phase screen from csim_atmturb
InputLoop Operationdm01disp, dm02disp64x64 / 50x50Stage-1 & Stage-2 DM surface actuators
Output (WFS)Simulationcsim_wfs_nir, csim_wfs_vis, csim_wfs_lowfs160x160 / 120x120 / 64x64Polychromatic Stage 1/2/3 wavefront sensor frames
Output (Sci)Analysispsf_vis_*, psf_nir_*, coro_pre_lyot256x256Short/long-exposure Visible, H-band, and Lyot coronagraph cameras

3. CACAO & Simulator Compute Units + SHM Wiring

flowchart LR
    AT["csim_atmturb"]:::cat_simulation --> HT["csim_htsim Bench"]:::cat_simulation
    HT --> ACQ["acquWFS-N
aolN_imWFS2"]:::cat_loop_operation ZPO["zpo-2 (Stage 2)
aol2_wfszpo"]:::cat_loop_operation -.-> ACQ ACQ --> W2M["wfs2cmodeval-N
aolN_modevalWFS"]:::cat_loop_operation W2M --> MFILT["mfilt-N
aolN_modevalDM + OL"]:::cat_loop_operation MFILT --> M2D["mvalC2dm-N
aolN_dmC"]:::cat_loop_operation --> DMC["DMch2disp-0N
dm0Ndisp"]:::cat_loop_operation --> HT ACQ -. "Hresp / mlat" .-> CAL["Calib: mlat / measlinresp
compstrCM / mkPF"]:::cat_calibration -. "CM / PFmat" .-> MFILT MFILT -.-> MK["mkARPF / mkEOFPF"]:::cat_calibration -.-> APP["applyARPF / applyEOFPF"]:::cat_loop_operation -.-> MFILT W2M -.-> STATS["Analysis: mctrlstats-N
& tlog FITS"]:::cat_analysis HT -.-> STATS classDef cat_simulation fill:#f3e8ff,stroke:#7e22ce,stroke-width:2px,color:#3b0764 classDef cat_calibration fill:#fef3c7,stroke:#b45309,stroke-width:2px,color:#78350f classDef cat_loop_operation fill:#e0f2fe,stroke:#0369a1,stroke-width:2px,color:#0c4a6e classDef cat_analysis fill:#d1fae5,stroke:#047857,stroke-width:2px,color:#064e3b
SimulationCalibrationLoop OperationAnalysis

Select one or more category pills below (multi-select) or click any unit row to inspect its exact input/output SHM streams and milk-fps-set parameters:

Showing 34 / 34 units
FPS UnitBinaryCategoryStageRateBackendCL CPU%p50 / p99Role (click row for SHM & params)
SimulationAtmospheric turbulence & polychromatic cacaosim optical bench
2 / 2
csim_atmturb Activemilk-fpsexec-atmturb-mkwfsSimulationOptical Sim2000 HzCUDA (848 MiB)7.2%377.6 / 438.4 usFrozen-flow + boiling multi-layer atmospheric OPD generator
csim_htsim Activemilk-fpsexec-cacaosim-htsimSimulationOptical Sim8000 Hz (4x)CUDA (1368 MiB)92.9%4216.3 / 4702.1 usGPU-fused polychromatic DAG optical bench + Lyot coronagraph + wfstat
CalibrationLatency measurement, Hadamard RM, SVD CM, PF solver & 2-WFS/1-DM SysID
11 / 11
mlat-1 Activecacao-fpsexec-cacaopt-mlatCalibrationStage 1 (AO3k)CalibCPU0.0%0.0 / 0.0 usStage-1 hardware loop latency measurement via poke bursts
measlinresp-1 Activecacao-fpsexec-cacaoac-measlinrespCalibrationStage 1 (AO3k)CalibCPU0.0%0.0 / 0.0 usStage-1 Hadamard linear response matrix acquisition
compstrCM-1 Activecacao-fpsexec-cacaocc-compstrcmCalibrationStage 1 (AO3k)CalibCUDA (874 MiB)0.0%0.0 / 0.0 usStage-1 SVD pseudo-inverse control matrix solver
mkEOFPF-1 Activecacao-fpsexec-cacaopc-mkEOFPFCalibrationStage 1 (AO3k)AsyncCPU196.0%2427454.0 / 2694308.5 usOnline Block-EOF VAR filter solver
mlat-2 Activecacao-fpsexec-cacaopt-mlatCalibrationStage 2 (SCExAO)CalibCPU0.0%0.0 / 0.0 usStage-2 hardware loop latency measurement via poke bursts
measlinresp-2 Activecacao-fpsexec-cacaoac-measlinrespCalibrationStage 2 (SCExAO)CalibCPU0.0%0.0 / 0.0 usStage-2 Hadamard linear response matrix acquisition
compstrCM-2 Activecacao-fpsexec-cacaocc-compstrcmCalibrationStage 2 (SCExAO)CalibCPU0.0%0.0 / 0.0 usStage-2 SVD pseudo-inverse control matrix solver
mkEOFPF-2 Activecacao-fpsexec-cacaopc-mkEOFPFCalibrationStage 2 (SCExAO)AsyncCUDA/CPU——Online Block-EOF VAR filter solver
mlat-3 Activecacao-fpsexec-cacaopt-mlatCalibrationStage 3 (LLOWFS)CalibCPU0.0%0.0 / 0.0 usStage-3 hardware loop latency measurement via poke bursts
measlinresp-3 Activecacao-fpsexec-cacaoac-measlinrespCalibrationStage 3 (LLOWFS)CalibCUDA/CPU——Stage-3 Hadamard linear response matrix acquisition
compstrCM-3 Activecacao-fpsexec-cacaocc-compstrcmCalibrationStage 3 (LLOWFS)CalibCPU0.0%0.0 / 0.0 usStage-3 SVD pseudo-inverse control matrix solver
Loop OperationReal-time WFS acquisition, MVM, modal filtering, PSOL, ZPO & DM driving
17 / 17
DMch2disp-01 Activecacao-fpsexec-dmcombLoop OperationStage 1 (AO3k)1000 HzCPU0.8%14.3 / 27.1 us12-channel DM summer + ZPO accumulator
acquWFS-1 Activecacao-fpsexec-cacaoiot-acquireWFSLoop OperationStage 1 (AO3k)1000 HzCPU1.2%112.6 / 172.1 usWFS normalization, dark/reference & ZPO subtraction
wfs2cmodeval-1 Activemilk-fpsexec-linalg-MVMextractLoop OperationStage 1 (AO3k)1000 HzCUDA (700 MiB)2.1%222.5 / 270.4 usGPU/CPU MVM projection from WFS pixels to control modes
mfilt-1 Activecacao-fpsexec-mfiltLoop OperationStage 1 (AO3k)1000 HzCPU0.8%417.2 / 489.2 usModal leaky integrator + PSOL reconstruction (CLOSED)
mvalC2dm-1 Activemilk-fpsexec-linalg-MVMextractLoop OperationStage 1 (AO3k)1000 HzCUDA (616 MiB)0.7%60.8 / 106.8 usGPU/CPU MVM synthesis from modal commands to DM grid
applyEOFPF-1 Activecacao-fpsexec-cacaopc-applyEOFPFLoop OperationStage 1 (AO3k)1000 HzCPU3.2%127.4 / 177.7 usReal-time SIMD predictive inference synced with mfilt
DMch2disp-02 Activecacao-fpsexec-dmcombLoop OperationStage 2 (SCExAO)2000 HzCPU0.1%13.8 / 16.8 us12-channel DM summer + ZPO accumulator
acquWFS-2 Activecacao-fpsexec-cacaoiot-acquireWFSLoop OperationStage 2 (SCExAO)2000 HzCPU1.3%52.9 / 101.2 usWFS normalization, dark/reference & ZPO subtraction
wfs2cmodeval-2 Activemilk-fpsexec-linalg-MVMextractLoop OperationStage 2 (SCExAO)2000 HzCUDA (606 MiB)2.0%71.0 / 133.3 usGPU/CPU MVM projection from WFS pixels to control modes
mfilt-2 Activecacao-fpsexec-mfiltLoop OperationStage 2 (SCExAO)2000 HzCPU0.3%2.5 / 3.1 usModal leaky integrator + PSOL reconstruction (CLOSED)
mvalC2dm-2 Activemilk-fpsexec-linalg-MVMextractLoop OperationStage 2 (SCExAO)2000 HzCUDA (570 MiB)0.0%32.7 / 63.0 usGPU/CPU MVM synthesis from modal commands to DM grid
zpo-2 Activemilk-fpsexec-linalg-MVMextractLoop OperationStage 2 -> 3 ZPO2000 HzCUDA (700 MiB)0.0%123.8 / 162.5 usReal-time zero-point offset feeding Stage-3 DM2 stroke into Stage-2 WFS
applyEOFPF-2 Activecacao-fpsexec-cacaopc-applyEOFPFLoop OperationStage 2 (SCExAO)2000 HzCUDA/CPU——Real-time SIMD predictive inference synced with mfilt
acquWFS-3 Activecacao-fpsexec-cacaoiot-acquireWFSLoop OperationStage 3 (LLOWFS)500 HzCPU0.2%20.1 / 69.9 usWFS normalization, dark/reference & ZPO subtraction
wfs2cmodeval-3 Activemilk-fpsexec-linalg-MVMextractLoop OperationStage 3 (LLOWFS)500 HzCPU0.1%11.8 / 62.9 usGPU/CPU MVM projection from WFS pixels to control modes
mfilt-3 Standby/Opencacao-fpsexec-mfiltLoop OperationStage 3 (LLOWFS)500 HzCPU0.1%2.8 / 3.3 usModal leaky integrator + PSOL reconstruction (OPEN)
mvalC2dm-3 Standby/Openmilk-fpsexec-linalg-MVMextractLoop OperationStage 3 (LLOWFS)500 HzCPU0.0%11.1 / 56.7 usGPU/CPU MVM synthesis from modal commands to DM grid
AnalysisModal RMS monitors, FITS/telemetry loggers, PSF & performance reporting
4 / 4
mctrlstats-1 Activecacao-fpsexec-modalCTRLstatsAnalysisStage 1 (AO3k)1000 HzCPU0.0%0.0 / 0.0 usStage-1 real-time modal RMS telemetry & stats monitor
mctrlstats-2 Activecacao-fpsexec-modalCTRLstatsAnalysisStage 2 (SCExAO)2000 HzCUDA/CPU——Stage-2 real-time modal RMS telemetry & stats monitor
mctrlstats-3 Activecacao-fpsexec-modalCTRLstatsAnalysisStage 3 (LLOWFS)500 HzCUDA/CPU——Stage-3 real-time modal RMS telemetry & stats monitor
tlog_00..26 Activemilk-fpsexec-mem-streamFITSlogAnalysisTelemetryLockstepCUDA/CPU——Lossless paired FITS + timestamp telemetry logger (standard)

4. Step-by-Step Deployment Checklist

0 / 8 steps completed
source env.sh
export MILK_SHM_DIR=/dev/shm/cacao_run
export MILK_PROC_DIR=/dev/shm/cacao_run/proc
mkdir -p "${MILK_PROC_DIR}"
cacaosim-bench deploy -c benches/ao3k_scexao/ao3k_scexao.bench --mode fused --oversample 4 --atmturb
milk-fps-set "csim_htsim.turb_gain=0.0"
CACAO_LOOPROOTDIR=/tmp/ao3k ./benches/ao3k_scexao/cacaoloop-ao3k-scexao.milk --stage 1 deploy
CACAO_LOOPROOTDIR=/tmp/scexao ./benches/ao3k_scexao/cacaoloop-ao3k-scexao.milk --stage 2 deploy
CACAO_LOOPROOTDIR=/tmp/llowfs ./benches/ao3k_scexao/cacaoloop-ao3k-scexao.milk --stage 3 deploy
Show low-level milk-fps-init / milk-fps-set / milk-stream-link primitives (Stage 1 example)
milk-fps-init DMch2disp-01 cacao-fpsexec-dmcomb
milk-fps-init acquWFS-1    cacao-fpsexec-cacaoiot-acquireWFS
milk-fps-init wfs2cmodeval-1 milk-fpsexec-linalg-MVMextract
milk-fps-init mfilt-1      cacao-fpsexec-mfilt
milk-fps-init mvalC2dm-1   milk-fpsexec-linalg-MVMextract
milk-stream-link csim_wfs_nir=aol1_wfsim
milk-fps-set acquWFS-1.insname=aol1_wfsim mfilt-1.loopgain=0.45 mfilt-1.comp.OLmodes=ON
milk-fps-runstart DMch2disp-01 acquWFS-1 wfs2cmodeval-1 mfilt-1 mvalC2dm-1
CACAO_LOOPROOTDIR=/tmp/ao3k ./benches/ao3k_scexao/cacaoloop-ao3k-scexao.milk --stage 1 calibrate --save-rm _work/ao3k_scexao_rm/stage1
CACAO_LOOPROOTDIR=/tmp/scexao ./benches/ao3k_scexao/cacaoloop-ao3k-scexao.milk --stage 2 calibrate --save-rm _work/ao3k_scexao_rm/stage2
CACAO_LOOPROOTDIR=/tmp/llowfs ./benches/ao3k_scexao/cacaoloop-ao3k-scexao.milk --stage 3 calibrate --save-rm _work/ao3k_scexao_rm/stage3
CACAO_PF_MODE=eof CACAO_PF_ORDER=24 ./benches/ao3k_scexao/cacaoloop-ao3k-scexao.milk --stage 1 testol
CACAO_PF_MODE=eof CACAO_PF_ORDER=24 ./benches/ao3k_scexao/cacaoloop-ao3k-scexao.milk --stage 1 pf-on 0.90
milk-fps-set "csim_htsim.turb_gain=1.0"
CACAO_LOOPROOTDIR=/tmp/ao3k ./benches/ao3k_scexao/cacaoloop-ao3k-scexao.milk --stage 1 close 0.45
CACAO_LOOPROOTDIR=/tmp/scexao ./benches/ao3k_scexao/cacaoloop-ao3k-scexao.milk --stage 2 close 0.35
# Stage 3 LLOWFS remains OPEN for this configuration
milk-fpsCTRL        # Inspect & tune all FPS parameters live
cacao-modalstatsTUI 1   # Inspect Stage-1 modal residuals
milk-stream-wait -t 10 psf_nir_final+100
for s in 3 2 1; do ./benches/ao3k_scexao/cacaoloop-ao3k-scexao.milk --stage ${s} open; done
for s in 3 2 1; do ./benches/ao3k_scexao/cacaoloop-ao3k-scexao.milk --stage ${s} teardown --purge-dm; done
cacaosim-bench teardown

5. Adapting This Configuration to Real Hardware

Reproducibility & GitHub Provenance

All source code, optical bench definitions, real-time control scripts, and telemetry/report tools used to produce this report are open-source. The repository commit table and shell commands below contain everything needed for a developer or autonomous AI agent to reproduce these results from a clean Linux workspace.

Open-Source GitHub Repositories & Exact Commits

Repository Branch Commit Role in Simulation Stack
cacao-work main 62a9689 Integration workspace, AO3k+SCExAO bench/runner, pytest suite & web report publisher
cacaosim main 8aa5dfb GPU-fused & modular polychromatic AO hardware simulator, TUI & report engine
cacao feat/bash-engine d496ab0 Compute and Control for Adaptive Optics (acquireWFS, mlat, Hadamard RM, SVD CM, mfilt)
milk feat/bash-engine a3bfb83 Core FPS shared-memory engine, milk-script orchestrator, streamFITSlog & milk-perf-report
ImageStreamIO dev b6e2671 Low-latency POSIX/CUDA shared-memory image stream transport (milk submodule)
milk-mltools main 1c08e4e C telemetry indexing/sync, @calc JIT extensions, AO loop optimizer & polychromatic PSFR
AtmosphericTurbulenceSimul feat/bash-engine 0eb76df Multi-layer Maunakea frozen-flow & boiling atmospheric phase generator (milkatmturb)
OpticsMaterials feat/bash-engine 0de3897 Optical material dispersion & air refractive-index library for milk
WFpropagate feat/bash-engine d65183d Fresnel & angular-spectrum wavefront propagation library for milk

End-to-End Reproduction Recipe (CLI & AI Agent Ready)

# 1. Clone all stack repositories at the exact commits recorded above
mkdir -p ~/src && cd ~/src
git clone -b feat/bash-engine https://github.com/milk-org/milk.git milk && git -C milk checkout -q a3bfb83bf62107ceca3432370073d790e6042291
git -C milk submodule update --init src/engine/ImageStreamIO && git -C milk/src/engine/ImageStreamIO checkout -q b6e2671663babf70590bbb39616a248936ea5f4c
git clone -b feat/bash-engine https://github.com/cacao-org/cacao.git cacao && git -C cacao checkout -q d496ab0fd8bbbc3b6b80f966e9d57801719386b1
git clone -b main https://github.com/milk-org/milk-mltools.git milk-mltools && git -C milk-mltools checkout -q 1c08e4ed7c34fd0d4150d8ed11030b1e1a10b54f
git clone -b feat/bash-engine https://github.com/milk-org/OpticsMaterials.git OpticsMaterials && git -C OpticsMaterials checkout -q 0de3897d06cbd3e628bc13ccf41b32a183f4e71d
git clone -b feat/bash-engine https://github.com/milk-org/WFpropagate.git WFpropagate && git -C WFpropagate checkout -q d65183d1281abee57010e1556425328b1f6a0490
git clone -b feat/bash-engine https://github.com/oguyon/AtmosphericTurbulenceSimul.git AtmosphericTurbulenceSimul && git -C AtmosphericTurbulenceSimul checkout -q 0eb76dfd1f420b5e1e9aaf3a497097cf5ab054b8
git clone -b main https://github.com/cacao-org/cacaosim.git cacaosim && git -C cacaosim checkout -q 8aa5dfb876777a167541e8e9881da09f4f856612
git clone -b main https://github.com/cacao-org/cacao-work.git cacao-work && git -C cacao-work checkout -q 62a968978a093c17887e34e444917bc67e1a173a

# 2. Configure, build, install into milk/_install, and run isolated sanity tests
cd ~/src/cacao-work
source env.sh
./scripts/build-all.sh
pytest -v tests/test_00_stack_sanity.py tests/test_05_ao_web_report.py

# 3. Run the 10 s Subaru AO3k + SCExAO simulation, telemetry, video & reports
./scripts/run-ao3k-scexao.sh --seeing 0.80 --phys-time 30.0 --oversample 4 --bench-mode fused --gain1 0.45 --gain2 0.35 --mult1 0.99 --mult2 0.98 --mgain-alpha 0.75 --mgain-floor 0.02 --mgain-tt 1.05 --svdlim1 0.0001 --svdlim2 0.002 --no-lowfs --predictive --pf-mix 0.82 --pf-order 24 --save-rm _work/ao3k_scexao_rm --outdir _work/ao3k_stage1 --save-telemetry standard

# 4. Stage static HTML site locally under _work/_web_site/public/
./scripts/publish-ao-report.sh --build-only _work/ao3k_scexao