some webUI fixes
This commit is contained in:
@@ -7,11 +7,27 @@ import time
|
||||
|
||||
from PyQt6.QtWidgets import QFileDialog
|
||||
from python_app.gui.runtime.history import record_result_history, remove_last_aligned_histories
|
||||
from python_app.storage.npz.paths import radar_config_filename_prefix
|
||||
|
||||
|
||||
class AppWindowSnapshotMixin:
|
||||
"""Saves runtime data snapshots and maintains ring-reader freshness."""
|
||||
|
||||
def _radar_config_name_prefix(self) -> str:
|
||||
"""Filename prefix encoding the current radar setup (model, sweep span, points, power).
|
||||
|
||||
Prepended to every saved dataset name so the file records the configuration it was
|
||||
captured with — identical for desktop and web saves, which share these handlers.
|
||||
"""
|
||||
radar = self._build_config().radar
|
||||
return radar_config_filename_prefix(
|
||||
radar.model,
|
||||
radar.sweep.start_hz,
|
||||
radar.sweep.stop_hz,
|
||||
radar.sweep.points,
|
||||
radar.sweep.power_dbm,
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def _snapshot_config_profile_path(snapshot_dir: Path) -> Path:
|
||||
"""Return companion config-profile path inside a saved snapshot directory."""
|
||||
@@ -41,6 +57,7 @@ class AppWindowSnapshotMixin:
|
||||
list(self._pre_history),
|
||||
list(self._result_history),
|
||||
last_n,
|
||||
name_prefix=self._radar_config_name_prefix(),
|
||||
)
|
||||
config_profile_path = self._snapshot_config_profile_path(snapshot_dir)
|
||||
try:
|
||||
@@ -94,6 +111,7 @@ class AppWindowSnapshotMixin:
|
||||
last_n,
|
||||
channel=channel,
|
||||
primary_stage="preprocessed",
|
||||
name_prefix=self._radar_config_name_prefix(),
|
||||
)
|
||||
output_stem = str(summary.get("output_stem", "")).strip()
|
||||
if not output_stem:
|
||||
|
||||
Reference in New Issue
Block a user