Add object calibration
This commit is contained in:
@@ -5,6 +5,7 @@ from __future__ import annotations
|
||||
from PyQt6.QtCore import QTimer
|
||||
|
||||
from python_app.gui.preprocess_dialog import PreprocessDialog
|
||||
from python_app.gui.controllers.object_calibration_controller import ObjectCalibrationController
|
||||
from python_app.gui.trace_png_export import export_trace_png
|
||||
from python_app.orchestration.preprocess_assets import (
|
||||
PREPROCESS_ASSET_SPECS,
|
||||
@@ -124,6 +125,9 @@ class AppWindowPreprocessMixin:
|
||||
"""Capture, save, and select a temporary S21 reference with current sweep settings."""
|
||||
if getattr(self, "_closing", False) or getattr(self, "_stopping_run", False):
|
||||
return
|
||||
if getattr(self, "_object_capture_job", None) is not None:
|
||||
self._show_error("Wait for object-calibration capture to finish")
|
||||
return
|
||||
if self._capture_session is not None:
|
||||
self._show_error(
|
||||
"Cannot capture tmp reference during active capture sequence",
|
||||
@@ -227,6 +231,9 @@ class AppWindowPreprocessMixin:
|
||||
dialog.finalize_sequence_requested.connect(self._finalize_capture_sequence)
|
||||
dialog.abort_sequence_requested.connect(self._abort_capture_sequence)
|
||||
dialog.create_neutral_sets_requested.connect(self._create_neutral_sets)
|
||||
self._object_calibration_controller = ObjectCalibrationController(self)
|
||||
dialog.import_object_calibration_requested.connect(self._object_calibration_controller.import_calibration)
|
||||
dialog.create_object_calibration_requested.connect(self._object_calibration_controller.open_creation)
|
||||
dialog.set_neutral_sets_visible(supports_neutral_preprocess_sets(self._defaults_config))
|
||||
dialog.set_radar_config_summary(
|
||||
directory_path=self._preprocess_radar_scan_summary.directory_path,
|
||||
@@ -340,6 +347,9 @@ class AppWindowPreprocessMixin:
|
||||
"""Start sequential capture session for requested preprocess asset."""
|
||||
if getattr(self, "_closing", False) or getattr(self, "_stopping_run", False):
|
||||
return
|
||||
if getattr(self, "_object_capture_job", None) is not None:
|
||||
self._show_error("Wait for object-calibration capture to finish")
|
||||
return
|
||||
if self._capture_session is not None:
|
||||
self._show_error("Another capture sequence is already active", details=self._capture_state_details())
|
||||
return
|
||||
@@ -410,6 +420,9 @@ class AppWindowPreprocessMixin:
|
||||
"""Save neutral S21 calibration/reference sets for the current radar settings."""
|
||||
if getattr(self, "_closing", False) or getattr(self, "_stopping_run", False):
|
||||
return
|
||||
if getattr(self, "_object_capture_job", None) is not None:
|
||||
self._show_error("Wait for object-calibration capture to finish")
|
||||
return
|
||||
if self._capture_session is not None:
|
||||
self._show_error(
|
||||
"Cannot create neutral sets during active capture sequence",
|
||||
|
||||
Reference in New Issue
Block a user