"""Shared constants for the golden .sras fixtures. These mirror the values tests/gen_goldens.py used when the fixtures were generated against the pre-refactor code (commit d185676); they must never change, or the byte-identical comparisons stop meaning anything. """ SPF = 8 SAMPLE_RATE = 6.25e9 CHANNELS = [1, 3, 4] PREAMBLES = [f"WFMOUTPRE:CH{ch};SYNTHETIC;PT_FMT Y;XINCR 1.6E-10" for ch in CHANNELS] BACKGROUND = bytes(range(SPF)) # build_plan inputs for the fixture geometry: 2 angles × 3 rows × 4 frames TINY_PLAN_ARGS = dict(x_start=1.0, y_start=1.0, x_delta=0.02, y_delta=0.02, num_angles=2, row_spacing=0.01) LASER_FREQ_HZ = 20000.0 VELOCITY_MM_S = 100.0 def synthetic_frame(ai, ri, ci, fi): return bytes((ai * 7 + ri * 5 + ci * 3 + fi + s) % 256 for s in range(SPF))