调整 Autocal 标定记录格式与目录命名

将人工参考载荷按档位区间保存,重排帧字段并明确界面操作。已通过相关测试、代码和文档检查。
This commit is contained in:
ykcheungab
2026-10-11 16:21:49 +08:00
parent dc7e290489
commit 69c1322616
9 changed files with 233 additions and 46 deletions
+14 -1
View File
@@ -92,6 +92,19 @@ def test_directory_layout_and_headers(root):
assert tuple(next(csv.reader(handle))) == header, name
def test_frame_columns_are_grouped_by_identity_time_video_and_status(root):
directory, report = _record(root, [3], config=RecordConfig(video=False))
assert report.ok
with (directory / "frames.csv").open(encoding="utf-8", newline="") as handle:
reader = csv.reader(handle)
assert tuple(next(reader)) == (
"frame_id", "source_frame_id", "t_rel_s", "t_host_mono_ns",
"t_host_utc_ns", "acquired_at", "time_basis", "media_time_ms",
"segment", "segment_frame", "in_video", "dropped", "capture_dropped",
)
assert len(next(reader)) == len(FRAMES_HEADER)
def test_unavailable_values_are_empty_not_zero(root):
recorder = ExperimentRecorder(RecordConfig(video=False))
directory = recorder.start(root=root, session_id=1, metadata={}, calibration_id="cal-1")
@@ -180,7 +193,7 @@ def test_queue_overflow_is_counted_and_alarmed(root):
# A queue that holds one item, with a writer we deliberately stall.
recorder = ExperimentRecorder(RecordConfig(video=True, max_queue=16))
recorder.set_alarm_handler(alarms.append)
directory = recorder.start(root=root, session_id=1, metadata={})
recorder.start(root=root, session_id=1, metadata={})
# Push far more than the queue can hold without letting the writer catch up.
for index in range(4000):