Remove dataset replay
This commit is contained in:
@@ -106,7 +106,6 @@ def run_config_from_dict(payload: object) -> RunConfigModel:
|
||||
"run.locator_server",
|
||||
)
|
||||
multi_device_payload = _as_dict(radar_payload.get("multi_device"), "radar.multi_device")
|
||||
replay_payload = _as_dict(radar_payload.get("replay"), "radar.replay")
|
||||
kamil_adc_payload = _as_dict(radar_payload.get("kamil_adc"), "radar.kamil_adc")
|
||||
laser_control_payload = _as_dict(radar_payload.get("laser_control"), "radar.laser_control")
|
||||
|
||||
@@ -163,13 +162,6 @@ def run_config_from_dict(payload: object) -> RunConfigModel:
|
||||
"stimulus_switch_positions",
|
||||
model.radar.multi_device.stimulus_switch_positions,
|
||||
)
|
||||
model.radar.replay.dataset_dir = _read_str(
|
||||
replay_payload, "dataset_dir", model.radar.replay.dataset_dir
|
||||
)
|
||||
model.radar.replay.loop = _read_bool(replay_payload, "loop", model.radar.replay.loop)
|
||||
model.radar.replay.rate_scale = _read_float(
|
||||
replay_payload, "rate_scale", model.radar.replay.rate_scale
|
||||
)
|
||||
model.radar.kamil_adc.project_dir = _read_str(
|
||||
kamil_adc_payload, "project_dir", model.radar.kamil_adc.project_dir
|
||||
)
|
||||
@@ -443,11 +435,6 @@ def run_config_to_dict(model: RunConfigModel) -> dict[str, Any]:
|
||||
"input_switch_positions": model.radar.multi_device.input_switch_positions,
|
||||
"stimulus_switch_positions": model.radar.multi_device.stimulus_switch_positions
|
||||
},
|
||||
"replay": {
|
||||
"dataset_dir": model.radar.replay.dataset_dir,
|
||||
"loop": model.radar.replay.loop,
|
||||
"rate_scale": model.radar.replay.rate_scale,
|
||||
},
|
||||
"kamil_adc": {
|
||||
"project_dir": model.radar.kamil_adc.project_dir,
|
||||
"executable_path": model.radar.kamil_adc.executable_path,
|
||||
|
||||
@@ -55,25 +55,6 @@ class RadarMultiDeviceModel:
|
||||
stimulus_switch_positions: int = 1
|
||||
|
||||
|
||||
@dataclass(slots=True)
|
||||
class RadarReplayModel:
|
||||
"""Recorded-dataset replay settings (no hardware).
|
||||
|
||||
When ``dataset_dir`` is non-empty the supervisor launches
|
||||
``python_app.scripts.replay_raw_producer`` instead of the model's normal
|
||||
acquisition producer. The dataset is a directory of snapshot folders named
|
||||
``NNNN_idK_ns<timestamp>``, each holding ``i{input}_o{output}_s21.npy`` /
|
||||
``_freq.npy`` files (the VNA_AlGo preprocessed-capture layout).
|
||||
"""
|
||||
|
||||
dataset_dir: str = ""
|
||||
# Restart from the first snapshot when the dataset ends; the replay
|
||||
# timeline keeps advancing monotonically across the seam.
|
||||
loop: bool = True
|
||||
# Playback speed multiplier: 1.0 replays at the recorded frame cadence.
|
||||
rate_scale: float = 1.0
|
||||
|
||||
|
||||
@dataclass(slots=True)
|
||||
class KamilAdcPhaseCalibrationModel:
|
||||
"""Affine law mapping the reference signal's unwrapped phase to frequency.
|
||||
@@ -177,7 +158,6 @@ class RadarModel:
|
||||
driver_mode: str = "mock"
|
||||
sweep: RadarSweepModel = field(default_factory=RadarSweepModel)
|
||||
multi_device: RadarMultiDeviceModel = field(default_factory=RadarMultiDeviceModel)
|
||||
replay: RadarReplayModel = field(default_factory=RadarReplayModel)
|
||||
kamil_adc: KamilAdcModel = field(default_factory=KamilAdcModel)
|
||||
laser_control: LaserControlModel = field(default_factory=LaserControlModel)
|
||||
|
||||
|
||||
@@ -124,13 +124,7 @@ def validate_ring_endpoint(ring: RingEndpointModel) -> None:
|
||||
|
||||
|
||||
def validate_acquisition_config(config: RunConfigModel) -> None:
|
||||
"""Reject unusable acquisition settings before starting processes or hardware.
|
||||
|
||||
Replay uses the recorded trace dimensions and needs no physical devices; its
|
||||
producer checks the actual payload size before publishing a frame.
|
||||
"""
|
||||
if config.radar.replay.dataset_dir:
|
||||
return
|
||||
"""Reject unusable acquisition settings before starting processes or hardware."""
|
||||
mode = config.radar.driver_mode
|
||||
if mode not in ("mock", "native"):
|
||||
raise ValueError("radar.driver_mode must be mock or native")
|
||||
|
||||
Reference in New Issue
Block a user