Interactive Parameter Scaling & CLI Override Explorer Simulation
Adjust seeing, wind speed scaling, wind dynamics, vibrations, or thermal petaling to compute exact von Karman atmospheric statistics and generate the corresponding run-ao3k-scexao.sh override flags:
./scripts/run-ao3k-scexao.sh
1. Atmospheric Turbulence Profile & Statistics Simulation
The baseline atmospheric profile is the 7-layer Maunakea summit profile (h_site = 4215 m ASL, AtmosphericTurbulenceSimul/atmturb_profile.c) split between four boundary-layer slabs (71.35% of total Cn2, outer scale L0 = 25 m, moving at 6.5–6.7 m/s along 84°–101°) and three free-atmosphere layers (28.65% Cn2, L0 = 100 m, dominated by the 12 km ASL jet stream at 22.0 m/s along 178°). The effective Cn2-weighted outer scale is L0_eff = 34.99 m, mean wind v_mean = 8.84 m/s, effective 5/3-moment wind v_eff = 9.74 m/s, and effective turbulence altitude h_eff = 5623 m AGL.
Exact von Karman seeing solver: Because finite outer scale (L0 = 25/100 m) reduces low-order tilt and narrows the long-exposure PSF relative to Kolmogorov turbulence, atmturb_seeing.c numerically inverts the exact Hankel-transformed long-exposure OTF so that the simulated 0.50 um PSF FWHM equals the requested seeing (at default 0.80", von Karman r0 = 10.73 cm vs. Kolmogorov 12.58 cm). Across the Subaru D = 7.95 m pupil, exact piston-removed OPD RMS is 1595 nm (vs. 2560 nm Kolmogorov; tip/tilt-removed 1053 nm).
7-Layer Maunakea Vertical Profile (atmturb_profile.c)
| Layer | Regime | Alt ASL | Alt AGL | Cn2 Share | Nominal Wind | Heading | Outer Scale L0 |
|---|---|---|---|---|---|---|---|
| L0 | Boundary Layer | 4215 m | 0 m | 38.04% | 6.50 m/s | 1.47 rad (84.2°) | 25 m |
| L1 | Boundary Layer | 4230 m | 15 m | 10.51% | 6.55 m/s | 1.57 rad (90.0°) | 25 m |
| L2 | Boundary Layer | 4349 m | 134 m | 7.72% | 6.60 m/s | 1.67 rad (95.7°) | 25 m |
| L3 | Boundary Layer | 5007 m | 792 m | 15.09% | 6.70 m/s | 1.77 rad (101.4°) | 25 m |
| L4 | Free Atm (Jet) | 12000 m | 7785 m | 13.08% | 22.00 m/s | 3.10 rad (177.6°) | 100 m |
| L5 | Free Atm | 16200 m | 11985 m | 10.58% | 9.50 m/s | 3.20 rad (183.3°) | 100 m |
| L6 | Free Atm | 23701 m | 19486 m | 4.98% | 5.60 m/s | 3.30 rad (189.1°) | 100 m |
Derived Multi-Band Statistics at Default 0.80" Seeing & Nominal Wind
| Band / Channel | Wavelength | r0 (von Karman) | D / r0 (7.95 m) | Coherence tau0 | Greenwood f_G | Isoplanatic theta_0 |
|---|---|---|---|---|---|---|
| Ref (0.50 um) | 0.50 um | 10.73 cm | 74.1 | 3.46 ms | 38.75 Hz | 1.24" |
| Vis / SCExAO WFS (0.75 um) | 0.75 um | 17.45 cm | 45.6 | 5.63 ms | 23.82 Hz | 2.01" |
| J-Band / AO3k WFS (1.22 um) | 1.22 um | 31.29 cm | 25.4 | 10.09 ms | 13.29 Hz | 3.60" |
| H-Band / Science & Coro (1.65 um) | 1.65 um | 44.95 cm | 17.7 | 14.50 ms | 9.25 Hz | 5.18" |
Wavefront synthesis & stepping: Master screens are synthesized on 1024x1024 grids (master_oversample = 2, lowfreq = 1 sub-harmonics), sampled onto the 256x256 pupil (0.0331 m/px) using Keys bicubic interpolation (interp = 1) and variance-preserving quadrature rolling cross-fade (rolling = 1, boil_mode = 0) with multi-wavelength Fourier Rytov diffractive propagation (fresnel = 2, chrom_turb = 1 across 5 anchor wavelengths 0.65, 0.75, 1.22, 1.65, 1.85 um producing coupled 3D OPD and scintillation amplitude cubes interpolated between bracketing anchors in every broadband sensor). Outer turbulence ticks advance at 2.0 kHz (dt = 500 us) and both phase and amplitude are linearly interpolated on GPU across 4x sub-steps to the 8.0 kHz (125 us) polychromatic optical bench clock.
2. Non-Stationary Wind Statistics, Meandering & Gust Bursts Simulation
Real Maunakea turbulence is non-stationary: both wind vectors and local Cn2 strength evolve continuously over multi-second timescales. Implemented in AtmosphericTurbulenceSimul/atmturb_dynwind.c and enabled by default (--wind-var-scale 1.0, --wind-burst-scale 1.0), each layer's screen translation is integrated along a phase-continuous trajectory dx_k += vx_k(t) * dt so wind shifts never cause artificial phase jumps.
Matern-3/2 Wind Meandering & Asymmetric C1 Gust Burst Parameters
| Component | Default State | Timescale / Cadence | Amplitude & Coupling | Physical Effect |
|---|---|---|---|---|
| Boundary Layer Band (h_AGL ≤ 2 km) | ON (1.0x) | tau_s=3.5 s, tau_d=4.0 s | sigma_log=0.22 (~±22%), sigma_dir=±22° | Smooth C1 (-40 dB/dec) dome & summit wind drift shared across L0–L3 (weight 0.78) |
| Free Atmosphere Band (h_AGL > 2 km) | ON (1.0x) | tau_s=6.0 s, tau_d=6.5 s | sigma_log=0.14 (~±14%), sigma_dir=±10° | Slower jet-stream shear modulation shared across L4–L6 (weight 0.78) |
| Per-Layer Independent Residuals | ON (1.0x) | BL 3.0 s / FA 5.0 s | BL 0.12/10°; FA 0.08/5° (wt 0.62) | Breaks rigid inter-layer lockstep; combined speed factor clamped to [0.35x, 3.2x] |
| Asymmetric C1 Gust Bursts | ON (1.0x) | 1st gap 1.8–3.0 s, next 2.2–4.4 s; rise 0.25–0.5 s, decay 0.95–1.8 s | Speed +0.80–1.35x (0.35x FA), dir ±18–36°, Cn2 +22–36% (0.20x FA) | Half-cosine onset + exp(-1.2u) cos^2(pi u / 2) tail; active ~28% of time, driving transient tau0 drops and predictor adaptation tests |
| Live Wind-Direction Step (Optional) | OFF (0 s) | Trigger via --wind-switch-sec | Rotation angle via --wind-switch-deg (default 60°) | Deterministic phase-continuous heading rotation step for windlayers / EOF regime-switch benchmarks |
3. Telescope & Optical-Bench Vibrations Simulation
Implemented in cacaosim/src/common/cacaosim_perturb.c and enabled by default (--vib-rms-nm 45.0), mechanical vibrations are synthesized as five independent, exact stationary discrete-time AR(2) damped harmonic resonators sampled at the 2 kHz outer clock (and interpolated across internal 8 kHz sub-steps). Each line's unit-variance process x[n] = a1 x[n-1] + a2 x[n-2] + b g[n] (primed with its exact stationary lag-1 correlation rho1 = a1 / (1 - a2)) drives a unit-norm coupling vector across five Gram-Schmidt pupil-orthonormalized low-order Zernike modes (Z2..Z6) on the actual Subaru V-spider pupil.
5-Line AR(2) Resonator Bank (Default Total RMS = 45.0 nm)
| Line | f0 | Damping zeta | Q Factor | FWHM | Var Share | Line RMS | Zernike Coupling | Physical Origin |
|---|---|---|---|---|---|---|---|---|
| Line 1 | 14.5 Hz | 0.035 | 14.3 | 1.02 Hz | 22% | 21.1 nm | Z2=+0.85, Z3=+0.53 | Telescope truss / M2 wind-shake (elliptical tip/tilt) |
| Line 2 | 31.0 Hz | 0.015 | 33.3 | 0.93 Hz | 16% | 18.0 nm | Z2=-0.45, Z3=+0.89 | Nasmyth platform / M1 cell support (near-orthogonal tip/tilt) |
| Line 3 | 49.5 Hz | 0.008 | 62.5 | 0.79 Hz | 38% | 27.7 nm | Z2=+0.78, Z3=+0.55, Z4=+0.30 | Cryocooler / bench fundamental (tip/tilt + defocus) |
| Line 4 | 99.0 Hz | 0.008 | 62.5 | 1.58 Hz | 15% | 17.4 nm | Z2=+0.60, Z3=-0.65, Z5=+0.35, Z6=+0.31 | Cryocooler 2nd harmonic / fan (tip/tilt + astigmatism) |
| Line 5 | 138.0 Hz | 0.010 | 50.0 | 2.76 Hz | 9% | 13.5 nm | Z2=+0.70, Z3=+0.71 | High-frequency optical-bench / M2 structural mode (tip/tilt) |
Stationary Per-Zernike OPD RMS Breakdown (Quadrature Sum = 45.0 nm)
| Orthonormal Pupil Mode | Variance Share | Stationary OPD RMS |
|---|---|---|
| Z2 (Tip) | 52.06% | 32.47 nm |
| Z3 (Tilt) | 41.25% | 28.90 nm |
| Z4 (Defocus) | 3.42% | 8.32 nm |
| Z5 (Oblique Astig) | 1.84% | 6.10 nm |
| Z6 (Vertical Astig) | 1.42% | 5.37 nm |
4. Thermally Induced Petaling / Low-Wind Effect (LWE) Simulation
Radiative cooling of the Subaru telescope's thick Nasmyth-IR V-spiders creates differential air-temperature gradients across the four disjoint pupil segments, producing discontinuous piston and local tip/tilt steps (Low-Wind Effect / petaling) that are poorly sensed by standard Pyramid WFS slopes and split the coronagraphic core. Implemented in cacaosim/src/common/cacaosim_perturb.c and enabled by default (--petal-rms-nm 1000.0, --petal-tau-s 3.0), the simulator automatically discovers the 4 disconnected pupil islands via 4-connected BFS (East 22.2%, North 27.8%, West 22.2%, South 27.8%) and evolves each island's differential piston and local tip/tilt using independent exact Matern-3/2 processes.
Default Thermal Petaling / LWE Statistical Budget
| Parameter / Statistic | Default Value | Formula / Notes |
|---|---|---|
| Pupil Island Segmentation | 4 islands (BFS) | East (22.2%), North (27.8%), West (22.2%), South (27.8%) ordered counter-clockwise by centroid azimuth |
| Total Petaling OPD RMS | 1000.0 nm | Area-weighted quadrature sum over differential island pistons + local island tip/tilt |
| Differential Island Piston RMS | 866.0 nm (75.0% var) | Area-weighted global mean piston removed every step; raw draw sigma = 1000.0 nm |
| Expected Island Piston PTV | ~2059 nm (mean) | Max−min step across the 4 islands (E[R_4] = 2.059 * sigma_raw); peaks reach ~1800–2200 nm |
| Local Island Tip & Tilt RMS | 353.6 nm each (12.5% + 12.5%) | Unit-RMS local x/y slopes centered on each island centroid |
| Temporal Correlation (Matern-3/2) | tau = 3.0 s (f_c = 0.053 Hz) | Smooth C1 evolution with -40 dB/dec PSD rolloff above f_c = 1 / (2 pi tau); no white-noise jitter |
5. CLI Override Flags & Source Implementation Simulation
Override any component when running ./scripts/run-ao3k-scexao.sh. Any non-default choice is recorded in run_options.json and automatically surfaced as a parameter diff on the generated simulation report:
Runner Flag (run-ao3k-scexao.sh) | Default | Effect |
|---|---|---|
--seeing <arcsec> | 0.8 | Atmospheric seeing FWHM at 0.50 um reference wavelength [arcsec] |
--no-wind-var | OFF | Disable smooth wind speed & direction meandering (default: ON) |
--wind-var-scale <float> | 1.0 | Amplitude multiplier for smooth wind speed & direction meandering |
--no-wind-burst | OFF | Disable stochastic atmospheric wind bursts & Cn2 surges (default: ON) |
--wind-burst-scale <float> | 1.0 | Strength multiplier for non-stationary atmospheric wind bursts |
--no-vib | OFF | Disable stochastic telescope & optical-bench vibrations (default: ON) |
--vib-rms-nm <float> | 45.0 | Total telescope & optical-bench vibration OPD RMS [nm] (14.5..138 Hz) |
--no-petal | OFF | Disable thermally induced slow-varying pupil petaling / LWE (default: ON) |
--petal-rms-nm <float> | 1000.0 | Total thermally induced island petaling (LWE) OPD RMS [nm] |
--petal-tau-s <float> | 3.0 | Correlation timescale [s] for slow thermal petaling evolution |
--no-perturb | OFF | Disable wind meandering, wind bursts, vibrations & thermal petaling |
--wind-switch-sec <sec> | 0 | Physical time [s] to trigger live phase-continuous wind rotation (0=off) |
--wind-switch-deg <deg> | 60.0 | Phase-continuous wind direction rotation angle [deg] at --wind-switch-sec |
- Atmospheric Profile & Seeing Solver:
AtmosphericTurbulenceSimul/src/AtmosphericTurbulence/atmturb_profile.c&atmturb_seeing.c - Non-Stationary Wind Meandering & Gust Bursts:
AtmosphericTurbulenceSimul/src/AtmosphericTurbulence/atmturb_dynwind.c - Vibrations & Thermal Petaling (LWE):
cacaosim/src/common/cacaosim_perturb.c&cacaosim/src/pupil/cacaosim_pupil.c - Bench & Runner Defaults:
cacao-work/benches/ao3k_scexao/sim-ao3k-scexao.milk&ao3k_scexao.bench
Staged Simulations Using This Model SimulationAnalysis
All 2 staged closed-loop simulations reference this baseline model and report any parameter overrides on their Overview, Configuration, and Optical pages (2 exact default, 0 active-perturbation modified, 0 legacy stationary frozen-flow):
| Simulation | Model Status | Seeing / r0 | Changes Relative to Default Model | Realized Telemetry |
|---|---|---|---|---|
ao3k_scexao_2stage_opt_ttm1hz | Matches Default | 0.80" (r0=10.7 cm) | All parameters match default model | Wind max 2.71x · Vib 46.6 nm · Petal 1062 nm |
ao3k_stage1 | Matches Default | 0.80" (r0=10.7 cm) | All parameters match default model | Wind max 2.56x · Vib 47.0 nm · Petal 1253 nm |

