blissoda.demo.tests.itest_stop_scan_xrpd_id31.test_freeze_mode_smoke#

blissoda.demo.tests.itest_stop_scan_xrpd_id31.test_freeze_mode_smoke()[source]#

Smoke-test attenuation_mode='freeze': the preset classifies using the canned frame-0 metric, runs its setup phase, and leaves the scan in a consistent state.

NOTE: the demo detector difflab6 does not respond to atten.bits, so the safe-frame loop will not converge on this detector. This test therefore only asserts: - the event dispatch wires the frame-0 metric through to classification; - _apply_filter is called at least once during setup (unless the

initial frame happens to satisfy the boundary condition);

  • the scan runs to completion without error.

Reading the live log of this test you will see the predicted-optimal jump step the attenuator by exactly +2 bits every iteration (0 → 2 → 4 → …). That stride is a demo artefact, not a behaviour signature: this test pins ghost_threshold = baseline_imax × 0.5 so a move is guaranteed, the SiO2 transmission table drops by ≈ factor 2 per bit, and difflab6 keeps returning the same imax regardless of atten — so the helper applies its “strictly less than threshold” rule against a perceived count rate that quadruples each iteration. On a real detector the actual imax would drop with attenuation and the loop would converge after the first jump+verify.