CaltechExperimentalGravity / CaltechExperimentalGravity/system_ident
Stage E: fail fast on a bad Pyy, and add --skip-background (1.7 h before the first injection)
- Dominant language
- Python
- Stars
- 0
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
**Stage E (spec §5).**
### `Pyy` is unguarded and division-critical
[`src/system_ident/loop.py:143`](https://github.com/CaltechExperimentalGravity/system_ident/blob/feat/cds-hardware-backend/src/system_ident/loop.py#L143) measures the quiet readback PSD per DoF and feeds it to
`designer.design(..., Pyy[dof], ...)` → `fisher.dispersion`, which **divides by it**. A dead readback, a
wrong channel name or a disconnected sensor yields zeros → inf/NaN → "SVD did not converge" minutes later,
with nothing pointing at the cause. [`src/system_ident/design/pintelon.py:24`](https://github.com/CaltechExperimentalGravity/system_ident/blob/feat/cds-hardware-backend/src/system_ident/design/pintelon.py#L24) documents that failure
mode for `Pxx`; nothing guards `Pyy`.
The sibling project hit the equivalent on hardware and added a fail-fast when the measured background sits
at the single-precision floor, rather than burning minutes of hardware time first.
**Fix:** check `Pyy` is finite, strictly positive and above a floor, and raise with an actionable message
**before the first injection**.
### The quiet measurement is unconditional and serial
[`src/system_ident/loop.py:143`](https://github.com/CaltechExperimentalGravity/system_ident/blob/feat/cds-hardware-backend/src/system_ident/loop.py#L143) runs one `read()` per DoF, always, with no way to skip and no way to
reuse a previously measured floor. At physics-sized resolution (`T ≈ 256 s`, `n_segments = 8`) that is
**3 × 2048 s ≈ 1.7 hours of hardware time before anything is injected.** The sibling project added
`--skip-background` for exactly this and it saved one full measurement duration per run.
**Fix:** add `--skip-background` and a `measurement.Pyy_from_file` path. (The read cache in the companion
issue independently collapses the three serial reads into one buffer.)
---
**Campaign:** CDS hardware backend · branch [`feat/cds-hardware-backend`](https://github.com/CaltechExperimentalGravity/system_ident/tree/feat/cds-hardware-backend)
· [spec](https://github.com/CaltechExperimentalGravity/system_ident/blob/feat/cds-hardware-backend/docs/superpowers/specs/2026-08-03-cds-hardware-backend-design.md) · [plan](https://github.com/CaltechExperimentalGravity/system_ident/blob/feat/cds-hardware-backend/docs/superpowers/plans/2026-08-03-cds-hardware-backend.md) · [handoff](https://github.com/CaltechExperimentalGravity/system_ident/blob/feat/cds-hardware-backend/notes/cds-hardware-bringup-2026-08.md)
*Code is deferred until the plan and issues have been reviewed.*
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with src/system_ident/loop.py around line 143 and read the Pxx failure-mode notes in src/system_ident/design/pintelon.py. Trace the existing background-measurement and command-line paths, then verify that invalid Pyy fails before injection and that --skip-background uses measurement.Pyy_from_file; tests should cover both paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, cli, embedded-iot
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100