feat(map): add edge-center delta stats, thickness overlay, and layout fix

- Add edge-center sensor pair tables and delta calculations per wafer family.
- Parse and interpolate wafer thickness CSV data for offscreen visualization.
- Refactor ReadoutPanel layout using Item + anchors to fix right-margin clipping.
- Compact E-C Delta text format to fit standard sidebar width.
- Add pytest suite covering delta calculations, layout pairs, and thickness CSV.
This commit is contained in:
jack
2026-07-10 17:32:12 -07:00
parent 25fa7507ce
commit 94f917b116
12 changed files with 518 additions and 63 deletions
+29 -1
View File
@@ -1,7 +1,11 @@
"""Tests for src/pygui/backend/wafer_layouts.py."""
import pytest
from pygui.backend.wafer.wafer_layouts import available_families, load_layout
from pygui.backend.wafer.wafer_layouts import (
available_families,
ec_pairs_for_wafer_id,
load_layout,
)
from pygui.backend.wafer.zwafer_models import Sensor
@@ -20,3 +24,27 @@ def test_loads_sensors_in_mm():
def test_unknown_family_raises():
with pytest.raises(KeyError):
load_layout("nope")
# ---- edge-center pair tables (ADR-0002) ----
def test_ec_pairs_aep_match_csharp_table():
pairs = ec_pairs_for_wafer_id("A00123")
assert pairs[0] == (0, 40)
assert pairs[-1] == (15, 47)
assert len(pairs) == 16
assert ec_pairs_for_wafer_id("E1") == pairs
assert ec_pairs_for_wafer_id("P1") == pairs
def test_ec_pairs_per_family_classes():
assert len(ec_pairs_for_wafer_id("B00108")) == 12
assert ec_pairs_for_wafer_id("C1") == ec_pairs_for_wafer_id("D1")
assert ec_pairs_for_wafer_id("F1")[0] == (0, 18)
assert ec_pairs_for_wafer_id("X1")[0] == (5, 76)
assert ec_pairs_for_wafer_id("Z1")[0] == (49, 0)
def test_ec_pairs_unknown_family_empty():
assert ec_pairs_for_wafer_id("Q999") == ()
assert ec_pairs_for_wafer_id("") == ()