Modal Self-Response Matrix (Optical-Gain Reference)
Active modal poke sweep measuring calibration and on-sky PyWFS optical gain.
Overview & Role
Applies controlled modal pokes through the DM and projects WFS responses back into modal space (selfRM) both on the internal calibration source and on sky to provide ground-truth optical gain curves for validating OG/POKE and 2WFS/LIVE.
When PRESH (dmpreshaper) is active on Stage 1, selfRM runs real-time paced (disabling --fast lockstep step-and-shoot) so the upsampled pre-shaper settles cleanly.
Compute Units / Entry Points: cacaoloop-ao3k-scexao.milk (selfRM)
Verified Highlights:
- Matches live modalog to 0.6% (Exp 1) and live 2WFS1DM to 0.8-3.3% (Exp 2/3)
Option Variants (CODE/OPT)
| Option Code | Behavior & Usage | Main Flags |
|---|---|---|
SRM/CAL | Pre-loop calibration-source selfRM baseline (unit optical gain reference). | --selfrm-modes --no-selfrm |
SRM/SKY | On-sky active selfRM sweep measuring physical PyWFS optical gain truth. | --selfrm-modes --selfrm-iter --no-selfrm |
Dependencies & Calibration Chain
Upstream Calibrations & Inputs
Selected Algorithm
★ Current Entry
SRMOffline Calib
Modal Self-Response Matrix (Optical-Gain Reference)
Feeds & Enables Downstream
CLI Flags, Environment Variables & FPS Parameters
| Layer | Option (Links to Reference) | Default | Description |
|---|---|---|---|
| CLI Flag | --selfrm-modes | 256 | Maximum number of modes probed in selfRM optical-gain calibration |
| CLI Flag | --selfrm-iter | 1 | On-sky selfRM averaging iterations during closed-loop science |
| CLI Flag | --no-selfrm | OFF | Skip calibration and on-sky selfRM acquisition |
| CACAO_* Env | CACAO_SELFRM_ZSIZE | 8 | Temporal modulation depth [frames] per mode during selfRM measurement |
Implementation, Tests & Related Reports
Source Files
- cacao-work:
benches/ao3k_scexao/cacaoloop-ao3k-scexao.milk - cacao-work:
benches/ao3k_scexao/sim-ao3k-scexao.milk
Verification Tests
test_14_calib2wfs1dm_live.pyao3k_phases1to5_bench.py