SSM-Clock—Runner & Streaming Inverse (2.3–2.4)

2.3 Single-shot inverse (runner)

One snapshot of observed phases -> tau_hat_days + confidence

python ssm_clock_runner.py --manifest "clock_manifest.json" --obs "clock_obs.csv" \
  --grid_step_min 2.0 --refine brent

Input CSV (pairs)

label,phi,label,phi,label,phi,label,phi
day,120.0,week,40.0,lunar,275.0,solar,15.0

Input CSV (wide)

day,week,lunar,solar
120.0,40.0,275.0,15.0

Output (console)

tau_hat_days=...  confidence=...

Notes

  • angdiff-only residuals. All channel errors use the shortest signed angular difference.
  • Horizon rule: T_search = LCM(periods) if all integer, else max(periods).
  • Deterministic run: no randomness or network calls; errors reported modulo T_search.
  • Pairs vs wide: pairs tolerate label order and missing labels; wide is faster but must align with the manifest channel order.

2.4 Streaming inverse (phase ticks)

Each new row advances tau by dt_days and prints tau_hat

python ssm_clock_stream_v2.py --manifest "clock_manifest.json" \
  --obs_stream "clock_obs_stream.csv" --dt_days 0.0416667 \
  --grid_step_min 2.0 --refine brent

obs_stream (pairs) example

label,phi,label,phi,label,phi,label,phi
day,120,week,40,lunar,275,solar,15
day,135,week,52,lunar,287,solar,18

Operational guidance

  • Tick cadence: --dt_days sets the assumed step (e.g., 1/24 day = 1 hour).
  • Confidence per tick: print the curvature-based value; low confidence flags flat bowls or ambiguous snapshots.
  • Shifts: at tick s, shift model phases only by w_i * (s * dt_days); observed phases are read as-is.
  • ASCII-only logs: keep per-tick outputs under notes/ for audit.

Navigation

Back: SSM-Clock—Reference Implementation & CLI (2.1–2.2)
Next: SSM-Clock—Acceptance & Longbench (2.5–2.6)