added GPR
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
Layout is intentionally split into two independent plot surfaces:
|
||||
- single `PlotWidget` for B-scan heatmap rendering;
|
||||
- single `PlotWidget` for GPR accumulator/annotation rendering;
|
||||
- stacked magnitude/phase `PlotWidget`s for pass-through traces.
|
||||
|
||||
`_set_plot_mode()` switches between these surfaces via `QStackedWidget`.
|
||||
@@ -26,6 +27,7 @@ import pyqtgraph as pg
|
||||
|
||||
from python_app.gui.controllers.sections import (
|
||||
build_data_actions_group,
|
||||
build_gpr_config_group,
|
||||
build_hardware_actions_group,
|
||||
build_pipeline_group,
|
||||
build_preprocess_summary_group,
|
||||
@@ -72,6 +74,7 @@ class AppWindowUiMixin:
|
||||
# We create both upfront and only switch active page at runtime.
|
||||
self._plot_stack = QStackedWidget(root)
|
||||
self._build_bscan_plot_page()
|
||||
self._build_gpr_plot_page()
|
||||
self._build_trace_plot_page()
|
||||
|
||||
# Default view on startup is pass-through traces.
|
||||
@@ -121,6 +124,12 @@ class AppWindowUiMixin:
|
||||
|
||||
self._plot_stack.addWidget(self._trace_plots_container)
|
||||
|
||||
def _build_gpr_plot_page(self) -> None:
|
||||
"""Create GPR page in plot stack."""
|
||||
self._gpr_plot = pg.PlotWidget(background="#0f141c")
|
||||
self._gpr_plot.showGrid(x=True, y=True, alpha=0.2)
|
||||
self._plot_stack.addWidget(self._gpr_plot)
|
||||
|
||||
def _build_settings_toggle(self, root_layout: QHBoxLayout) -> None:
|
||||
"""Create narrow button used to collapse or show settings panel."""
|
||||
self._settings_toggle_button = QPushButton("<")
|
||||
@@ -182,6 +191,7 @@ class AppWindowUiMixin:
|
||||
build_data_actions_group(self),
|
||||
build_preprocess_summary_group(self),
|
||||
build_processing_group(self),
|
||||
build_gpr_config_group(self),
|
||||
build_radar_group(self),
|
||||
build_switch_group(self),
|
||||
]
|
||||
@@ -205,12 +215,16 @@ class AppWindowUiMixin:
|
||||
def _set_plot_mode(self, mode: str) -> None:
|
||||
"""Switch visible plot page according to processing mode.
|
||||
|
||||
`bscan` -> show `self._bscan_plot` (single heatmap surface)
|
||||
otherwise -> show `self._trace_plots_container` (magnitude + phase)
|
||||
`bscan` -> show `self._bscan_plot`
|
||||
`gpr` -> show `self._gpr_plot`
|
||||
otherwise -> show `self._trace_plots_container`
|
||||
"""
|
||||
if mode == "bscan":
|
||||
self._plot_stack.setCurrentWidget(self._bscan_plot)
|
||||
return
|
||||
if mode == "gpr":
|
||||
self._plot_stack.setCurrentWidget(self._gpr_plot)
|
||||
return
|
||||
self._plot_stack.setCurrentWidget(self._trace_plots_container)
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user