From e9a0b43ed3fc191214b51176bb66a779b739a700 Mon Sep 17 00:00:00 2001 From: awe Date: Fri, 25 Sep 2026 14:52:20 +0300 Subject: [PATCH] revert gpr heatmap threshold, keep it for sar3d only The display threshold from 'add treshhold' (e113ef6) was meant for the sar3d projections; the GPR heatmap goes back to full-range levels and the constant moves into sar3d_plot_mixin. Co-Authored-By: Claude Fable 5 --- .../gui/controllers/app_window_plot/gpr_plot_mixin.py | 10 +--------- .../controllers/app_window_plot/sar3d_plot_mixin.py | 9 ++++++--- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/python_app/gui/controllers/app_window_plot/gpr_plot_mixin.py b/python_app/gui/controllers/app_window_plot/gpr_plot_mixin.py index 94b87f7..6947feb 100644 --- a/python_app/gui/controllers/app_window_plot/gpr_plot_mixin.py +++ b/python_app/gui/controllers/app_window_plot/gpr_plot_mixin.py @@ -14,12 +14,6 @@ from python_app.orchestration.gpr_locator import ( gpr_object_rows as extract_gpr_object_rows, ) -# Fraction of the frame maximum below which the heatmap is not highlighted -# (same as cloud-threshold=0.75 in the VNA_AlGo 3D SAR animation): the color -# scale is stretched over [frac*max, max], everything below falls into the -# darkest LUT color. -HEATMAP_DISPLAY_THRESHOLD_FRAC = 0.75 - class AppWindowGprPlotMixin: """Renders GPR accumulator heatmaps and detected object overlays.""" @@ -250,9 +244,7 @@ class AppWindowGprPlotMixin: self._gpr_image_item.setImage(image, autoLevels=False) self._gpr_image_item.setRect(rect) self._gpr_image_item.setLookupTable(self._gpr_lookup_table) - image_max = float(np.max(image)) - self._gpr_image_item.setLevels( - (HEATMAP_DISPLAY_THRESHOLD_FRAC * image_max, image_max + 1e-6)) + self._gpr_image_item.setLevels((float(np.min(image)), float(np.max(image) + 1e-6))) self._gpr_image_item.show() visible_x_min, visible_x_max, visible_z_min, visible_z_max = self._gpr_visible_bounds() diff --git a/python_app/gui/controllers/app_window_plot/sar3d_plot_mixin.py b/python_app/gui/controllers/app_window_plot/sar3d_plot_mixin.py index 80d93f9..4710124 100644 --- a/python_app/gui/controllers/app_window_plot/sar3d_plot_mixin.py +++ b/python_app/gui/controllers/app_window_plot/sar3d_plot_mixin.py @@ -21,12 +21,15 @@ from PyQt6.QtCore import QRectF import numpy as np import pyqtgraph as pg -from python_app.gui.controllers.app_window_plot.gpr_plot_mixin import ( - HEATMAP_DISPLAY_THRESHOLD_FRAC, -) from python_app.gui.runtime.sar3d_views import sar3d_bottom_view_deg_from_label from python_app.models.dataset_model import ResultCollection +# Fraction of the projection maximum below which the heatmap is not highlighted +# (same as cloud-threshold=0.75 in the VNA_AlGo 3D SAR animation): the color +# scale is stretched over [frac, 1], everything below falls into the darkest +# LUT color. +HEATMAP_DISPLAY_THRESHOLD_FRAC = 0.75 + class AppWindowSar3dPlotMixin: """Renders 3D SAR volume projections published by the sar3d processor."""