Update GPR and SAR3D processing
This commit is contained in:
@@ -17,8 +17,7 @@ from python_app.models.run_config_schema import RunConfigModel
|
||||
from python_app.models.setting_fields import active_live_fields
|
||||
from python_app.orchestration.live_processing_config import ProcessingLiveConfig, ProcessingLiveConfigWriter
|
||||
|
||||
_GPR_MODES = {"gpr", "legacy_gpr"}
|
||||
_GEOMETRY_MODES = _GPR_MODES | {"sar3d"}
|
||||
_GEOMETRY_MODES = {"gpr", "sar3d"}
|
||||
|
||||
|
||||
class LiveSettingsController:
|
||||
@@ -84,7 +83,7 @@ class LiveSettingsController:
|
||||
def commit() -> None:
|
||||
self.validate_mode(self._mode.currentText())
|
||||
live_fields = {binding.spec.web for binding in active_live_fields(self._mode.currentText())}
|
||||
if settings.keys() & (live_fields | {"tx_geometry", "rx_geometry", "relative_permittivity"}):
|
||||
if settings.keys() & (live_fields | {"tx_geometry", "rx_geometry"}):
|
||||
self.publish()
|
||||
|
||||
self.config.apply_web_fields(settings, commit)
|
||||
@@ -171,12 +170,12 @@ class LiveSettingsController:
|
||||
self._log.show_exception("Failed to update plot display settings", exc)
|
||||
|
||||
def locator_changed(self, *_args: object) -> None:
|
||||
if self._mode.currentText() in _GPR_MODES and self._publish_changes():
|
||||
if self._mode.currentText() == "gpr" and self._publish_changes():
|
||||
self.visual_changed()
|
||||
|
||||
def set_mode_page(self, mode: str) -> None:
|
||||
pages = self._processing.pages
|
||||
pages.setCurrentIndex({"pass_through": 0, "bscan": 1, "gpr": 2, "legacy_gpr": 3, "sar3d": 4}.get(mode, 0))
|
||||
pages.setCurrentIndex({"pass_through": 0, "bscan": 1, "gpr": 2, "sar3d": 3}.get(mode, 0))
|
||||
self._processing.geometry_page.setVisible(mode in _GEOMETRY_MODES)
|
||||
page = pages.currentWidget()
|
||||
if page is not None:
|
||||
|
||||
Reference in New Issue
Block a user