working version
This commit is contained in:
@@ -180,6 +180,12 @@ def gui_profile_from_dict(payload: dict[str, Any]) -> GuiProfileModel:
|
||||
gui.processing.pass_through.show_phase,
|
||||
"gui.processing.pass_through",
|
||||
),
|
||||
combo_filter=_optional_string(
|
||||
pass_through_object,
|
||||
"combo_filter",
|
||||
gui.processing.pass_through.combo_filter,
|
||||
"gui.processing.pass_through",
|
||||
),
|
||||
fixed_y_enabled=_optional_bool(
|
||||
pass_through_object,
|
||||
"fixed_y_enabled",
|
||||
@@ -313,6 +319,12 @@ def gui_profile_from_dict(payload: dict[str, Any]) -> GuiProfileModel:
|
||||
gui.processing.gpr.remove_sidelobe_objects_enabled,
|
||||
"gui.processing.gpr",
|
||||
),
|
||||
imaging_plane_y_m=_optional_float(
|
||||
gpr_object,
|
||||
"imaging_plane_y_m",
|
||||
gui.processing.gpr.imaging_plane_y_m,
|
||||
"gui.processing.gpr",
|
||||
),
|
||||
render_mode=_optional_string(
|
||||
gpr_object,
|
||||
"render_mode",
|
||||
@@ -482,6 +494,7 @@ def gui_profile_to_dict(model: GuiProfileModel) -> dict[str, Any]:
|
||||
"pass_through": {
|
||||
"show_magnitude": gui.processing.pass_through.show_magnitude,
|
||||
"show_phase": gui.processing.pass_through.show_phase,
|
||||
"combo_filter": gui.processing.pass_through.combo_filter,
|
||||
"fixed_y_enabled": gui.processing.pass_through.fixed_y_enabled,
|
||||
"y_min_db": gui.processing.pass_through.y_min_db,
|
||||
"y_max_db": gui.processing.pass_through.y_max_db,
|
||||
@@ -510,6 +523,7 @@ def gui_profile_to_dict(model: GuiProfileModel) -> dict[str, Any]:
|
||||
"background_subtract_enabled": gui.processing.gpr.background_subtract_enabled,
|
||||
"background_mean_count": gui.processing.gpr.background_mean_count,
|
||||
"remove_sidelobe_objects_enabled": gui.processing.gpr.remove_sidelobe_objects_enabled,
|
||||
"imaging_plane_y_m": gui.processing.gpr.imaging_plane_y_m,
|
||||
"render_mode": gui.processing.gpr.render_mode,
|
||||
"min_visible_score": gui.processing.gpr.min_visible_score,
|
||||
"visible_x_min_m": gui.processing.gpr.visible_x_min_m,
|
||||
|
||||
@@ -27,6 +27,7 @@ class GuiPassThroughStateModel:
|
||||
|
||||
show_magnitude: bool = True
|
||||
show_phase: bool = True
|
||||
combo_filter: str = ""
|
||||
fixed_y_enabled: bool = False
|
||||
y_min_db: float = -100.0
|
||||
y_max_db: float = 0.0
|
||||
@@ -63,6 +64,7 @@ class GuiGprStateModel:
|
||||
background_subtract_enabled: bool = True
|
||||
background_mean_count: int = 10
|
||||
remove_sidelobe_objects_enabled: bool = True
|
||||
imaging_plane_y_m: float = 0.0
|
||||
render_mode: str = "heatmap"
|
||||
min_visible_score: float = 0.0
|
||||
visible_x_min_m: float = -2.0
|
||||
|
||||
@@ -327,6 +327,8 @@ def run_config_from_dict(payload: dict[str, Any]) -> RunConfigModel:
|
||||
GprTxGeometryModel(
|
||||
output_pos=int(entry_payload.get("output_pos", 0)),
|
||||
x_m=float(entry_payload.get("x_m", 0.0)),
|
||||
y_m=float(entry_payload.get("y_m", 0.0)),
|
||||
z_m=float(entry_payload.get("z_m", 0.0)),
|
||||
)
|
||||
)
|
||||
model.gpr.rx_geometry = []
|
||||
@@ -338,6 +340,8 @@ def run_config_from_dict(payload: dict[str, Any]) -> RunConfigModel:
|
||||
GprRxGeometryModel(
|
||||
input_pos=int(entry_payload.get("input_pos", 0)),
|
||||
x_m=float(entry_payload.get("x_m", 0.0)),
|
||||
y_m=float(entry_payload.get("y_m", 0.0)),
|
||||
z_m=float(entry_payload.get("z_m", 0.0)),
|
||||
)
|
||||
)
|
||||
model.apply_device_model_constraints()
|
||||
@@ -519,6 +523,8 @@ def run_config_to_dict(model: RunConfigModel) -> dict[str, Any]:
|
||||
{
|
||||
"output_pos": entry.output_pos,
|
||||
"x_m": entry.x_m,
|
||||
"y_m": entry.y_m,
|
||||
"z_m": entry.z_m,
|
||||
}
|
||||
for entry in model.gpr.tx_geometry
|
||||
],
|
||||
@@ -526,6 +532,8 @@ def run_config_to_dict(model: RunConfigModel) -> dict[str, Any]:
|
||||
{
|
||||
"input_pos": entry.input_pos,
|
||||
"x_m": entry.x_m,
|
||||
"y_m": entry.y_m,
|
||||
"z_m": entry.z_m,
|
||||
}
|
||||
for entry in model.gpr.rx_geometry
|
||||
],
|
||||
|
||||
@@ -223,10 +223,15 @@ class PreprocessModel:
|
||||
|
||||
@dataclass(slots=True)
|
||||
class GprTxGeometryModel:
|
||||
"""One transmitter geometry record keyed by output switch position."""
|
||||
"""One transmitter geometry record keyed by output switch position.
|
||||
|
||||
y_m / z_m default to 0 so 1D antenna layouts keep their pre-3D semantics.
|
||||
"""
|
||||
|
||||
output_pos: int = 0
|
||||
x_m: float = 0.0
|
||||
y_m: float = 0.0
|
||||
z_m: float = 0.0
|
||||
|
||||
|
||||
@dataclass(slots=True)
|
||||
@@ -235,6 +240,8 @@ class GprRxGeometryModel:
|
||||
|
||||
input_pos: int = 0
|
||||
x_m: float = 0.0
|
||||
y_m: float = 0.0
|
||||
z_m: float = 0.0
|
||||
|
||||
|
||||
@dataclass(slots=True)
|
||||
|
||||
Reference in New Issue
Block a user