feat(map): add min/max highlighting toggle and live safeguards
- Add "Highlight Min/Max" option to ReadoutPanel showing peak rings. - Reset to review mode and blank wafer map when switching away from map tab. - Disable hover highlights and sensor dialog triggers during live stream. - Lower trendPane height and add top margin headroom for tick labels. - Add test coverage for blanking states, toggle overrides, and interactions.
This commit is contained in:
@@ -161,6 +161,36 @@ def test_export_image_highlights_hottest_and_coldest(tmp_path):
|
||||
assert "#5b9df5" in found # coldest ring (sensorLow)
|
||||
|
||||
|
||||
def test_show_extremes_toggle_gates_peak_rings(tmp_path):
|
||||
"""showExtremes (Display setting) hides the hot/cold rings when off.
|
||||
Same pixel probe as the highlight test: with rings off, no high/low
|
||||
colored pixels should appear anywhere."""
|
||||
from PySide6.QtGui import QImage
|
||||
|
||||
from pygui.backend.visualization.wafer_map_item import WaferMapItem
|
||||
|
||||
item = WaferMapItem()
|
||||
assert item.showExtremes is True # rings on by default
|
||||
|
||||
item.setWidth(200)
|
||||
item.setHeight(200)
|
||||
item.sensors = [
|
||||
{"label": "1", "x": -50.0, "y": 0.0},
|
||||
{"label": "2", "x": 0.0, "y": 0.0},
|
||||
{"label": "3", "x": 50.0, "y": 0.0},
|
||||
]
|
||||
item.values = [10.0, 20.0, 30.0]
|
||||
item.showExtremes = False
|
||||
out = tmp_path / "wafer.png"
|
||||
assert item.export_image(str(out)) is True
|
||||
|
||||
img = QImage(str(out))
|
||||
found = {img.pixelColor(x, y).name()
|
||||
for y in range(img.height()) for x in range(img.width())}
|
||||
assert "#ef4444" not in found
|
||||
assert "#5b9df5" not in found
|
||||
|
||||
|
||||
def test_readout_text_full_stats():
|
||||
"""Export footer readout carries every READOUT stat with sensor indices.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user