重构 Autocal 采集页:单一队列与控制器驱动的主按钮
选点、对准、加载与录像分散在两个面板,状态靠隐藏相位判断。现改由不依赖 Qt 的采集控制器驱动,并加入录像选项、汇总平铺副本、保持到时自动结束、会话结束回到空闲,以及无设备时的模拟采集。已运行 Autocal 非 Qt 测试并通过范围内门禁;界面测试待 Windows 复核,未做实机验收。
This commit is contained in:
@@ -263,3 +263,45 @@ def test_an_axis_without_samples_is_unavailable_without_blocking_the_others(tmp_
|
||||
assert by_axis["FY"]["R2"] is None
|
||||
assert by_axis["FY"]["slope_raw_per_N"] == pytest.approx(0.0)
|
||||
assert summary["windows"][0]["axis_samples"]["FX"] == 0
|
||||
|
||||
|
||||
#: The block a session recorded without video writes (interfaces.md 2.2).
|
||||
VIDEO_OFF = {"video": False, "codec": "mp4v", "lossless_frames": False}
|
||||
|
||||
|
||||
def test_a_session_recorded_without_video_is_still_eligible(tmp_path):
|
||||
"""The operator chose data only: the force rows are the evidence, not a video."""
|
||||
root = multipoint_session(
|
||||
tmp_path / "rec", sites=("P1",), repeats=1, levels=_levels(),
|
||||
video=False, recording_block=VIDEO_OFF, capture_status="complete",
|
||||
)
|
||||
|
||||
summary = build_summary(root)
|
||||
|
||||
assert summary["windows"]
|
||||
assert all(row["capture_status"] == "complete" for row in summary["windows"])
|
||||
assert all(row["eligible"] for row in summary["windows"])
|
||||
assert all(row["FN_mean"] is not None for row in summary["windows"])
|
||||
assert summary["sensitivity"]
|
||||
assert summary["missing_reasons"] == []
|
||||
|
||||
|
||||
def test_a_session_without_a_recording_block_still_expects_video(tmp_path):
|
||||
"""Old sessions have no block, so the video stays required exactly as before."""
|
||||
root = multipoint_session(
|
||||
tmp_path / "rec", sites=("P1",), repeats=1, levels=_levels(),
|
||||
video=False, # data rows only, and no block saying that was intended
|
||||
)
|
||||
|
||||
from orisys_autocal.recording_options import RecordingOptions
|
||||
from orisys_autocal.session_review import review_session
|
||||
|
||||
review = review_session(root)
|
||||
assert review["recording"] == RecordingOptions().as_block()
|
||||
assert RecordingOptions.from_block(review.get("recording")).video is True
|
||||
|
||||
summary = build_summary(root)
|
||||
assert all(row["eligible"] is False for row in summary["windows"])
|
||||
assert all(row["excluded_reason"] == REASON_NO_FRAME_SOURCE
|
||||
for row in summary["windows"])
|
||||
assert REASON_NO_FRAME_SOURCE in summary["missing_reasons"]
|
||||
|
||||
Reference in New Issue
Block a user