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:
@@ -70,12 +70,35 @@ def _load_yaml(path: Path) -> dict:
|
||||
return loaded
|
||||
|
||||
|
||||
# TODO P6.3: expose this list to a new LayoutSelector.qml (4-button chooser)
|
||||
# THINKING: this already returns everything the UI needs (family names) —
|
||||
# the missing piece is a context-property exposure (SessionController or a
|
||||
# thin new property) and a setLayout(family) slot that calls load_layout()
|
||||
# below. No parsing work needed; this is a wiring-only task.
|
||||
# See docs/pending/alpha-release-polish-plan.md §6.3.
|
||||
# Edge→center sensor pair tables, ported verbatim from the C# original
|
||||
# (Form1.cs ec_map_*). Indices are 0-origin. Domain data, not derivable from
|
||||
# ring geometry — see docs/adr/0002-edge-center-pair-tables.md.
|
||||
_EC_MAPS: dict[str, tuple[tuple[int, int], ...]] = {
|
||||
"AEP": tuple((e, 40 + e // 2) for e in range(16)),
|
||||
"BCD": tuple((e, 28) for e in range(12)),
|
||||
"F": ((0, 18), (1, 19), (2, 19), (3, 19), (4, 20), (5, 20),
|
||||
(6, 20), (7, 21), (8, 21), (9, 21), (10, 18), (11, 18)),
|
||||
"X": ((5, 76), (0, 76), (39, 76), (6, 77), (11, 77), (16, 77),
|
||||
(17, 78), (22, 78), (27, 78), (28, 79), (33, 79), (38, 79)),
|
||||
"Z": tuple((e, 0) for e in range(49, 65)),
|
||||
}
|
||||
|
||||
|
||||
def ec_pairs_for_wafer_id(wafer_id: str) -> tuple[tuple[int, int], ...]:
|
||||
"""Edge-center pairs for a wafer id's family letter; empty if unknown.
|
||||
|
||||
Unknown families deliberately get no pairs (C# fell through to Z).
|
||||
"""
|
||||
prefix = wafer_id[0].upper() if wafer_id else ""
|
||||
for families, key in (("AEP", "AEP"), ("BCD", "BCD"), ("F", "F"),
|
||||
("X", "X"), ("Z", "Z")):
|
||||
if prefix and prefix in families:
|
||||
return _EC_MAPS[key]
|
||||
return ()
|
||||
|
||||
|
||||
# P6.3 (LayoutSelector) dropped 2026-07-10 — the C# "layout" buttons only
|
||||
# exported coordinate spreadsheets, decided obsolete. See MIGRATION.md.
|
||||
def available_families() -> list[str]:
|
||||
return [_family_name(_load_yaml(p)["name"]) for p in _LAYOUTS_DIR.glob("*.yaml")]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user