AO Algorithms, Calibration & Options Dependency Matrix

Unified map of every calibration, online adaptive estimator, real-time control loop, predictive filter, and diagnostic algorithm using short composable codes (CODE/OPT). Color distinguishes Offline Calibration, Online In-Loop Calibration, Real-Time Operation, and Diagnostics. Click any code, title, description, or matrix cell to open its dedicated documentation page.

Algorithms
28
59 CODE/OPT variants
Offline Calibration
8
Pre-loop matrices & kernels
Online In-Loop
4
Live OG, MOPT & wind
RT Loop Operation
9
Control & predictive filters
Color Key:Offline CalibrationOnline Calibration (In-Loop)Real-Time Loop OperationDiagnostics & Post-Loop AnalysisSimulation PhysicsResearch Queue (Planned)Solid pill = required · Dashed = optional

Core Design Principle — Why a 3-Layer Decoupled Architecture: Modern extreme-AO loops (such as Subaru AO3k + SCExAO) must handle four distinct physical challenges at once: time-varying Pyramid WFS optical gain, frozen-flow atmospheric lag and sudden wind changes, narrowband telescope/bench vibrations (10–150 Hz), and high-frequency deformable mirror (DM) mechanical plate resonances (~1–2 kHz). Our benchmarks show that entangling these concerns—for example, rotating the modal basis underneath a predictive filter, or running online self-learning without a fixed linear anchor—causes severe transients and noise amplification. CACAO therefore separates the loop into Offline & Online Calibration feeding three strictly decoupled real-time layers: (1) Core Control in a fixed outer modal basis, (2) Inner Control-Mode Rotation confined inside modalfilter, and (3) Downstream DM Actuation Conditioning (multi-rate pacing upstream of anti-vibration pre-shaping). Every code pill below links directly to its specification, CLI flags (CLI, Env & FPS Options Reference), and full benchmark reports (Architecture Synthesis, Implementation Plan).

1 · Offline & Online Calibration

Plant Identification, Optical Gain & Wind Profiling

Accurate control begins with an unbiased model of loop timing, DM dynamics, and time-varying Pyramid WFS sensitivity:

  • Baseline Latency & Static RM: MLAT measures fractional hardware/software lag (<0.05 fr); RM acquires the static response matrix via unthrottled lockstep (RM/FAST), real-time Hadamard pokes (RM/HAD), or direct low-order Zernikes (RM/DIR for Stage-3 LLOWFS).
  • Dynamic 3D Plant RM (Continuous Plate DMs): Static RMs miss mechanical overshoot and 34% cross-mode plate coupling on the 64×64 ALPAO DM. Sub-frame stroboscopic 3DRM/P1 resolves the spatiotemporal tensor through the operational WFS, 3DRM/FACT factors it into unity-DC 3DRM/DIAG (MEMS) or 3DRM/MIMO (plate) kernels, and LAG/2PT aligns science-cadence IPC lag. When a DM pre-shaper is active, 3DRM/P2 re-measures the shaped plant.
  • Online Optical Gain (PyWFS): On-sky PyWFS gain drops with seeing and residual WFE. Standalone/Stage-1 loops track it with sparse held DM probes (OG/POKE, 0.6% live error, zero PSOL leak); 2-stage systems use passive, probe-free 2WFS/LIVE (2WFS/IV) to calibrate Stage-2 optical gain (0.8–3.3%), scale ZPO, and solve blind DM2→DM1 offload, cross-checked against active SRM.
  • Live Wind Profiling: WIND tracks multi-layer frozen-flow velocities (WIND/2D, <0.05 m/s) and Fresnel layer altitudes (WIND/ALT) from PSOL telemetry to supply instant physics priors to Block-EOF.
2 · Layer 1 · Fixed Outer Modal Basis

Core Real-Time Wavefront Control Ladder

Every loop runs in a fixed outer modal basis built atop an unbiased Pseudo Open-Loop observer (PSOL: PSOL/2TAP scalar delay, PSOL/DIAG diagonal FIR for MEMS, or PSOL/MIMO 3D MIMO cutting coupled plate error 12.2×). Choose the control level matched to your SNR and regime:

  • Leaky Integrator (INT + MOPT): INT/LEAK / INT/MGAIN is the zero-warmup baseline. Adding MOPT (MOPT/LIVE, MOPT/FAINT, MOPT/KERN) autotunes per-mode (gain, leak) online from multi-resolution PSDs with faint-star adaptive memory and a ringing guard (−29.8% WFE).
  • Per-Mode Autoregressive (PF/AR): Fast-converging (256-frame) diagonal temporal AR(P) predictor; captures per-mode vibrations but cannot model spatial wind transport across modes (mutually exclusive with Block-EOF).
  • Cross-Mode Block-EOF (EOF — Recommended Anchor): Learns coupled spatio-temporal frozen-flow prediction (EOF/BASE) with composable upgrades: EOF/ZOH prevents Stage-1 DC collapse (keep OFF on Stage-2 high-pass residuals), EOF/MEM & EOF/REG retain long/multi-regime memory, EOF/WIND blends WIND physics Grams for instant cold-start (+70% VR) and 6.2× wind-switch rescue, and EOF/FX compensates unshaped ringing DMs (mutually exclusive with EOF/WIND).
  • Cascaded Online Self-Learning (SELFLEARN): Adds SL/GLOBAL (single-model RLS) and SL/CLUST (libgric multi-cluster RLS) strictly on top of Fixed-Basis Block-EOF with causal James-Stein gates. Cuts unmodulated PyWFS nonlinear residuals −36.4% while maintaining 1.000× white-noise null safety (1.43 nm vs. 18.35 nm standalone leak).
3 · Layer 2 · Decoupled Inner Loop (Planned C)

Inner Control-Mode Rotation & Telescope Vibration Notch

Adaptive basis optimization (CMODES) improves SNR separation and cancels narrowband optical vibrations, provided it never disturbs outer predictive buffers:

  • Noise-Whitened Rotation (CMODES/ROT): Continuously rotates the inner modal subspace inside modalfilter via an orthogonal/whitened matrix Q (WFS_rot = Q^T WFS, DM = Q DM_rot) with atomic ping-pong updates (+2.4 μs RT cost @ 128 m).
  • 16-Mode Telescope-Vibration Notch (CMODES/NOTCH): Applies selective ridge-regularized AR(48) notch filters on the top rotated modes to suppress 10–150 Hz telescope/bench structural lines (−14% to −19% WFE; automatically zeroed on pure white noise).
  • Mandatory Decoupling & History Re-Projection: Keeping Q strictly inside modalfilter leaves outer modevalOL, EOF, and SELFLEARN invariant, while rotating the AR(48) history buffer (H_new = (Q_new^T Q_old) H_old) makes basis swaps bumpless (47.5 nm vs. 286.8 nm unprojected or 213–367 nm coupled spikes).
4 · Layer 3 · Downstream DM Conditioning & Multi-Stage

DM Pre-Shaping, Faint-Star Multi-Rate Pacing & Offload

Downstream of modal reconstruction, hardware-aware DM conditioning suppresses plate mechanics, bridges slow faint-star WFS rates, and coordinates multi-stage DMs:

  • DM Mechanical Anti-Vibration Pre-Shaper (PRESH / PRESH/CAL): Causal 2–8 kHz unity-DC FIR filter cancelling ~1–2 kHz ALPAO plate resonances (distinct from optical vibrations) using Toeplitz WFS-exposure deconvolution (deconv_exp=ON). Supports five modes: uniform SISO (KMODE=2), per-actuator SISO (KMODE=3, 2.1× less free-rim ringing), per-actuator 5×5 local-stencil MIMO (KMODE=4, 100–278× 2D wave energy cut across interior & asymmetric free rim), and modal MIMO (KMODE=0, crushing 500 Hz astrogrid 1.5 kHz resonance −13 dB).
  • Faint-Star Slow-WFS + Multi-Rate DM (MRDM): At m=10, slowing Stage-1 WFS to ~250 Hz (WFS/SLOW, staying above the 4-spider island-petaling floor) boosts predictive H-Strehl 68.2%→80.4% (86.9% 2-stage) where integrators collapse. Driving smooth ramps (EOF/VEL → DM/MR at user hardware rate f_DM) strictly upstream of DMch2disp → PRESH/4K cuts pre-shaper stroke 18–40%, HF ripple −35%, and 1 kHz plate energy −40% with 0 clips and 0.000 fr lag.
  • Multi-Stage Coordination: Live OG-scaled ZPO (ZPO/OG) prevents Stage-2 PyWFS from fighting Stage-3 LLOWFS (6.6× less fightback); blind OFFL (OFFL/2TO1) offloads 100% of static DM2 stroke onto DM1.
5 · Verification, Safety Gates & Physics Testbeds

Online Whiteness Monitors, Pure-C Telemetry Analysis & GPU Simulation

Every real-time control choice is paired with non-intrusive health gates and hardware-calibrated physics validation: WHITE (WHITE/RT & WHITE/OOS) monitors lag ≥ ceil(τ) residual whiteness (Q_vw), cross-mode coupling, ZPO fightback, and white-noise null leakage; TLM (TLM/SYNC, TLM/OPT, TLM/PSFR) and 2WFS/POST provide pure-C post-loop synchronization, ETF gain audits, polychromatic PSF reconstruction, and 2WFS1DM verification. All algorithms are stress-tested end-to-end on SIM/PLATE (SIM/FUSED zero-hop GPU bench & SIM/MOD modular daemons with a 64×64 coupled plate PDE) and SIM/WROT (SIM/TURB Mauna Kea turbulence + phase-continuous wind rotation), paving the way for future coronagraphic focal-plane control (HESS/CORO).

6. Quick Selection Guide: Choosing an Algorithm Stack by Observing Regime

Observing / Hardware RegimeRecommended Option Stack (Clickable)Key Rationale & Detailed Report
Bright-Star High-Contrast 2-Stage (Default Science)3DRM/MIMO → PRESH/4K · PSOL/MIMO · EOF/BASE + EOF/ZOH + EOF/WIND · OG/POKE + 2WFS/IV · ZPO/OG + OFFL/2TO1Linearizes ALPAO plate, predicts frozen-flow & wind switches (6.2× rescue), and tracks Stage-1/2 optical gain passively. See Architecture Synthesis.
Unmodulated 0 λ/D PyWFS / Nonlinear Optical GainAbove + SL/GLOBAL + SL/CLUST (cascaded on EOF/BASE) + 2WFS/IV + WHITE/RTClustered RLS tracks state-dependent PyWFS nonlinearity (−36.4% WFE) while causal Stein gates guarantee 1.000× white-noise safety. See SELFLEARN & 2WFS1DM Report.
Faint-Star (m ≥ 9–10) Photon/RON-LimitedWFS/SLOW (≥250 Hz) + EOF/BASE + EOF/VEL + DM/MR (user f_DM) → PRESH/4K + dark subSlower WFS boosts SNR (+12 pts H-Strehl vs. 1 kHz) while smooth ramps cut pre-shaper stroke 18–40% and plate ripples −40%. See MRDM & Faint-Star Shootout.
Telescope Vibrations (10–150 Hz) & Fast Astrogrids (500 Hz)CMODES/ROT + CMODES/NOTCH (optical lines) · PRESH/4K (KMODE=0 astrogrid MIMO / KMODE=4 5×5 per-act)Decoupled inner AR(48) notch kills 10–150 Hz lines without basis-swap spikes; 8 kHz pre-shaper crushes 1.5 kHz astrogrid resonance −13 dB and 2D plate waves 100–278×. See DM Pre-Shaper Demo.
Minimal-Calibration / Conservative Fallback LoopMLAT + RM/FAST + PSOL/DIAG + INT/MGAIN + MOPT/LIVE + PRESH/4K (KMODE=2/3) + WHITE/RTZero predictive training buffer required; MOPT autotunes gains/leaks online and per-actuator SISO pre-shaping damps DM overshoot >10× at <12 μs cost. See MOPT & PRESH.

Interactive AO Loop Algorithmic Options Map

Each box is an algorithmic choice for running an AO loop (not tied 1-to-1 to compute units). Configure active stages and simulation setup at the top, choose from Calibration (Offline & Online) and the 3-Layer Real-Time Control Architecture (Core Control → Inner Mode Rotation → DM Actuation) left-to-right, and pick Diagnostics & Telemetry below. Unselectable choices are greyed out (e.g. Self-Learning requires Block-EOF; never standalone); mutually exclusive choices switch each other off.

Launch in Runner →
★ DEFAULT Standard Reference (2-Stage): ao3k_scexao_2stage_opt_ttm1hz — 2-Stage (AO3k + SCExAO, Stage-3 LLOWFS open) · unmodulated 0 l/D PyWFS · Block-EOF(B=32, P=24) · Cascaded Self-Learning · DM1 Pre-Shaper · Vernier Petal Control · Vis PyWFS TTM (stage2)★ STAGE 1 Stage 1 Only: ao3k_stage1 — Stage 1 only (AO3k, Stage 2 & Stage 3 open) · unmodulated 0 l/D PyWFS · Block-EOF(B=32, P=24) · Cascaded Self-Learning · DM1 Pre-Shaper · Passive Petal Control
Choice State:✓ Active○ Available⊘ Disabled (needs prereq)Hover Preview:★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
Use the pulldown menus for mutually exclusive / ordered choices and ON/OFF switches for standalone options. Disabled controls and unavailable menu options display their missing prerequisites directly in each box; hover any control to trace its dependency chain.
Active AO Stages & Faint-Star Cadence (Toggles)
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
Faint-Star Slow WFS (250-500 Hz)
Simulation & Bench Setup (Pulldown Choices)
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
SIM/FUSED↗
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
SIM/PLATE↗
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
SIM/TURB↗
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
WFS/MOD↗
CalibrationPulldowns for exclusive modes · Switches for toggles
Offline Calibration
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
OFF↗
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
OFF↗
Timing, Stage-3 RM & Reference (ON/OFF)
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
Loop Latency Calibration
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
Direct Zernike RM (Stage 3)
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
Self-RM Optical-Gain Reference
Online Calibration (In-Loop)
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
OFF↗
Active OG, Autotuner & Wind (ON/OFF)
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
Active DM-Poke IV Optical Gain
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
Per-Mode Gain & Leak Autotuner
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
Live Wind Velocity & Altitude
Real-Time Control Architecture (3 Decoupled Layers)Core Control → Inner Rotation → DM Actuation
1. Core Real-Time Control (Fixed Outer Modal Basis)
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
OFF↗
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
OFF↗
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
OFF↗
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
OFF↗
Block-EOF Ridge & Memory Extensions (ON/OFF)
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
ZOH-Centered Ridge
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
Extended Chunk-Gram Memory
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
Regime-Weighted Gram Library
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
OFF↗
2. Inner Control-Mode Optimization (Decoupled Rotation Matrix Q)
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
OFF↗
3. DM Control & Multi-Stage Actuation (Downstream)
DM Conditioning Order (ON/OFF): DM/MR (user f_DM) → DMch2disp → PRESH/4K (2-8 kHz) → DM
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
Multi-Rate DM Pacing (user f_DM)
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
2-8 kHz DM Anti-Vib Pre-Shaper (K0-4)
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
OFF↗
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
Blind DM2->DM1 Stroke Offload
Diagnostics & Telemetry (ON/OFF Toggles)Online monitors, telemetry analysis, PSFR & post-loop audits
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
RT Whiteness & ZPO Monitor
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
OOS EOF Overfit Guard
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
Telemetry Sync & PCA/CCA
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
Offline PSD/ETF Gain Opt
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
Polychromatic PSF Recon
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
Post-Loop 2WFS1DM Audit
★ Hovered← Required◇ Optional→ Enables⇄ Feedback✕ Exclusive
Coro WFS-to-PSF Hessian (Plan)

Algorithm Categories, Combination Rules & Verified Benchmark Findings

Compact reference summarizing the three decoupled control layers, enforced combination rules, and quantitative benchmark verification across offline multi-regime and live GPU cacaosim runs. Click any algorithm code to open its specification.

Category 1 · Fixed Outer Modal Basis

Core Real-Time Control Progression

  1. Manual Leaky Integrator (INT/LEAK, INT/MGAIN) — static gain & leak baseline.
  2. Autotuned Leaky Integrator (MOPT) — online per-mode PSD gain/leak optimization with faint-star memory & ringing guard.
  3. Per-Mode Autoregressive Filter (PF/AR) — diagonal online AR(P) over PSOL; fast warmup, no cross-mode wind transport.
  4. Cross-Mode Block-EOF (EOF/BASE + ZOH/MEM/REG/WIND/FX) — spatio-temporal frozen-flow predictor & mandatory linear anchor.
  5. Cascaded Global Online Adaptive Filter (SL/GLOBAL) — single-model online RLS residual refiner with causal Stein gate on top of Block-EOF.
  6. Cascaded Clustered Self-Learning (SL/CLUST) — libgric multi-cluster RLS residual layer handling nonlinear PyWFS optical gain & state switches.

Prerequisite: Unbiased PSOL (2-tap / Diag FIR / 3D MIMO + exact multi-rate ramp integral), WFS dark subtraction, and online calibration (OG/POKE, 2WFS/LIVE, WIND).

Category 2 · Decoupled Inner Loop

Inner Control-Mode Optimization (Rotation Matrix)

  • Noise-Whitened Inner Basis Rotation (CMODES/ROT): adapts an inner orthogonal/whitened matrix Q inside modalfilter (WFS_rot = Q^T WFS, DM = Q DM_rot) to separate high-SNR from low-SNR directions with atomic swaps.
  • Inner 16-Mode Vibration Notch (CMODES/NOTCH): targets narrowband telescope & optical-bench vibrations (10–150 Hz) via AR(48) on the leading rotated modes, with mandatory in-place history re-projection H_new = (Q_new^T Q_old) H_old.
  • Strict Decoupling Invariant: Outer DMmodes, modevalOL, EOF, and SELFLEARN stay 100% fixed.

Status: Benchmark-validated (47.5 nm bumpless swaps, +2.4 us RT overhead); slated for cacao / milk-mltools C deployment.

Category 3 · Downstream Actuation

DM Control: Multi-Rate & Anti-Vibration

  • Multi-Rate DM Pacing (DM/MR): cacao-fpsexec-mvalpacer drives smooth centered linear ramps at a user-specified hardware-dependent rate f_DM (e.g. 1 kHz on AO3k ALPAO; K_sub = round(f_DM / f_WFS), zero-latency j=0 wake) from Block-EOF's zero-DC velocity solver (EOF/VEL) when a faint-star WFS slows to 250–500 Hz.
  • DM Mechanical Anti-Vibration Pre-Shaper (PRESH/4K): 2–8 kHz modal (KMODE=0..2) & per-actuator (KMODE=3, 4) FIR filter (dmpreshaper) cancelling ALPAO mechanical plate vibrations (f0 ~ 1 kHz), free-rim reflections, & cross-talk.
  • Multi-Stage DM Coordination: Live OG-scaled WFS Zero-Point Offset (ZPO/OG) and blind DM2→DM1 static stroke offload (OFFL/2TO1).

Required Hardware Chain: mvalpacer (user f_DM) → mvalC2dm → DMch2disp → dmpreshaper (f_presh ≥ f_DM) → DM.

WFS (dark-sub)→PSOL (MIMO + MR ramp)→Fixed Outer Basis: Block-EOF → Cascaded Self-Learning→Decoupled Inner modalfilter: Q-Rotation + AR(48) Notch→Multi-Rate Pacer (user f_DM) → DMch2disp → Plate Pre-Shaper → DM

Combination Rules & Verified Anti-Patterns

Architectural RuleAllowed / Recommended PatternAnti-Pattern to AvoidMeasured Evidence
Self-Learning CascadeCascade SL/GLOBAL → SL/CLUST on top of Fixed-Basis EOF/BASE with causal Stein gates.Running self-learning standalone (replacing Block-EOF).Pure 40 nm white-noise null: 1.43 nm (1.000×) cascaded vs 18.35 nm (1.10×) standalone; pure turb 18.17 vs 33.5 nm.
Basis-Rotation DecouplingKeep CMODES/ROT & CMODES/NOTCH strictly inside modalfilter; re-project AR(48) history on every swap.Rotating the outer basis underneath EOF or SELFLEARN, or swapping Q without history re-projection.Mid-run basis swaps: 47.5 nm bumpless decoupled + re-projected vs 286.8 nm unprojected and 213–367 nm coupled spikes.
Multi-Rate × Pre-Shaper OrderPlace DM/MR (mvalpacer) upstream of DMch2disp → PRESH/4K (dmpreshaper).Placing multi-rate pacer downstream of pre-shaper, or driving 250 Hz ZOH steps straight into pre-shaper.Smooth 1 kHz ramps cut pre-shaper stroke 18–40%, 0 clips, 0.000 fr added lag, −35% HF ripple, −40% 1 kHz plate energy.
Faint-Star WFS Rate FloorReduce Stage-1 WFS rate from 1000 → 250 Hz (WFS/SLOW) at m=10 under EOF/BASE + DM/MR + WFS dark subtraction.Slowing an integrator to 250 Hz, slowing Stage 1 below ~250 Hz on 4-spider pupil, or omitting WFS dark subtraction.m=10 live GPU H-Strehl climbs 68.2% → 80.4% (vs integrator 50.7% @ 500 Hz, 38.6% @ 250 Hz); 100–200 Hz hits Subaru 4-spider island petaling.
EOF Plant OptionsUse PRESH/4K + PSOL/MIMO + EOF/WIND when shaped; reserve EOF/FX for unshaped ringing DMs.Combining EOF/FX with EOF/WIND, or running PF/AR and EOF/BASE together.EOF/WIND cuts live +60° wind-switch WFE 6.16×; EOF/FX cuts unshaped plate ringing Q_vw 26.4×.

Headline Verified Benchmark Summary

Offline Multi-Regime & RT ShootoutIntegratorFixed Block-EOFFull Decoupled Stack
R1 · Pure Turbulence73.77 nm19.23 nm18.17 nm (−5.5%)
R2 · +30 nm Telescope Vibrations78.40 nm25.84 nm22.22 nm (−14.0%)
R3 · +60° Wind Direction Switch74.12 nm17.45 nm16.35 nm (−6.3%)
R4 · Unmodulated PyWFS Nonlinearity41.65 nm16.16 nm10.27 nm (−36.4%)
R5 · Combined OG + Vibration Stress82.19 nm33.46 nm27.06 nm (−19.1%)
R6 · 40 nm Pure White-Noise Null (DM leak)8.12 nm1.53 nm1.43 nm (1.000×)
Mid-Run Basis Swap Peak / RT CPU (128 / 256 m)— / 22.6 μs— / 18.8 μs47.5 nm / 88.9 & 113.9 μs
Live GPU cacaosim (23-Run Faint-Star & Multi-Rate)BaselineBest / OptimizedMeasured Gain
m=10 Stage-1 Integrator (1 kHz → 500 Hz opt)415.3 nm / 47.5% H-Sr400.8 nm / 50.7% H-SrCollapses to 38.6% @ 250 Hz
m=10 Stage-1 Block-EOF (1 kHz → 250 Hz)169.6 nm / 68.2% H-Sr130.0 nm / 80.2% H-Sr+12.0 pts H-Strehl
m=10 Stage-1 EOF + Multi-Rate 1 kHz DM @ 250 HzZOH 130.0 nm / 80.2%129.3 nm (108.7 SS) / 80.4%−18% PS stroke, 0 clips, 0.000 fr lag
m=10 Full 2-Stage (Stg1 250 Hz MR + Stg2 2 kHz)Stg1 only 129.3 nm94.0 nm / 86.9% H-Sr53.8% Vis Sr · 9.19×10−5 coro
m=6 250 Hz 2×2 Ablation: MR 1 kHz + 2 kHz Pre-ShaperZOH/PS-OFF 74.9 nm71.8 nm / 69.0% Vis Sr−35% HF, −40% 1 kHz plate, −10% coro
8 kHz Per-Actuator Pre-Shaper (KMODE=4 5×5 Stencil)Raw 15.3–17.0% 2D wave0.92–1.70% 2D wave100–278× wave energy cut (int & rim)
28 / 28
CodeRoleAlgorithm & Description (Click to Open)Option Variants (CODE/OPT)StageRequiresEnablesDeps
Offline Calibration— Pre-loop or startup calibrations producing response matrices, dynamic plant kernels, pre-shapers, and latency alignments8 entries
MLATSELREQENOffline CalibHardware Loop Latency CalibrationMeasures exact DM-to-WFS hardware and software loop latency in WFS frames.MLAT/FASTMLAT/RTStg 1Stg 2Stg 3SIM/PLATERM MOPT INT PSOL PF/AR EOF
RMSELREQENOffline CalibStatic Response Matrix & Modal BasisAcquires Hadamard/direct static RM and computes SVD modal control matrix.RM/HADRM/FASTRM/DIRStg 1Stg 2Stg 3MLAT3DRM/P1 3DRM/P2 LAG/2PT SRM OG/POKE 2WFS/LIVE WIND MOPT INT PSOL ZPO PF/AR EOF SELFLEARN MRDM 2WFS/POST CMODES
3DRM/P1SELREQENOffline CalibStroboscopic 3D Dynamic RM — Pass 1Sub-frame stroboscopic measurement of the raw DM+WFS spatio-temporal response.3DRM/P1Stg 1Stg 2RMPRESH/CAL 3DRM/FACT
PRESH/CALSELREQENOffline CalibDM Pre-Shaper Kernel SynthesisComputes causal 2-8 kHz modal or per-actuator FIR inverse pre-shaper kernels from Pass-1 3D RM.PRESH/CALStg 13DRM/P1PRESH
3DRM/P2SELREQENOffline CalibStroboscopic 3D Dynamic RM — Pass 2Measures the effective shaped DM+WFS plant with high-rate `PRESH` active.3DRM/P2Stg 1RM PRESH3DRM/FACT?
3DRM/FACTSELREQENOffline Calib3D RM Factoring (Static Gain + Unit-DC Kernel)Factors 3D RM into static M_cal and causal unit-DC H_diag / H_mimo kernels.3DRM/MIMO3DRM/DIAGStg 1Stg 23DRM/P1 3DRM/P2?LAG/2PT OG/POKE 2WFS/LIVE? MOPT? PSOL? EOF? MRDM? 2WFS/POST?
LAG/2PTSELREQENOffline CalibScience-Cadence 2-Point Fractional Lag AlignmentAligns open-loop 3D RM kernels to exact closed-loop IPC latency (< 0.05 fr).LAG/2PTStg 1Stg 2RM 3DRM/FACT PRESH?OG/POKE MOPT? PSOL? EOF?
SRMSELREQENOffline CalibModal Self-Response Matrix (Optical-Gain Reference)Active modal poke sweep measuring calibration and on-sky PyWFS optical gain.SRM/CALSRM/SKYStg 1Stg 2RMOG/POKE? 2WFS/LIVE? 2WFS/POST?
Online Calibration (In-Loop)— Adaptive estimators running during closed-loop science to track time-varying optical gain, modal gains/leaks, wind layers, and ZPO scaling4 entries
OG/POKESELREQENOnline CalibSingle-Stage Closed-Loop DM-Poke Online Optical GainExogenous DM-poke IV optical-gain tracker with clamped local-linear smoothing.OG/POKEOG/POKE-SHADStg 1RM 3DRM/FACT LAG/2PT PSOL SRM?MOPT? PF/AR? EOF? SELFLEARN?
2WFS/LIVESELREQENOnline Calib2-Stage Passive 2WFS1DM Online CalibrationProbe-free Differenced Lagged-A 2SLS calibrating Stage-2 OG, ZPO, and DM2->DM1 offload.2WFS/IV2WFS/WStg 22-StageRM PSOL 3DRM/FACT? SRM?OFFL MOPT? ZPO? PF/AR? EOF? SELFLEARN?
WINDSELREQENOnline CalibLive Wind Velocity & Altitude ProfilerReal-time spatiotemporal cross-correlation wind (vx, vy), altitude z, and Strehl monitor.WIND/2DWIND/ALTStg 1RM PSOL SIM/WROT?EOF? SELFLEARN? MRDM?
MOPTSELREQENOnline CalibOnline Per-Mode Leaky-Integrator Gain & Leak AutotunerJoint per-mode (gain, leak) autotuner via Parseval Multi-Res PSD, faint-star adaptive memory, and ringing guard.MOPT/SHADMOPT/LIVEMOPT/FAINTMOPT/KERNStg 1Stg 2Stg 3MLAT RM PSOL 3DRM/FACT? LAG/2PT? OG/POKE? 2WFS/LIVE?CMODES?
Real-Time Loop Operation— Frame-synchronous wavefront control loops, dynamic PSOL observers, pre-shapers, ZPO scaling, and predictive controllers9 entries
PRESHSELREQENRT OperationHigh-Rate DM Mechanical Anti-Vibration Pre-ShaperReal-time 2-4 kHz MIMO FIR filter suppressing ALPAO plate mechanical vibrations, ringing, and cross-mode coupling downstream of DMch2disp.PRESH/4KStg 1PRESH/CAL3DRM/P2 LAG/2PT? INT? PSOL? MRDM?
INTSELREQENRT OperationModal Leaky IntegratorCore frame-synchronous modal leaky integrator with spatial-frequency gain rolloff.INT/LEAKINT/MGAINStg 1Stg 2Stg 3MLAT RM PRESH? MOPT?TLM CMODES
PSOLSELREQENRT OperationDynamic FIR / MIMO Pseudo Open-Loop ObserverReconstructs probe-free pseudo open-loop turbulence using 2-tap, diag, or 3D MIMO FIR.PSOL/2TAPPSOL/DIAGPSOL/MIMOStg 1Stg 2Stg 3MLAT RM PRESH? 3DRM/FACT? LAG/2PT? OG/POKE? 2WFS/LIVE?OG/POKE 2WFS/LIVE WIND MOPT PF/AR EOF SELFLEARN MRDM WHITE 2WFS/POST HESS/CORO TLM? CMODES?
ZPOSELREQENRT OperationWFS Zero-Point Offset & Optical-Gain ScalingTransfers Stage-3 LLOWFS offsets into Stage-2 PyWFS reference scaled by live OG.ZPO/FIXZPO/OGStg 2Stg 32-StageRM 2WFS/LIVE?HESS/CORO?
OFFLSELREQENRT OperationBlind DM2-to-DM1 Static Stroke OffloadOffloads low-order static DM2 stroke onto Stage-1 DM1 using passive Mda_virt.OFFL/2TO12-Stage2WFS/LIVE—
PF/ARSELREQENRT OperationDiagonal Autoregressive Predictive ControlPer-mode temporal AR(P) predictive filter trained online from PSOL telemetry.PF/ARStg 1Stg 2MLAT RM PSOL OG/POKE? 2WFS/LIVE?WHITE?
EOFSELREQENRT OperationUnified Cross-Mode Block-EOF Predictive ControlSpatio-temporal Block-EOF with ZOH ridge, extended/regime Grams, wind prior & FX-DM.EOF/BASEEOF/ZOHEOF/MEMEOF/REGEOF/WINDEOF/FXStg 1Stg 2MLAT RM PSOL OG/POKE? 2WFS/LIVE? WIND? 3DRM/FACT? LAG/2PT?SELFLEARN MRDM WHITE? CMODES?
SELFLEARNSELREQENRT OperationCascaded Online Self-Learning Residual RefinerCascaded Global Online Adaptive Filter (single-model RLS) and Clustered State-Dependent Self-Learning (libgric) on top of Fixed-Basis Block-EOF.SL/GLOBALSL/CLUSTStg 1Stg 2RM PSOL EOF OG/POKE? 2WFS/LIVE? WIND?CMODES?
MRDMSELREQENRT OperationMulti-Rate DM Command Pacing & Slow-WFS TrajectoryDrives DM commands at a user-specified hardware-dependent rate f_DM (smooth centered linear ramps) even when a faint-star WFS slows to 200-500 Hz, sitting upstream of DMch2disp and dmpreshaper.DM/MREOF/VELWFS/SLOWStg 1RM PSOL EOF PRESH? 3DRM/FACT? WIND?—
Diagnostics & Post-Loop Analysis— Non-intrusive whiteness monitors, telemetry sync, modal gain optimizers, offline SysID audits, and PSF reconstruction3 entries
WHITESELREQENDiagnosticsClosed-Loop Whiteness & Predictability MonitorLag >= ceil(tau) residual whiteness, cross-mode coupling, ZPO alarm & OOS EOF overfit.WHITE/RTWHITE/OOSStg 1Stg 2PSOL PF/AR? EOF?—
TLMSELREQENDiagnosticsTelemetry Sync, Gain Optimization & Polychromatic PSFRNative C telemetry indexing/sync, PCA/CCA, modal PSD/ETF gain opt & PSF reconstruction.TLM/SYNCTLM/OPTTLM/PSFRStg 1Stg 2INT PSOL?2WFS/POST HESS/CORO
2WFS/POSTSELREQENDiagnosticsPost-Loop 2WFS1DM Calibration AuditOffline 2WFS1DM system-identification report cross-checked against on-sky selfRM.2WFS/POST2-StageTLM RM PSOL 3DRM/FACT? SRM?—
Simulation Physics— Coupled flexural+membrane DM plate PDE and phase-continuous atmospheric wind-rotation kernels used to stress-test AO algorithms2 entries
SIM/PLATESELREQENSim PhysicsCoupled 64x64 Plate PDE DM & Polychromatic BenchGPU-fused polychromatic optical bench with calibrated ALPAO coupled plate PDE DM.SIM/PLATESIM/FUSEDSIM/MODStg 1Stg 2Stg 3—MLAT
SIM/WROTSELREQENSim PhysicsMulti-Layer Turbulence & Phase-Continuous Wind RotationMauna Kea multi-layer atmosphere with live phase-continuous wind-direction switches.SIM/TURBSIM/WROTStg 1Stg 2—WIND?
Research Queue (Planned)— Validated offline research prototypes slated for C/milk-mltools deployment2 entries
CMODESSELREQENPlannedInner Control-Mode Optimization (On-the-Fly Rotation Matrix)Noise-whitened inner modal rotation matrix Q and 16-mode AR(48) telescope vibration notch strictly decoupled inside modalfilter.CMODES/ROTCMODES/NOTCHStg 1Stg 2RM INT MOPT? PSOL? EOF? SELFLEARN?—
HESS/COROSELREQENPlannedCoronagraphic WFS-to-PSF Quadratic / Hessian ModelStreaming quadratic WFS-to-focal-plane speckle model for NCPA & optical-gain anchoring.HESS/QUADHESS/2CHStg 22-StagePSOL TLM ZPO?—

Cell Legend: REQ Required calibration/input · OPT Optional enhancement · FB Live closed-loop feedback. Click any code header or cell to open its algorithm webpage.

Algorithm (Row) \ Prereq (Col)MLATRM3DRM/P1PRESH/CALPRESH3DRM/P23DRM/FACTLAG/2PTSRMINTPSOLEOFOG/POKE2WFS/LIVEMOPTWIND
MLAT Hardware Loop Latency Calibration················
RM Static Response Matrix & Modal BasisREQ···············
3DRM/P1 Stroboscopic 3D Dynamic RM — Pass 1·REQ··············
PRESH/CAL DM Pre-Shaper Kernel Synthesis··REQ·············
3DRM/P2 Stroboscopic 3D Dynamic RM — Pass 2·REQ··REQ···········
3DRM/FACT 3D RM Factoring (Static Gain + Unit-DC Kernel)··REQ··OPT··········
LAG/2PT Science-Cadence 2-Point Fractional Lag Alignment·REQ··OPT·REQ·········
SRM Modal Self-Response Matrix (Optical-Gain Reference)·REQ··············
OG/POKE Single-Stage Closed-Loop DM-Poke Online Optical Gain·REQ····REQREQOPT·REQ·····
2WFS/LIVE 2-Stage Passive 2WFS1DM Online Calibration·REQ····OPT·OPT·REQ·····
WIND Live Wind Velocity & Altitude Profiler·REQ········REQ·····
MOPT Online Per-Mode Leaky-Integrator Gain & Leak AutotunerREQREQ····OPTOPT··REQ·OPTOPT··
PRESH High-Rate DM Mechanical Anti-Vibration Pre-Shaper···REQ············
INT Modal Leaky IntegratorREQREQ··OPT·········FB·
PSOL Dynamic FIR / MIMO Pseudo Open-Loop ObserverREQREQ··OPT·OPTOPT····FBFB··
ZPO WFS Zero-Point Offset & Optical-Gain Scaling·REQ···········OPT··
OFFL Blind DM2-to-DM1 Static Stroke Offload·············REQ··
PF/AR Diagonal Autoregressive Predictive ControlREQREQ········REQ·OPTOPT··
EOF Unified Cross-Mode Block-EOF Predictive ControlREQREQ····OPTOPT··REQ·OPTOPT·OPT
SELFLEARN Cascaded Online Self-Learning Residual Refiner·REQ········REQREQOPTOPT·OPT
MRDM Multi-Rate DM Command Pacing & Slow-WFS Trajectory·REQ··OPT·OPT···REQREQ···OPT
WHITE Closed-Loop Whiteness & Predictability Monitor··········REQOPT····
TLM Telemetry Sync, Gain Optimization & Polychromatic PSFR·········REQOPT·····
2WFS/POST Post-Loop 2WFS1DM Calibration Audit·REQ····OPT·OPT·REQ·····
SIM/PLATE Coupled 64x64 Plate PDE DM & Polychromatic Bench················
SIM/WROT Multi-Layer Turbulence & Phase-Continuous Wind Rotation················
CMODES Inner Control-Mode Optimization (On-the-Fly Rotation Matrix)·REQ·······REQOPTOPT··OPT·
HESS/CORO Coronagraphic WFS-to-PSF Quadratic / Hessian Model··········REQ·····