sar3d: python plumbing for the new parameters and real replay timing
- replay_raw_producer carries the RECORDED per-trace capture windows from each snapshot's meta.json (re-anchored by the same shift as the frame time) instead of one synthetic window for all traces — without this the segmented timing model degenerates in replay; - GUI/profile/orchestration swap the removed window knobs (center_depth, half_width_*, grid_n*) for the notebook parameters (ground depth, pitch override, voxel pitch, Y range, X margin, norm edge margin, smooth sigma, comp power, tx per segment). Headless replay smoke on the 20260922_mine_fast_true dataset passes: 51 sar3d result collections, transparent preprocessor. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -533,39 +533,84 @@ def gui_profile_from_dict(payload: dict[str, Any]) -> GuiProfileModel:
|
||||
gui.processing.sar3d.edge_frame_weight,
|
||||
"gui.processing.sar3d",
|
||||
),
|
||||
pitch_override_enabled=_optional_bool(
|
||||
sar3d_object,
|
||||
"pitch_override_enabled",
|
||||
gui.processing.sar3d.pitch_override_enabled,
|
||||
"gui.processing.sar3d",
|
||||
),
|
||||
pitch_deg=_optional_float(
|
||||
sar3d_object,
|
||||
"pitch_deg",
|
||||
gui.processing.sar3d.pitch_deg,
|
||||
"gui.processing.sar3d",
|
||||
),
|
||||
center_depth_m=_optional_float(
|
||||
ground_depth_m=_optional_float(
|
||||
sar3d_object,
|
||||
"center_depth_m",
|
||||
gui.processing.sar3d.center_depth_m,
|
||||
"ground_depth_m",
|
||||
gui.processing.sar3d.ground_depth_m,
|
||||
"gui.processing.sar3d",
|
||||
),
|
||||
half_width_x_m=_optional_float(
|
||||
x_margin_m=_optional_float(
|
||||
sar3d_object,
|
||||
"half_width_x_m",
|
||||
gui.processing.sar3d.half_width_x_m,
|
||||
"x_margin_m",
|
||||
gui.processing.sar3d.x_margin_m,
|
||||
"gui.processing.sar3d",
|
||||
),
|
||||
half_width_y_m=_optional_float(
|
||||
y_min_m=_optional_float(
|
||||
sar3d_object,
|
||||
"half_width_y_m",
|
||||
gui.processing.sar3d.half_width_y_m,
|
||||
"y_min_m",
|
||||
gui.processing.sar3d.y_min_m,
|
||||
"gui.processing.sar3d",
|
||||
),
|
||||
half_width_z_m=_optional_float(
|
||||
y_max_m=_optional_float(
|
||||
sar3d_object,
|
||||
"half_width_z_m",
|
||||
gui.processing.sar3d.half_width_z_m,
|
||||
"y_max_m",
|
||||
gui.processing.sar3d.y_max_m,
|
||||
"gui.processing.sar3d",
|
||||
),
|
||||
voxel_x_m=_optional_float(
|
||||
sar3d_object,
|
||||
"voxel_x_m",
|
||||
gui.processing.sar3d.voxel_x_m,
|
||||
"gui.processing.sar3d",
|
||||
),
|
||||
voxel_y_m=_optional_float(
|
||||
sar3d_object,
|
||||
"voxel_y_m",
|
||||
gui.processing.sar3d.voxel_y_m,
|
||||
"gui.processing.sar3d",
|
||||
),
|
||||
voxel_z_m=_optional_float(
|
||||
sar3d_object,
|
||||
"voxel_z_m",
|
||||
gui.processing.sar3d.voxel_z_m,
|
||||
"gui.processing.sar3d",
|
||||
),
|
||||
norm_edge_margin_m=_optional_float(
|
||||
sar3d_object,
|
||||
"norm_edge_margin_m",
|
||||
gui.processing.sar3d.norm_edge_margin_m,
|
||||
"gui.processing.sar3d",
|
||||
),
|
||||
smooth_sigma=_optional_float(
|
||||
sar3d_object,
|
||||
"smooth_sigma",
|
||||
gui.processing.sar3d.smooth_sigma,
|
||||
"gui.processing.sar3d",
|
||||
),
|
||||
comp_range_power=_optional_float(
|
||||
sar3d_object,
|
||||
"comp_range_power",
|
||||
gui.processing.sar3d.comp_range_power,
|
||||
"gui.processing.sar3d",
|
||||
),
|
||||
tx_per_segment=_optional_int(
|
||||
sar3d_object,
|
||||
"tx_per_segment",
|
||||
gui.processing.sar3d.tx_per_segment,
|
||||
"gui.processing.sar3d",
|
||||
),
|
||||
grid_nx=_optional_int(sar3d_object, "grid_nx", gui.processing.sar3d.grid_nx, "gui.processing.sar3d"),
|
||||
grid_ny=_optional_int(sar3d_object, "grid_ny", gui.processing.sar3d.grid_ny, "gui.processing.sar3d"),
|
||||
grid_nz=_optional_int(sar3d_object, "grid_nz", gui.processing.sar3d.grid_nz, "gui.processing.sar3d"),
|
||||
use_compensation=_optional_bool(
|
||||
sar3d_object,
|
||||
"use_compensation",
|
||||
@@ -628,8 +673,14 @@ def gui_profile_from_dict(payload: dict[str, Any]) -> GuiProfileModel:
|
||||
raise ValueError("gui.processing.sar3d.frame_radius must be >= 0")
|
||||
if not 0.0 <= gui.processing.sar3d.edge_frame_weight <= 1.0:
|
||||
raise ValueError("gui.processing.sar3d.edge_frame_weight must be within [0, 1]")
|
||||
if min(gui.processing.sar3d.grid_nx, gui.processing.sar3d.grid_ny, gui.processing.sar3d.grid_nz) < 2:
|
||||
raise ValueError("gui.processing.sar3d.grid_nx/ny/nz must each be >= 2")
|
||||
if min(gui.processing.sar3d.voxel_x_m, gui.processing.sar3d.voxel_y_m, gui.processing.sar3d.voxel_z_m) <= 0.0:
|
||||
raise ValueError("gui.processing.sar3d.voxel_x/y/z_m must each be > 0")
|
||||
if gui.processing.sar3d.y_max_m <= gui.processing.sar3d.y_min_m:
|
||||
raise ValueError("gui.processing.sar3d.y_max_m must be > y_min_m")
|
||||
if gui.processing.sar3d.ground_depth_m < 0.0:
|
||||
raise ValueError("gui.processing.sar3d.ground_depth_m must be >= 0")
|
||||
if gui.processing.sar3d.tx_per_segment < 1:
|
||||
raise ValueError("gui.processing.sar3d.tx_per_segment must be >= 1")
|
||||
|
||||
data_actions_object = _as_dict(gui_object.get("data_actions"), "gui.data_actions")
|
||||
gui.data_actions = GuiDataActionsStateModel(
|
||||
@@ -795,14 +846,19 @@ def gui_profile_to_dict(model: GuiProfileModel) -> dict[str, Any]:
|
||||
"apply_freq_phase_correction": gui.processing.sar3d.apply_freq_phase_correction,
|
||||
"frame_radius": gui.processing.sar3d.frame_radius,
|
||||
"edge_frame_weight": gui.processing.sar3d.edge_frame_weight,
|
||||
"pitch_override_enabled": gui.processing.sar3d.pitch_override_enabled,
|
||||
"pitch_deg": gui.processing.sar3d.pitch_deg,
|
||||
"center_depth_m": gui.processing.sar3d.center_depth_m,
|
||||
"half_width_x_m": gui.processing.sar3d.half_width_x_m,
|
||||
"half_width_y_m": gui.processing.sar3d.half_width_y_m,
|
||||
"half_width_z_m": gui.processing.sar3d.half_width_z_m,
|
||||
"grid_nx": gui.processing.sar3d.grid_nx,
|
||||
"grid_ny": gui.processing.sar3d.grid_ny,
|
||||
"grid_nz": gui.processing.sar3d.grid_nz,
|
||||
"ground_depth_m": gui.processing.sar3d.ground_depth_m,
|
||||
"x_margin_m": gui.processing.sar3d.x_margin_m,
|
||||
"y_min_m": gui.processing.sar3d.y_min_m,
|
||||
"y_max_m": gui.processing.sar3d.y_max_m,
|
||||
"voxel_x_m": gui.processing.sar3d.voxel_x_m,
|
||||
"voxel_y_m": gui.processing.sar3d.voxel_y_m,
|
||||
"voxel_z_m": gui.processing.sar3d.voxel_z_m,
|
||||
"norm_edge_margin_m": gui.processing.sar3d.norm_edge_margin_m,
|
||||
"smooth_sigma": gui.processing.sar3d.smooth_sigma,
|
||||
"comp_range_power": gui.processing.sar3d.comp_range_power,
|
||||
"tx_per_segment": gui.processing.sar3d.tx_per_segment,
|
||||
"use_compensation": gui.processing.sar3d.use_compensation,
|
||||
"normalize_pairs": gui.processing.sar3d.normalize_pairs,
|
||||
"bottom_view_deg": gui.processing.sar3d.bottom_view_deg,
|
||||
|
||||
@@ -128,31 +128,36 @@ class GuiSar3dStateModel:
|
||||
"""UI-only defaults for the 3D SAR (sar3d) live settings.
|
||||
|
||||
The band, depth gate, antenna selection and motion knobs mirror the shared
|
||||
gpr_* live-config fields; the sar3d_* knobs mirror the VNA_AlGo gpr_core
|
||||
defaults used by the C++ sar3d processor.
|
||||
gpr_* live-config fields; the sar3d_* knobs mirror the reference notebook
|
||||
(Multi_antenna_3D_clean_v1.ipynb) defaults used by the C++ sar3d processor.
|
||||
"""
|
||||
|
||||
input_positions: str = ""
|
||||
output_positions: str = ""
|
||||
min_depth_m: float = 2.0
|
||||
max_depth_m: float = 14.0
|
||||
start_freq_mhz: float = 3000.0
|
||||
min_depth_m: float = 2.5
|
||||
max_depth_m: float = 8.0
|
||||
start_freq_mhz: float = 2000.0
|
||||
stop_freq_mhz: float = 6000.0
|
||||
speed_m_s: float = 0.0
|
||||
ignore_socket_speed_enabled: bool = False
|
||||
look_angle_deg: float = 0.0
|
||||
look_angle_deg: float = 17.5
|
||||
direction_sign: float = 1.0
|
||||
apply_freq_phase_correction: bool = True
|
||||
frame_radius: int = 6
|
||||
edge_frame_weight: float = 0.75
|
||||
pitch_deg: float = 6.0
|
||||
center_depth_m: float = 5.6
|
||||
half_width_x_m: float = 1.8
|
||||
half_width_y_m: float = 1.0
|
||||
half_width_z_m: float = 1.8
|
||||
grid_nx: int = 150
|
||||
grid_ny: int = 120
|
||||
grid_nz: int = 160
|
||||
frame_radius: int = 0
|
||||
edge_frame_weight: float = 0.8
|
||||
pitch_override_enabled: bool = False
|
||||
pitch_deg: float = 17.5
|
||||
ground_depth_m: float = 1.25
|
||||
x_margin_m: float = 2.0
|
||||
y_min_m: float = -0.5
|
||||
y_max_m: float = 2.0
|
||||
voxel_x_m: float = 0.025
|
||||
voxel_y_m: float = 0.02
|
||||
voxel_z_m: float = 0.02
|
||||
norm_edge_margin_m: float = 0.3
|
||||
smooth_sigma: float = 1.5
|
||||
comp_range_power: float = 0.3
|
||||
tx_per_segment: int = 2
|
||||
use_compensation: bool = True
|
||||
normalize_pairs: bool = True
|
||||
# Bottom-view projection angle around the vertical Y axis, degrees:
|
||||
|
||||
Reference in New Issue
Block a user