§20 — Spatial analysis on lot-stack data analyzeWaferMap works on lot-aggregated maps — ring, quadrant, sector, and cluster findings on mean test values
For most use cases, the gallery's built-in stacked modes (see lot-findings demo) handle lot-average spatial analysis automatically with no extra code. Use this pattern instead when you need a standalone stacked map outside a gallery, or when you need programmatic access to the findings before rendering — for example to filter, store, or feed them into your own UI.

This example stacks six wafers using buildWaferMap({ lotStack }) with method: 'mean', then runs analyzeWaferMap directly on the aggregated result. The NE-quadrant Vth drift that appears on every wafer produces clear quadrant and sector findings on the lot average. Because Vth has spec limits (limitHigh: 0.57 V), dies where the lot-average Vth exceeds spec are used as the failure proxy for cluster detection — revealing the spatial extent of the out-of-spec zone. The summary panel labels the view as "6 wafers · mean" so it is unambiguous. summary.stats.isLotStack and summary.stats.aggregationMethod are available for the host application to use programmatically.