SSM-Clock—Deployment, APIs & Privacy (6.7–6.9)

6.7 Deployment: batch, stream, embedded

Batch recognition.

phi_obs.csv  ->  ssm_clock_runner.py  ->  tau_hat_days, confidence

Streaming recognition.

obs_stream.csv (pairs) + dt_days  ->  ssm_clock_stream_v2.py  ->  tau_days per tick

Latency & memory (rules of thumb).

Memory     ~ O( #channels * S )               # manifest ~ O(1 KB)
N_grid     =  T_search / step_d
Coarse CPU ~ O( S * #channels * N_grid )

  • Speed-ups: raise K before shrinking grid_step_min; use coarse_stride=4 for large T_search; stack S conservatively (5–7).

Embedded notes.

  • Port the one-line kernel and a Brent 1-D minimizer to C; keep double precision.
  • Wrap once (inside angdiff). Avoid trig inside tight loops where possible.

6.8 Minimal API contracts

Single-shot API (function).

inputs:
  manifest: channels [{label, period_days, b0_deg, w_deg_per_day}]
  phases:   dict label->phi_deg for one snapshot (or S snapshots if stacking)
  knobs:    grid_step_min, stack, stack_dt_days, multistart_k
outputs:
  tau_hat_days: float
  confidence:   float in [0,1)
  residuals:    dict label->err_deg at tau_hat   # optional

Streaming API (tick).

inputs:
  manifest, dt_days, phases_row
outputs:
  tau_days                 # printed per tick
  conf, residuals          # optional

Error reporting (always modulo horizon).

err_days = min( |tau_hat - tau_true| , T_search - |tau_hat - tau_true| )


6.9 Guardrails and privacy

  • No wall-time dependency. Keep it strictly phase-in -> tau_hat-out.
  • Confidence gates. Use conf thresholds for actions; log low-conf episodes.
  • ASCII artifacts. Log only CSV/JSON/TXT; version manifests; checksums optional.
  • Local compute. Prefer on-device inference; share only derived features if needed (e.g., [sin, cos, confidence]).

Navigation

Back: SSM-Clock—Media, Robotics & JTK Interop (6.4–6.6)
Next: SSM-Clock—Determinism, Audit & Provenance (7.1–7.3)