@wafertools/wafermap 0.40.0 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +20 -21
- package/CHANGELOG.md +154 -0
- package/README.md +6 -6
- package/dist/packages/canvas-adapter/canvasTheme.d.ts +12 -0
- package/dist/packages/canvas-adapter/canvasTheme.js +1 -1
- package/dist/packages/canvas-adapter/cellShade.d.ts +2 -2
- package/dist/packages/canvas-adapter/cellShade.js +1 -1
- package/dist/packages/canvas-adapter/chartPopulation.d.ts +3 -0
- package/dist/packages/canvas-adapter/chartPopulation.js +1 -1
- package/dist/packages/canvas-adapter/charts/capability.d.ts +3 -0
- package/dist/packages/canvas-adapter/charts/capability.js +1 -1
- package/dist/packages/canvas-adapter/charts/cardAbout.d.ts +2 -1
- package/dist/packages/canvas-adapter/charts/cardAbout.js +1 -1
- package/dist/packages/canvas-adapter/charts/chartShell.d.ts +47 -27
- package/dist/packages/canvas-adapter/charts/chartShell.js +1 -1
- package/dist/packages/canvas-adapter/charts/commonality.js +4 -4
- package/dist/packages/canvas-adapter/charts/correlation.d.ts +6 -12
- package/dist/packages/canvas-adapter/charts/correlation.js +1 -1
- package/dist/packages/canvas-adapter/charts/divergingScale.d.ts +45 -15
- package/dist/packages/canvas-adapter/charts/divergingScale.js +1 -1
- package/dist/packages/canvas-adapter/charts/groupComparison.js +1 -1
- package/dist/packages/canvas-adapter/charts/palette.d.ts +16 -30
- package/dist/packages/canvas-adapter/charts/palette.js +1 -1
- package/dist/packages/canvas-adapter/charts/patCard.js +1 -1
- package/dist/packages/canvas-adapter/charts/plotChart.d.ts +29 -3
- package/dist/packages/canvas-adapter/charts/plotChart.js +1 -1
- package/dist/packages/canvas-adapter/charts/regionYieldDiagram.d.ts +3 -0
- package/dist/packages/canvas-adapter/charts/regionYieldDiagram.js +1 -1
- package/dist/packages/canvas-adapter/charts/sweep.d.ts +3 -0
- package/dist/packages/canvas-adapter/charts/sweep.js +1 -1
- package/dist/packages/canvas-adapter/chromeRow.d.ts +68 -0
- package/dist/packages/canvas-adapter/chromeRow.js +1 -0
- package/dist/packages/canvas-adapter/chunked.d.ts +6 -0
- package/dist/packages/canvas-adapter/chunked.js +1 -1
- package/dist/packages/canvas-adapter/columnFilterPopup.d.ts +25 -0
- package/dist/packages/canvas-adapter/columnFilterPopup.js +1 -0
- package/dist/packages/canvas-adapter/composePng.d.ts +37 -0
- package/dist/packages/canvas-adapter/composePng.js +1 -0
- package/dist/packages/canvas-adapter/dataTab.d.ts +39 -6
- package/dist/packages/canvas-adapter/dataTab.js +1 -1
- package/dist/packages/canvas-adapter/dieList.js +1 -1
- package/dist/packages/canvas-adapter/differenceMapPanel.d.ts +3 -1
- package/dist/packages/canvas-adapter/differenceMapPanel.js +1 -1
- package/dist/packages/canvas-adapter/drilldown.d.ts +20 -1
- package/dist/packages/canvas-adapter/drilldown.js +1 -1
- package/dist/packages/canvas-adapter/filterButton.d.ts +2 -0
- package/dist/packages/canvas-adapter/filterButton.js +1 -1
- package/dist/packages/canvas-adapter/filterEditor.d.ts +5 -0
- package/dist/packages/canvas-adapter/filterEditor.js +1 -1
- package/dist/packages/canvas-adapter/guideWindow.js +1 -1
- package/dist/packages/canvas-adapter/icons.js +1 -1
- package/dist/packages/canvas-adapter/identityHeader.d.ts +5 -0
- package/dist/packages/canvas-adapter/identityHeader.js +1 -1
- package/dist/packages/canvas-adapter/index.d.ts +7 -0
- package/dist/packages/canvas-adapter/index.js +1 -1
- package/dist/packages/canvas-adapter/insightsTab.d.ts +32 -9
- package/dist/packages/canvas-adapter/insightsTab.js +1 -1
- package/dist/packages/canvas-adapter/maplessSummary.d.ts +4 -2
- package/dist/packages/canvas-adapter/maplessSummary.js +1 -1
- package/dist/packages/canvas-adapter/openWaferMode.d.ts +7 -0
- package/dist/packages/canvas-adapter/openWaferMode.js +1 -0
- package/dist/packages/canvas-adapter/panelChart.d.ts +7 -0
- package/dist/packages/canvas-adapter/panelChart.js +1 -0
- package/dist/packages/canvas-adapter/panelTable.d.ts +50 -0
- package/dist/packages/canvas-adapter/panelTable.js +1 -0
- package/dist/packages/canvas-adapter/plotCard.js +1 -1
- package/dist/packages/canvas-adapter/plotEditor.d.ts +12 -0
- package/dist/packages/canvas-adapter/plotEditor.js +10 -10
- package/dist/packages/canvas-adapter/plotItems.d.ts +9 -4
- package/dist/packages/canvas-adapter/plotItems.js +1 -1
- package/dist/packages/canvas-adapter/plotJsonComplete.js +1 -1
- package/dist/packages/canvas-adapter/plotModal.d.ts +7 -0
- package/dist/packages/canvas-adapter/plotModal.js +1 -1
- package/dist/packages/canvas-adapter/plotStore.js +1 -1
- package/dist/packages/canvas-adapter/plotTab.d.ts +60 -2
- package/dist/packages/canvas-adapter/plotTab.js +1 -1
- package/dist/packages/canvas-adapter/renderWaferGallery.d.ts +7 -0
- package/dist/packages/canvas-adapter/renderWaferGallery.js +1 -1
- package/dist/packages/canvas-adapter/renderWaferMap.d.ts +41 -9
- package/dist/packages/canvas-adapter/renderWaferMap.js +1 -1
- package/dist/packages/canvas-adapter/reportCharts.d.ts +41 -0
- package/dist/packages/canvas-adapter/reportCharts.js +1 -0
- package/dist/packages/canvas-adapter/reportExport.d.ts +91 -0
- package/dist/packages/canvas-adapter/reportExport.js +1 -0
- package/dist/packages/canvas-adapter/reportFigures.d.ts +29 -0
- package/dist/packages/canvas-adapter/reportFigures.js +1 -0
- package/dist/packages/canvas-adapter/reportRun.d.ts +9 -0
- package/dist/packages/canvas-adapter/reportRun.js +1 -0
- package/dist/packages/canvas-adapter/selectionOverlay.d.ts +12 -0
- package/dist/packages/canvas-adapter/selectionOverlay.js +1 -0
- package/dist/packages/canvas-adapter/summaryPanel.d.ts +152 -111
- package/dist/packages/canvas-adapter/summaryPanel.js +7 -4
- package/dist/packages/canvas-adapter/summaryToggle.js +1 -1
- package/dist/packages/canvas-adapter/tableDrilldown.d.ts +48 -0
- package/dist/packages/canvas-adapter/tableDrilldown.js +1 -0
- package/dist/packages/canvas-adapter/tableFilter.d.ts +42 -0
- package/dist/packages/canvas-adapter/tableFilter.js +1 -0
- package/dist/packages/canvas-adapter/tablePlots.d.ts +85 -0
- package/dist/packages/canvas-adapter/tablePlots.js +1 -0
- package/dist/packages/canvas-adapter/themeWatch.d.ts +7 -0
- package/dist/packages/canvas-adapter/themeWatch.js +1 -0
- package/dist/packages/canvas-adapter/toCanvas.d.ts +3 -0
- package/dist/packages/canvas-adapter/toCanvas.js +1 -1
- package/dist/packages/canvas-adapter/toolbar.d.ts +125 -36
- package/dist/packages/canvas-adapter/toolbar.js +2 -2
- package/dist/packages/canvas-adapter/userGuideHtml.d.ts +1 -1
- package/dist/packages/canvas-adapter/userGuideHtml.js +530 -414
- package/dist/packages/canvas-adapter/version.d.ts +2 -2
- package/dist/packages/canvas-adapter/version.js +1 -1
- package/dist/packages/canvas-adapter/viewSwitch.js +1 -1
- package/dist/packages/canvas-adapter/virtualTable.d.ts +37 -7
- package/dist/packages/canvas-adapter/virtualTable.js +1 -1
- package/dist/packages/core/aggregates.d.ts +14 -0
- package/dist/packages/core/aggregates.js +1 -1
- package/dist/packages/core/dies.d.ts +7 -0
- package/dist/packages/core/dies.js +1 -1
- package/dist/packages/core/utils.d.ts +2 -0
- package/dist/packages/core/utils.js +1 -1
- package/dist/packages/experimental/charts.d.ts +4 -0
- package/dist/packages/experimental/charts.js +1 -0
- package/dist/packages/renderer/binColors.d.ts +6 -2
- package/dist/packages/renderer/binColors.js +1 -1
- package/dist/packages/renderer/buildView.d.ts +36 -14
- package/dist/packages/renderer/buildView.js +1 -1
- package/dist/packages/renderer/buildWaferMap.d.ts +8 -0
- package/dist/packages/renderer/buildWaferMap.js +1 -1
- package/dist/packages/renderer/categoryColors.d.ts +3 -0
- package/dist/packages/renderer/categoryColors.js +1 -0
- package/dist/packages/renderer/colorMap.d.ts +15 -16
- package/dist/packages/renderer/colorMap.js +1 -1
- package/dist/packages/renderer/colorSchemes.d.ts +34 -30
- package/dist/packages/renderer/colorSchemes.js +1 -1
- package/dist/packages/renderer/dataColors.d.ts +126 -0
- package/dist/packages/renderer/dataColors.js +1 -0
- package/dist/packages/renderer/deprecate.js +1 -1
- package/dist/packages/renderer/fmt.d.ts +16 -0
- package/dist/packages/renderer/fmt.js +1 -1
- package/dist/packages/renderer/index.d.ts +2 -0
- package/dist/packages/renderer/index.js +1 -1
- package/dist/packages/renderer/spec.d.ts +5 -0
- package/dist/packages/renderer/spec.js +1 -1
- package/dist/packages/renderer/stacks.d.ts +21 -0
- package/dist/packages/renderer/stacks.js +1 -0
- package/dist/packages/renderer/timeAxis.d.ts +19 -0
- package/dist/packages/renderer/timeAxis.js +1 -0
- package/dist/packages/stats/analyzeWaferLot.js +1 -1
- package/dist/packages/stats/analyzeWaferMap.d.ts +2 -4
- package/dist/packages/stats/analyzeWaferMap.js +1 -1
- package/dist/packages/stats/binRows.js +1 -1
- package/dist/packages/stats/binShifts.d.ts +59 -0
- package/dist/packages/stats/binShifts.js +1 -0
- package/dist/packages/stats/capability.d.ts +6 -1
- package/dist/packages/stats/capability.js +1 -1
- package/dist/packages/stats/chartCatalogue.d.ts +3 -0
- package/dist/packages/stats/chartCatalogue.js +1 -1
- package/dist/packages/stats/clusterDetection.js +1 -1
- package/dist/packages/stats/columnPlot.d.ts +38 -0
- package/dist/packages/stats/columnPlot.js +1 -0
- package/dist/packages/stats/commonality.d.ts +8 -1
- package/dist/packages/stats/commonality.js +1 -1
- package/dist/packages/stats/correlation.d.ts +7 -2
- package/dist/packages/stats/correlation.js +1 -1
- package/dist/packages/stats/dataTable.d.ts +44 -0
- package/dist/packages/stats/dataTable.js +1 -0
- package/dist/packages/stats/dieRegions.js +1 -1
- package/dist/packages/stats/examplePicks.js +1 -1
- package/dist/packages/stats/facets.d.ts +11 -0
- package/dist/packages/stats/facets.js +1 -1
- package/dist/packages/stats/filterFindings.d.ts +21 -0
- package/dist/packages/stats/filterFindings.js +1 -1
- package/dist/packages/stats/groupEffects.d.ts +8 -0
- package/dist/packages/stats/groupEffects.js +1 -1
- package/dist/packages/stats/math.d.ts +2 -0
- package/dist/packages/stats/math.js +1 -1
- package/dist/packages/stats/overview.d.ts +114 -0
- package/dist/packages/stats/overview.js +1 -0
- package/dist/packages/stats/pat.d.ts +0 -2
- package/dist/packages/stats/pat.js +1 -1
- package/dist/packages/stats/patternClassification.d.ts +20 -3
- package/dist/packages/stats/patternClassification.js +1 -1
- package/dist/packages/stats/permutationNull.d.ts +16 -0
- package/dist/packages/stats/permutationNull.js +1 -0
- package/dist/packages/stats/plotData.d.ts +138 -12
- package/dist/packages/stats/plotData.js +1 -1
- package/dist/packages/stats/plotSpec.d.ts +10 -1
- package/dist/packages/stats/plotSpec.js +3 -3
- package/dist/packages/stats/plotTable.js +1 -1
- package/dist/packages/stats/plotWords.d.ts +52 -0
- package/dist/packages/stats/plotWords.js +1 -0
- package/dist/packages/stats/presentation.d.ts +63 -14
- package/dist/packages/stats/presentation.js +1 -1
- package/dist/packages/stats/presentationPresets.d.ts +35 -0
- package/dist/packages/stats/presentationPresets.js +1 -0
- package/dist/packages/stats/presentationSections.d.ts +83 -0
- package/dist/packages/stats/presentationSections.js +1 -0
- package/dist/packages/stats/renderSummaryReport.d.ts +80 -2
- package/dist/packages/stats/renderSummaryReport.js +1 -67
- package/dist/packages/stats/reportBlocks.d.ts +249 -0
- package/dist/packages/stats/reportBlocks.js +1 -0
- package/dist/packages/stats/reportContents.d.ts +22 -0
- package/dist/packages/stats/reportContents.js +1 -0
- package/dist/packages/stats/reportDeck.d.ts +245 -0
- package/dist/packages/stats/reportDeck.js +212 -0
- package/dist/packages/stats/reportHtml.d.ts +44 -43
- package/dist/packages/stats/reportHtml.js +82 -46
- package/dist/packages/stats/reportMaps.d.ts +67 -0
- package/dist/packages/stats/reportMaps.js +1 -0
- package/dist/packages/stats/reportSections.d.ts +55 -0
- package/dist/packages/stats/reportSections.js +1 -0
- package/dist/packages/stats/sweep.d.ts +14 -6
- package/dist/packages/stats/sweep.js +1 -1
- package/dist/packages/stats/synthesis.d.ts +87 -10
- package/dist/packages/stats/synthesis.js +1 -1
- package/dist/packages/stats/types.d.ts +22 -0
- package/dist/packages/stats/worthItems.d.ts +15 -0
- package/dist/packages/stats/worthItems.js +1 -0
- package/dist/packages/stats/yield.d.ts +13 -0
- package/dist/packages/stats/yield.js +1 -1
- package/llms.txt +1 -1
- package/package.json +6 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{GUIDE_SECTIONS as e}from"./guideSections.js";export const CHART_CATALOGUE=[{id:"bin-map",kind:"map",title:"Bin map",mode:["hardBin","softBin"],example:"display-control.html",about:"Each die coloured by its hard or soft bin, passing bins in greens and failing bins in other colours, to show where the failures are.",see:["test-value-map","bin-pareto"]},{id:"test-value-map",kind:"map",title:"Test value map",mode:["value"],example:"test-values.html",about:"Each die coloured by one test\u2019s value on a colour scale, with the test\u2019s limits on the colour bar, to show where on the wafer the value shifts.",see:["bin-map","limit-passfail-map","test-passfail-map","value-histogram"]},{id:"limit-passfail-map",kind:"map",title:"Limit pass/fail map",example:"test-values.html",about:"Each die coloured by whether its value for one test lies inside the test\u2019s limits, with the dies below the low limit and above the high limit marked apart, to show where a test fails its limits.",see:["test-value-map","test-passfail-map","pass-rate-by-test"]},{id:"test-passfail-map",kind:"map",title:"Test pass/fail map",example:"test-values.html",about:"Each die coloured by the pass or fail the tester recorded for one test, to show where a test failed, whether or not it has a measured value.",see:["limit-passfail-map","test-value-map","pass-rate-by-test"]},{id:"die-attribute-map",kind:"map",title:"Die attribute map",mode:["metadata"],example:"metadata-mode.html",about:"Each die coloured by an attribute the data carries (a test site, a probe step, a zone), to show whether a pattern follows it.",see:["bin-map"]},{id:"stacked-map",kind:"map",title:"Stacked map",mode:["stackedBins","stackedSoftBins","stackedValues"],example:"lot-stack-analysis.html",about:"The wafers of a lot laid over one another die by die: how often a bin occurs, or a value\u2019s mean, median or spread at each position, to show what repeats from wafer to wafer.",see:["difference-map","reticle-cell-yield"]},{id:"pat-verdict-map",kind:"map",title:"PAT verdict map",tab:"overview",about:"Each die coloured by its part average testing verdict (within the limits, an outlier or failing), on the map or on every wafer of a gallery, to show where the PAT outliers sit.",see:["part-average-testing-pat","bin-map","test-value-map"]},{id:"difference-map",kind:"map",title:"Difference map",card:"difference-map",tab:"distributions",about:"One group\u2019s wafer map less another\u2019s, die position by die position, to show where on the wafer they differ.",guide:[e.heatmap],see:["stacked-map","comparison-by-group"]},{id:"yield-by-wafer",kind:"chart",title:"Yield by wafer",cards:["card-yield"],tab:"overview",about:"Yield of each wafer or group: passing dies as a share of judged dies, with partial and edge-excluded dies left out. The line is the median bar.",see:["bin-pareto","what-divides-yield"]},{id:"bin-pareto",kind:"chart",title:"Bin pareto",cards:["card-bin-pareto"],tab:"overview",about:"Dies in each bin, largest first, so the bins that cost the most yield lead. Shown alone, the line is the running share of all dies.",see:["bin-map","pareto"]},{id:"pass-rate-by-test",kind:"chart",title:"Pass rate by test",cards:["card-pass-rate"],tab:"overview",about:"The share of judged dies that pass each test, lowest first, so the tests that fail the most dies lead.",see:["process-capability","bin-pareto"]},{id:"ring-yield",kind:"chart",title:"Ring yield",card:"ring-yield",tab:"overview",about:"Yield of each ring, from the wafer centre to its edge, to show a radial pattern.",see:["ring-yield-by-wafer","quadrant-yield","bin-map"]},{id:"ring-yield-by-wafer",kind:"chart",title:"Ring yield by wafer",cards:["card-ring-wafer"],tab:"overview",about:"Yield of each ring on each wafer (or group), as a colour, to show whether a radial pattern is on every wafer or on one.",guide:[e.heatmap],see:["ring-yield","heatmap"]},{id:"quadrant-yield",kind:"chart",title:"Quadrant yield",card:"quadrant-yield",tab:"overview",about:"Yield of each quarter of the wafer, to show a one-sided pattern.",see:["quadrant-yield-by-wafer","ring-yield","bin-map"]},{id:"quadrant-yield-by-wafer",kind:"chart",title:"Quadrant yield by wafer",cards:["card-quadrant-wafer"],tab:"overview",about:"Yield of each quarter of the wafer on each wafer (or group), as a colour, to show whether a one-sided pattern is on every wafer or on one.",guide:[e.heatmap],see:["quadrant-yield","ring-yield-by-wafer","heatmap"]},{id:"reticle-cell-yield",kind:"chart",title:"Reticle cell yield",card:"reticle-yield",tab:"overview",about:"Yield of each position in the reticle, pooled over every shot on every wafer. A cell low everywhere points at the mask rather than the wafer.",see:["stacked-map","ring-yield"]},{id:"yield-by-site",kind:"chart",title:"Yield by site",cards:["card-site"],tab:"overview",about:"Yield of each test site (probe position): passing dies as a share of judged dies, over every wafer. Shown when the dies come from two sites or more.",see:["yield-by-wafer","reticle-cell-yield"]},{id:"re-probed-dies",kind:"chart",title:"Re-probed dies",cards:["card-reprobed"],tab:"overview",about:"The share of dies that were probed more than once, by ring on each wafer (or group), to show where the retests are. Drawn when the lot has re-probed dies.",guide:[e.heatmap],see:["yield-by-site","ring-yield-by-wafer","heatmap"]},{id:"tests-by-wafer",kind:"chart",title:"Tests by wafer",cards:["card-tests-wafer"],tab:"distributions",about:"The tests whose wafers (or groups) differ most, one row each, as a grid of z-scores: where a wafer is above or below that test\u2019s average.",guide:[e.heatmap],see:["heatmap","test-value-distribution","comparison-by-group"]},{id:"test-value-distribution",kind:"chart",title:"Test value distribution",cards:["card-box"],tab:"distributions",about:"How one test\u2019s values spread on each wafer or group: the box holds the middle half of the dies, the line inside it is the median, and the whiskers reach the lowest and highest values.",see:["box-plot","value-histogram"]},{id:"value-histogram",kind:"chart",title:"Value histogram",cards:["card-histogram"],tab:"distributions",about:"How one test\u2019s values are distributed: the number of dies in each value range, with the test\u2019s limits marked.",see:["histogram","probability-plot","test-value-map"]},{id:"histogram-of-the-dies-picked",kind:"chart",title:"Histogram of the dies picked",cards:["drill-histogram"],tab:"drilldown",about:"How one test\u2019s values are distributed over the dies picked: the number of dies in each value range, with the test\u2019s limits marked.",see:["value-histogram"]},{id:"wafer-to-wafer-trend",kind:"chart",title:"Wafer-to-wafer trend",cards:["card-trend"],tab:"distributions",about:"Each wafer\u2019s mean of one test in wafer order, with a band of one standard deviation either side, to show drift through the lot.",guide:[e.bands],see:["control-chart","line-chart"]},{id:"test-scatter",kind:"chart",title:"Test scatter",cards:["card-scatter"],tab:"correlation",about:"One test against another, a point per die, to show whether the two move together. r is the correlation coefficient and n the number of dies.",guide:[e.fit],see:["test-correlation-matrix","scatter-plot"]},{id:"test-correlation-matrix",kind:"chart",title:"Test correlation matrix",card:"correlation",tab:"correlation",about:"The correlation of every pair of tests. A strong colour means two tests move together; click a cell to show the pair in the scatter.",see:["test-scatter","heatmap"]},{id:"process-capability",kind:"chart",title:"Process capability",card:"capability",tab:"distributions",about:"Every test with limits on one scale, the low limit at 0 and the high limit at 1, sorted lowest Ppk first, so the tests closest to their limits lead.",guide:[e.goal],see:["capability-goal-plot","pass-rate-by-test"]},{id:"comparison-by-group",kind:"table",title:"Comparison by group",card:"comparison",tab:"distributions",about:"Yield and each test compared between groups, counting each wafer once, with how likely a difference this large is by chance.",guide:[e.groups],see:["what-divides-yield","difference-map","box-plot"]},{id:"what-divides-yield",kind:"table",title:"What divides yield",card:"commonality",tab:"overview",about:"The wafer and lot fields ranked by how strongly they divide yield, as places to look for a cause.",guide:[e.dividesYield],see:["comparison-by-group","yield-by-wafer"]},{id:"part-average-testing-pat",kind:"table",title:"Part average testing (PAT)",card:"pat",tab:"overview",about:"Dies outside part average testing limits, set from each wafer\u2019s own spread of each test (the AEC-Q001 method), by wafer and by test.",guide:[e.pat],see:["pat-verdict-map","process-capability","scatter-plot"]},{id:"scatter-plot",kind:"chart",title:"Scatter plot",chart:"scatter",tab:"plots",about:"One field against another, a point per die or per wafer, to show whether they move together.",guide:[e.fit],see:["test-scatter","heatmap"]},{id:"histogram",kind:"chart",title:"Histogram",chart:"histogram",tab:"plots",about:"How a value is distributed: the number of dies or wafers in each value range.",see:["value-histogram","probability-plot","box-plot"]},{id:"box-plot",kind:"chart",title:"Box plot",chart:"box",tab:"plots",about:"How a value spreads in each category: the box holds the middle half, the line inside it is the median, and the whiskers reach the lowest and highest values.",guide:[e.groups],see:["test-value-distribution","nested-categories","probability-plot"]},{id:"bar-chart",kind:"chart",title:"Bar chart",chart:"bar",tab:"plots",about:"A count, a share or a summary value for each category, side by side.",see:["pareto","stacked-bars-and-shares","yield-by-wafer"]},{id:"line-chart",kind:"chart",title:"Line chart",chart:"line",tab:"plots",about:"A summary value in order along the X axis (wafer order, a test, a condition), to show a trend.",guide:[e.bands],see:["control-chart","sweep","wafer-to-wafer-trend"]},{id:"sweep",kind:"chart",title:"Sweep",chart:"sweep",tab:"plots",about:"A measured value against a swept condition, a curve per series, to show how the part responds across the range.",see:["line-chart"]},{id:"probability-plot",kind:"chart",title:"Probability plot",chart:"probability",tab:"plots",about:"The share of values at or below each value, a curve per colour, so whole distributions compare, tails included.",guide:[e.probability],see:["histogram","box-plot"]},{id:"control-chart",kind:"chart",title:"Control chart",chart:"control",tab:"plots",about:"One value per wafer in order against its centre line and control limits, with the points that break a Western Electric rule marked.",guide:[e.control],see:["wafer-to-wafer-trend","line-chart","capability-goal-plot"]},{id:"capability-goal-plot",kind:"chart",title:"Capability goal plot",chart:"goal",tab:"plots",about:"Each test with both limits placed by how far its mean is off centre and how wide its spread is, as shares of its limit window. A test outside the solid triangle is short of Ppk 1.33.",guide:[e.goal],see:["process-capability","control-chart"]},{id:"heatmap",kind:"chart",title:"Heatmap",chart:"heatmap",tab:"plots",about:"A value for every pair of two categories, as a colour, to show where the two interact.",guide:[e.heatmap],see:["test-correlation-matrix","difference-map","bar-chart"]},{id:"pareto",kind:"chart",title:"Pareto",tab:"plots",about:"Categories largest first with a line for their running share, to show which few account for most of the total.",see:["bin-pareto","bar-chart"]},{id:"stacked-bars-and-shares",kind:"chart",title:"Stacked bars and shares",tab:"plots",about:"Each bar split into its colours, as counts or as each colour\u2019s share of its own total, to show what a category is made of.",see:["bar-chart"]},{id:"nested-categories",kind:"chart",title:"Nested categories",tab:"plots",about:"A box or bar with categories inside categories, such as lots with their wafers, to show whether variation sits between or within the groups.",guide:[e.ranges],see:["box-plot","bar-chart"]},{id:"panels-small-multiples",kind:"chart",title:"Panels (small multiples)",tab:"plots",about:"One small chart per value of a field, on shared axes, to compare the same view across groups side by side.",guide:[e.ranges],see:["box-plot","scatter-plot","histogram"]},{id:"statistics-table",kind:"table",title:"Statistics table",tab:"data",about:"One row per test and group: the count, mean, spread, extremes, limits and capability, to read the numbers behind the charts.",see:["dies-table","process-capability"]},{id:"dies-table",kind:"table",title:"Dies table",tab:"data",about:"One row per die with its position, bin and values, to see exactly which dies a chart counts; it exports to CSV.",see:["wafers-table","statistics-table"]},{id:"wafers-table",kind:"table",title:"Wafers table",tab:"data",about:"One row per wafer with its attributes and its yield, to check what each wafer is and to compare them.",see:["dies-table","yield-by-wafer"]}];export function catalogueEntry(t){return CHART_CATALOGUE.find(a=>a.id===t)}
|
|
1
|
+
import{GUIDE_SECTIONS as e}from"./guideSections.js";export const cardKindId=t=>`card-${t}`;export{catalogueCardId}from"./reportSections.js";export const CHART_CATALOGUE=[{id:"bin-map",kind:"map",title:"Bin map",mode:["hardBin","softBin"],example:"display-control.html",about:"Each die coloured by its hard or soft bin, passing bins in greens and failing bins in other colours, to show where the failures are.",see:["test-value-map","bin-pareto"]},{id:"test-value-map",kind:"map",title:"Test value map",mode:["value"],example:"test-values.html",about:"Each die coloured by one test\u2019s value on a colour scale, with the test\u2019s limits on the colour bar, to show where on the wafer the value shifts.",see:["bin-map","limit-passfail-map","test-passfail-map","value-histogram"]},{id:"limit-passfail-map",kind:"map",title:"Limit pass/fail map",example:"test-values.html",about:"Each die coloured by whether its value for one test lies inside the test\u2019s limits, with the dies below the low limit and above the high limit marked apart, to show where a test fails its limits.",see:["test-value-map","test-passfail-map","pass-rate-by-test"]},{id:"test-passfail-map",kind:"map",title:"Test pass/fail map",example:"test-values.html",about:"Each die coloured by the pass or fail the tester recorded for one test, to show where a test failed, whether or not it has a measured value.",see:["limit-passfail-map","test-value-map","pass-rate-by-test"]},{id:"die-attribute-map",kind:"map",title:"Die attribute map",mode:["metadata"],example:"metadata-mode.html",about:"Each die coloured by an attribute the data carries (a test site, a probe step, a zone), to show whether a pattern follows it.",see:["bin-map"]},{id:"stacked-map",kind:"map",title:"Stacked map",mode:["stackedFails","stackedBins","stackedSoftBins","stackedValues"],example:"lot-stack-analysis.html",about:"The wafers of a lot laid over one another die by die: how often a bin occurs, or a value\u2019s mean, median or spread at each position, to show what repeats from wafer to wafer.",see:["difference-map","reticle-cell-yield"]},{id:"pat-verdict-map",kind:"map",title:"PAT verdict map",tab:"overview",about:"Each die coloured by its part average testing verdict (within the limits, an outlier or failing), on the map or on every wafer of a gallery, to show where the PAT outliers sit.",see:["part-average-testing-pat","bin-map","test-value-map"]},{id:"difference-map",kind:"map",title:"Difference map",card:"difference-map",tab:"distributions",about:"One group\u2019s wafer map less another\u2019s, die position by die position, to show where on the wafer they differ.",guide:[e.heatmap],see:["stacked-map","comparison-by-group"]},{id:"yield-by-wafer",kind:"chart",title:"Yield by wafer",cards:["card-yield"],tab:"overview",about:"Yield of each wafer or group: passing dies as a share of tested dies, with partial and edge-excluded dies left out. The line is the median bar.",see:["bin-pareto","what-divides-yield"]},{id:"bin-pareto",kind:"chart",title:"Bin pareto",cards:["card-bin-pareto"],tab:"overview",about:"Dies in each bin, largest first, so the bins that cost the most yield lead. Shown alone, the line is the running share of all dies.",see:["bin-map","pareto"]},{id:"bins-by-wafer",kind:"chart",title:"Bins by wafer",cards:["card-bins-by-wafer"],tab:"overview",about:"Each wafer\u2019s dies as shares of its bins, in the map\u2019s bin colours, so a wafer that loses more, or loses to another bin, stands out.",see:["bin-pareto","yield-by-wafer"]},{id:"pass-rate-by-test",kind:"chart",title:"Pass rate by test",cards:["card-pass-rate"],tab:"overview",about:"The share of tested dies that pass each test, lowest first, so the tests that fail the most dies lead.",see:["process-capability","bin-pareto"]},{id:"ring-yield",kind:"chart",title:"Ring yield",card:"ring-yield",tab:"overview",about:"Yield of each ring, from the wafer centre to its edge, to show a radial pattern.",see:["ring-yield-by-wafer","quadrant-yield","bin-map"]},{id:"ring-yield-by-wafer",kind:"chart",title:"Ring yield by wafer",cards:["card-ring-wafer"],tab:"overview",about:"Yield of each ring on each wafer (or group), as a colour, to show whether a radial pattern is on every wafer or on one.",guide:[e.heatmap],see:["ring-yield","heatmap"]},{id:"quadrant-yield",kind:"chart",title:"Quadrant yield",card:"quadrant-yield",tab:"overview",about:"Yield of each quarter of the wafer, to show a one-sided pattern.",see:["quadrant-yield-by-wafer","ring-yield","bin-map"]},{id:"quadrant-yield-by-wafer",kind:"chart",title:"Quadrant yield by wafer",cards:["card-quadrant-wafer"],tab:"overview",about:"Yield of each quarter of the wafer on each wafer (or group), as a colour, to show whether a one-sided pattern is on every wafer or on one.",guide:[e.heatmap],see:["quadrant-yield","ring-yield-by-wafer","heatmap"]},{id:"reticle-cell-yield",kind:"chart",title:"Reticle cell yield",card:"reticle-yield",tab:"overview",about:"Yield of each position in the reticle, counting every shot on every wafer. A cell low everywhere points at the mask rather than the wafer.",see:["stacked-map","ring-yield"]},{id:"yield-by-site",kind:"chart",title:"Yield by site",cards:["card-site"],tab:"overview",about:"Yield of each test site (probe position): passing dies as a share of tested dies, over every wafer. Shown when the dies come from two sites or more.",see:["yield-by-wafer","reticle-cell-yield"]},{id:"re-probed-dies",kind:"chart",title:"Re-probed dies",cards:["card-reprobed"],tab:"overview",about:"The share of dies that were probed more than once, by ring on each wafer (or group), to show where the retests are. Drawn when the lot has re-probed dies.",guide:[e.heatmap],see:["yield-by-site","ring-yield-by-wafer","heatmap"]},{id:"tests-by-wafer",kind:"chart",title:"Tests by wafer",cards:["card-tests-wafer"],tab:"distributions",about:"The tests whose wafers differ most, one row each, as a grid of z-scores: where a wafer is above or below that test\u2019s average. The wafers of a group sit side by side, by Group by or by the field that divides yield most clearly.",guide:[e.heatmap],see:["heatmap","test-value-distribution","comparison-by-group"]},{id:"test-value-distribution",kind:"chart",title:"Test value distribution",cards:["card-box"],tab:"distributions",about:"How one test\u2019s values spread on each wafer or group: the box holds the middle half of the dies, the line inside it is the median, and the whiskers reach the lowest and highest values.",see:["box-plot","value-histogram"]},{id:"test-value-by-site",kind:"chart",title:"Test value by site",cards:["card-box-site"],tab:"distributions",about:"How one test\u2019s values spread on each test site, over every die the site tested: a site that reads high or low, or wider than the others, shows as a box apart.",see:["test-value-distribution","yield-by-site"]},{id:"probability-plot-of-a-test",kind:"chart",title:"Probability plot of a test",cards:["card-probability"],tab:"distributions",about:"One test\u2019s values against a normal scale, a line per group or site: a straight line is one normal population, a bend or a step is a second population or a tail, and lines apart are groups apart.",guide:[e.probability],see:["probability-plot","value-histogram"]},{id:"value-histogram",kind:"chart",title:"Value histogram",cards:["card-histogram"],tab:"distributions",about:"How one test\u2019s values are distributed: the number of dies in each value range, with the test\u2019s limits marked.",see:["histogram","probability-plot","test-value-map"]},{id:"histogram-of-the-dies-picked",kind:"chart",title:"Histogram of the dies picked",cards:["drill-histogram"],tab:"drilldown",about:"How one test\u2019s values are distributed over the dies picked: the number of dies in each value range, with the test\u2019s limits marked.",see:["value-histogram"]},{id:"test-value-by-wafer-order",kind:"chart",title:"Test value by wafer order",cards:["card-trend"],tab:"distributions",about:"Each wafer\u2019s mean of one test in wafer order, named by wafer, with a band of one standard deviation either side, to show drift through the lot. The wafers are coloured by Group by, or by the field that divides yield most clearly.",guide:[e.bands],see:["control-chart","line-chart"]},{id:"test-scatter",kind:"chart",title:"Test scatter",cards:["card-scatter"],tab:"correlation",about:"One test against another, a point per die, to show whether the two move together. r is the correlation coefficient and n the number of dies.",guide:[e.fit],see:["test-correlation-matrix","scatter-plot"]},{id:"test-correlation-matrix",kind:"chart",title:"Test correlation matrix",card:"correlation",tab:"correlation",about:"The correlation of every pair of tests. A strong colour means two tests move together; click a cell to show the pair in the scatter.",see:["test-scatter","heatmap"]},{id:"process-capability",kind:"chart",title:"Process capability",card:"capability",tab:"distributions",about:"Every test with limits on one scale, the low limit at 0 and the high limit at 1, sorted lowest Ppk first, so the tests closest to their limits lead.",guide:[e.goal],see:["capability-goal-plot","pass-rate-by-test"]},{id:"comparison-by-group",kind:"table",title:"Comparison by group",card:"comparison",tab:"distributions",about:"Yield and each test compared between groups, counting each wafer once, with how likely a difference this large is by chance.",guide:[e.groups],see:["what-divides-yield","difference-map","box-plot"]},{id:"what-divides-yield",kind:"table",title:"What divides yield",card:"commonality",tab:"overview",about:"The wafer and lot fields ranked by how strongly they divide yield, as places to look for a cause.",guide:[e.dividesYield],see:["comparison-by-group","yield-by-wafer"]},{id:"part-average-testing-pat",kind:"table",title:"Part average testing (PAT)",card:"pat",tab:"overview",about:"Dies outside part average testing limits, set from each wafer\u2019s own spread of each test (the AEC-Q001 method), by wafer and by test.",guide:[e.pat],see:["pat-verdict-map","process-capability","scatter-plot"]},{id:"scatter-plot",kind:"chart",title:"Scatter plot",chart:"scatter",tab:"plots",about:"One field against another, a point per die or per wafer, to show whether they move together.",guide:[e.fit],see:["test-scatter","heatmap"]},{id:"histogram",kind:"chart",title:"Histogram",chart:"histogram",tab:"plots",about:"How a value is distributed: the number of dies or wafers in each value range.",see:["value-histogram","probability-plot","box-plot"]},{id:"box-plot",kind:"chart",title:"Box plot",chart:"box",tab:"plots",about:"How a value spreads in each category: the box holds the middle half, the line inside it is the median, and the whiskers reach the lowest and highest values.",guide:[e.groups],see:["test-value-distribution","nested-categories","probability-plot"]},{id:"bar-chart",kind:"chart",title:"Bar chart",chart:"bar",tab:"plots",about:"A count, a share or a summary value for each category, side by side.",see:["pareto","stacked-bars-and-shares","yield-by-wafer"]},{id:"line-chart",kind:"chart",title:"Line chart",chart:"line",tab:"plots",about:"A summary value in order along the X axis (wafer order, a test, a condition), to show a trend.",guide:[e.bands],see:["control-chart","sweep","test-value-by-wafer-order"]},{id:"sweep",kind:"chart",title:"Sweep",chart:"sweep",tab:"plots",about:"A measured value against a swept condition, a curve per series, to show how the part responds across the range.",see:["line-chart"]},{id:"probability-plot",kind:"chart",title:"Probability plot",chart:"probability",tab:"plots",about:"The share of values at or below each value, a curve per colour, so whole distributions compare, tails included.",guide:[e.probability],see:["histogram","box-plot"]},{id:"control-chart",kind:"chart",title:"Control chart",chart:"control",tab:"plots",about:"One value per wafer in order against its centre line and control limits, with the points that break a Western Electric rule marked.",guide:[e.control],see:["test-value-by-wafer-order","line-chart","capability-goal-plot"]},{id:"capability-goal-plot",kind:"chart",title:"Capability goal plot",chart:"goal",tab:"plots",about:"Each test with both limits placed by how far its mean is off centre and how wide its spread is, as shares of its limit window. A test outside the solid triangle is short of Ppk 1.33.",guide:[e.goal],see:["process-capability","control-chart"]},{id:"heatmap",kind:"chart",title:"Heatmap",chart:"heatmap",tab:"plots",about:"A value for every pair of two categories, as a colour, to show where the two interact.",guide:[e.heatmap],see:["test-correlation-matrix","difference-map","bar-chart"]},{id:"pareto",kind:"chart",title:"Pareto",tab:"plots",about:"Categories largest first with a line for their running share, to show which few account for most of the total.",see:["bin-pareto","bar-chart"]},{id:"stacked-bars-and-shares",kind:"chart",title:"Stacked bars and shares",tab:"plots",about:"Each bar split into its colours, as counts or as each colour\u2019s share of its own total, to show what a category is made of.",see:["bar-chart"]},{id:"nested-categories",kind:"chart",title:"Nested categories",tab:"plots",about:"A box or bar with categories inside categories, such as lots with their wafers, to show whether variation sits between or within the groups.",guide:[e.ranges],see:["box-plot","bar-chart"]},{id:"panels-small-multiples",kind:"chart",title:"Panels (small multiples)",tab:"plots",about:"One small chart per value of a field, on shared axes, to compare the same view across groups side by side.",guide:[e.ranges],see:["box-plot","scatter-plot","histogram"]},{id:"statistics-table",kind:"table",title:"Statistics table",tab:"data",about:"One row per test and group: the count, mean, spread, extremes, limits and capability, to read the numbers behind the charts.",see:["dies-table","process-capability"]},{id:"dies-table",kind:"table",title:"Dies table",tab:"data",about:"One row per die with its position, bin and values, to see exactly which dies a chart counts; it exports to CSV.",see:["wafers-table","statistics-table"]},{id:"wafers-table",kind:"table",title:"Wafers table",tab:"data",about:"One row per wafer with its attributes and its yield, to check what each wafer is and to compare them.",see:["dies-table","yield-by-wafer"]}];export function catalogueEntry(t){return CHART_CATALOGUE.find(a=>a.id===t)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{seededRandom as ot}from"./math.js";import{ringOf as at}from"../core/classify.js";import{compassBucket as rt,sectorCompassNames as
|
|
1
|
+
import{seededRandom as ot}from"./math.js";import{ringOf as at}from"../core/classify.js";import{compassBucket as rt,sectorCompassNames as ct}from"./regions.js";import{diePassStatus as G,getDieKey as lt,gridKey as V}from"../core/dies.js";import{findConnectedComponents as ut,LargestComponentSizer as ft}from"./connectedComponents.js";import{median as H}from"../core/utils.js";import{failBand as ht,layoutKey as mt,remember as W}from"./permutationNull.js";function dt(n,i){return ct(16)[rt(n,i,16)]}function gt(n){if(n.length<2)return 0;const i=[...n].sort((s,o)=>s-o);let t=i[0]+2*Math.PI-i[i.length-1];for(let s=1;s<i.length;s++)t=Math.max(t,i[s]-i[s-1]);return 2*Math.PI-t}function pt(n,i,t,s){const o=s!==void 0?Math.abs(s):0;return n<=.01&&(i>=.25||o>=2||t>=.1)?"unusual":n<=.05&&(i>=.15||o>=1||t>=.03)?"notable":"info"}const yt=99,bt=9999,Z=10;class xt{sizer;failCount;maxima=[];random;order;failing;constructor(i,t,s,o){this.sizer=i,this.failCount=s,this.random=ot(o),this.order=new Int32Array(t);for(let h=0;h<t;h++)this.order[h]=h;this.failing=new Uint8Array(t)}at(i){const{order:t,failing:s,failCount:o,random:h}=this,g=t.length;for(;this.maxima.length<=i;){for(let a=0;a<o;a++){const S=a+Math.floor(h()*(g-a)),p=t[a];t[a]=t[S],t[S]=p,s[t[a]]=1}this.maxima.push(this.sizer.largest(s));for(let a=0;a<o;a++)s[t[a]]=0}return this.maxima[i]}pValue(i,t){let s=0;for(let o=0;o<t;o++)if(this.at(o)>=i&&++s===Z)return Z/(o+1);return(1+s)/(1+t)}}const Mt=new Map,$t=new Map;function St(n,i,t,s){const o=n.length,h=Math.min(bt,Math.max(yt,Math.ceil(1/s))),g=mt(n),a=ht(i,o),S=W($t,`${g}:${a}`,16,()=>{const p=W(Mt,g,4,()=>new ft([...n].sort((x,m)=>x.y-m.y||x.x-m.x))),[,P,D]=g.split(":").map(Number);return new xt(p,o,a,(P^Math.imul(D,739982445)^Math.imul(a+1,2246822507))>>>0)});return t.map(p=>S.pValue(p,h))}export function buildClusterFindings(n,i,t){const{passBins:s,significanceLevel:o,minimumEffectSize:h,minimumRelativeEffect:g,minimumSampleSize:a,minimumClusterSize:S,ringCount:p}=t,P=new Set(s);if(t.isFailingDie||(n=n.filter(e=>G(e,P)!==void 0)),n.length<a)return[];const D=t.isFailingDie??(e=>G(e,P)===!1),x=n.filter(D),m=x.length/n.length;if(x.length===0)return[];if(m===1&&h>0&&g>0)return[];const q=Math.max(1,Math.floor(n.length/1001)),R=[],X=[];for(let e=0;e<n.length;e+=q)R.push(n[e].width),X.push(n[e].height);const K=R.length?H(R):10,T=X.length?H(X):10,B=Math.max(K,T)*1.5,Y=new Map;for(const e of n)Y.set(V(e.x,e.y),e);const O=Math.ceil(B/K),U=Math.ceil(B/T),J=ut(x),_=[],w=[],I=i.center.x,A=i.center.y,Q=i.radius;for(const e of J){if(e.length<S)continue;const l=new Set(e.map(f=>V(f.x,f.y)));for(const f of e)for(let r=-U;r<=U;r++)for(let z=-O;z<=O;z++){const F=V(f.x+z,f.y+r);if(l.has(F))continue;const k=Y.get(F);k&&Math.hypot(k.physX-f.physX,k.physY-f.physY)<=B&&l.add(F)}const u=[...l].map(f=>Y.get(f)).filter(Boolean),d=e.length,y=u.length;if(y<a)continue;const M=d/y,C=M-m,$=m>0?C/m:void 0;(C>=h||$!==void 0&&$>=g)&&w.push({component:e,k:d,clusterRate:M,delta:C,relativeDelta:$})}if(!w.length)return[];const tt=St(n,x.length,w.map(e=>e.k),o);for(let e=0;e<w.length;e++){const{component:l,k:u,clusterRate:d,delta:y,relativeDelta:M}=w[e],C=tt[e],$=C;if($>o)continue;const N=l.reduce((c,E)=>c+E.physX,0)/u,f=l.reduce((c,E)=>c+E.physY,0)/u;let r=l[0],z=1/0;for(const c of l){const E=Math.hypot(c.physX-N,c.physY-f);E<z&&(z=E,r=c)}const F=gt(l.map(c=>Math.atan2(c.physY-A,c.physX-I)))*180/Math.PI,v=l.filter(c=>at(c.physX-I,c.physY-A,Q,p)===p).length>u/2&&F<120;if(v&&t.bin)continue;const L=v?"edge-arc":"cluster",j=dt(N-I,f-A),b=t.bin,et=v?`Edge arc ~${j}`:`Cluster at (${r.x}, ${r.y})`,nt=u/n.length,it=pt($,y,nt,M),st=l.map(c=>lt(c));_.push({id:b?`${L}:hardBin:${b.bin}:${r.x},${r.y}`:`${L}:${r.x},${r.y}`,level:"wafer",severity:it,variable:b?{kind:"hardBin",bin:b.bin,label:b.label}:{kind:"yield",label:"Yield"},comparison:{family:L,left:et,right:"Rest of wafer"},effect:b?{direction:"higher",absoluteDelta:y,relativeDelta:M,effectSize:y}:{direction:"lower",absoluteDelta:-y,relativeDelta:M!==void 0?-M:void 0,effectSize:y},stats:{method:"permutation",pValue:C,adjustedPValue:$,sampleSizeLeft:u,sampleSizeRight:n.length-u},summary:v?`Edge arc near ${j}: ${u} contiguous failing dies (${(d*100).toFixed(0)}% vs ${(m*100).toFixed(0)}% background)`:b?`${b.label} cluster at (${r.x}, ${r.y}): ${u} contiguous dies (${(d*100).toFixed(0)}% vs ${(m*100).toFixed(0)}% background)`:`Failure cluster at (${r.x}, ${r.y}): ${u} contiguous failing dies (${(d*100).toFixed(0)}% vs ${(m*100).toFixed(0)}% background)`,highlight:{kind:"dies",dieKeys:st}})}return _.sort((e,l)=>{const u=e.stats.pValue??1,d=l.stats.pValue??1;return u!==d?u-d:Math.abs(l.effect.effectSize??0)-Math.abs(e.effect.effectSize??0)})}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { PlotCondition, PlotField, PlotSpec } from './plotSpec.js';
|
|
2
|
+
/** One ticked column: the plot field it stands for and its heading, for the reason when it cannot be drawn. */
|
|
3
|
+
export interface PlotColumn {
|
|
4
|
+
field: PlotField;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
/** Whether the field's values are numbers to plot, rather than categories to divide by. */
|
|
8
|
+
export declare function isNumericField(f: PlotField): boolean;
|
|
9
|
+
export type ColumnPlot = {
|
|
10
|
+
plot: PlotSpec;
|
|
11
|
+
} | {
|
|
12
|
+
problem: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The plot the columns suggest. `level` is the table's: a table of wafers plots one mark per wafer (a test's value is its
|
|
16
|
+
* wafer mean), a table of dies one mark per die.
|
|
17
|
+
*/
|
|
18
|
+
export declare function plotForColumns(columns: readonly PlotColumn[], level: 'die' | 'wafer', id: string): ColumnPlot;
|
|
19
|
+
/** A column filter as a table holds it (the shape of `ColumnFilter` in the canvas adapter). */
|
|
20
|
+
export type TableFilter = {
|
|
21
|
+
kind: 'range';
|
|
22
|
+
min?: number;
|
|
23
|
+
max?: number;
|
|
24
|
+
blank: boolean;
|
|
25
|
+
} | {
|
|
26
|
+
kind: 'values';
|
|
27
|
+
values: string[];
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* The condition of a plot that keeps what a column filter keeps, or the reason it cannot be one. A condition keeps the
|
|
31
|
+
* units whose value for the field is in range or listed, and a unit with no value meets none, so a filter that keeps
|
|
32
|
+
* blank cells, a list of values on a number, or a range on a category has no equal. The text a table shows is turned into
|
|
33
|
+
* the value the plot's field takes (a bin shows "2", the plot says "Bin 2"; a site shows "3", the plot "Site 3").
|
|
34
|
+
*/
|
|
35
|
+
export declare function conditionForFilter(field: PlotField, filter: TableFilter): PlotCondition | {
|
|
36
|
+
reason: string;
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=columnPlot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{WAFER_WORDS as c,outcomeLabel as h}from"./plotWords.js";const f=new Set(["x","y","radius","yield","dieCount","waferOrder"]);export function isNumericField(n){return"test"in n||"passRate"in n?!0:"builtin"in n?f.has(n.builtin):!1}export function plotForColumns(n,i,o){if(n.length===0)return{problem:"Tick one or more columns to plot."};const t=n.filter(r=>isNumericField(r.field)),e=n.filter(r=>!isNumericField(r.field)),l=r=>({plot:i==="wafer"?{...r,level:i}:r}),u=r=>l({...r,fields:{...r.fields,color:r.fields?.color??{none:!0}}});if(t.length===1&&e.length===0)return u({id:o,chart:"histogram",fields:{y:t[0].field}});if(t.length===0&&e.length===1)return u({id:o,chart:"bar",fields:{x:e[0].field}});if(t.length===1&&e.length===1)return u({id:o,chart:i==="wafer"?"bar":"box",fields:{x:e[0].field,y:t[0].field}});if(t.length===0&&e.length===2)return l({id:o,chart:"bar",stack:"stack",fields:{x:e[0].field,color:e[1].field}});if(t.length===1&&e.length===2)return l({id:o,chart:i==="wafer"?"bar":"box",fields:{x:e[0].field,y:t[0].field,color:e[1].field}});if(t.length===2&&e.length===0)return l({id:o,chart:"scatter",fields:{x:t[0].field,y:t[1].field}});if(t.length===2&&e.length===1)return l({id:o,chart:"scatter",fields:{x:t[0].field,y:t[1].field,color:e[0].field}});if(t.length>=3&&e.length===0){const r=t.map(s=>s.field).filter(s=>"test"in s);if(r.length===t.length){const s={};for(const a of r)a.name&&(s[String(a.test)]=a.name);return u({id:o,chart:"box",fields:{x:{builtin:"test"},y:{tests:r.map(a=>a.test),...Object.keys(s).length?{names:s}:{}}}})}return{problem:"Three or more number columns plot together only when each is a test. Untick the others, or tick two."}}return{problem:"These columns do not make one chart. Try two category columns, one number with one or two categories, two numbers, or three or more tests."}}export function conditionForFilter(n,i){const o=isNumericField(n);if(i.kind==="range")return o?i.blank?{reason:"it keeps cells with no value, which a chart filter cannot"}:{field:n,...i.min!==void 0?{min:i.min}:{},...i.max!==void 0?{max:i.max}:{}}:{reason:"a range on a column that holds categories"};if(o)return{reason:"a list of values on a column that holds numbers"};if(i.values.includes(""))return{reason:"it keeps cells with no value, which a chart filter cannot"};const t=e=>{if("builtin"in n&&(n.builtin==="hbin"||n.builtin==="sbin")){const l=Number(e);return Number.isInteger(l)?h(c,l):e}return"builtin"in n&&n.builtin==="site"?`Site ${e}`:e};return{field:n,values:i.values.map(t)}}
|
|
@@ -47,7 +47,7 @@ export interface CommonalityRow {
|
|
|
47
47
|
}
|
|
48
48
|
export interface CommonalityResult {
|
|
49
49
|
rows: CommonalityRow[];
|
|
50
|
-
/** Fields
|
|
50
|
+
/** Fields whose groups cannot be compared: fewer than two groups of two or more wafers, or nearly one group per wafer. */
|
|
51
51
|
untestable: CommonalityField[];
|
|
52
52
|
/** The fail bins compared, most dies first. */
|
|
53
53
|
bins: number[];
|
|
@@ -78,6 +78,7 @@ export declare const measureLabel: (m: CommonalityMeasure, binName?: (bin: numbe
|
|
|
78
78
|
export type CommonalityConfidence = 'clear' | 'possible' | 'none';
|
|
79
79
|
/** q under 0.05 is clear, under 0.2 possible; a q that could not be computed is not clear. */
|
|
80
80
|
export declare const commonalityConfidence: (q: number) => CommonalityConfidence;
|
|
81
|
+
/** Confidence as a level, in the words every level is shown by (presentation.ts): High, Medium or Low. */
|
|
81
82
|
export declare const CONFIDENCE_LABEL: Record<CommonalityConfidence, string>;
|
|
82
83
|
/** One field with its strongest measure, and its other measures behind it. */
|
|
83
84
|
export interface CommonalityFieldRows {
|
|
@@ -92,4 +93,10 @@ export interface CommonalityFieldRows {
|
|
|
92
93
|
* Fields are ordered clear, then possible, then not clear, and within each by the size of the leading difference.
|
|
93
94
|
*/
|
|
94
95
|
export declare function groupCommonalityRows(rows: readonly CommonalityRow[], tied?: readonly (readonly CommonalityField[])[]): CommonalityFieldRows[];
|
|
96
|
+
/** A group with fewer wafers than this has its wafer counts said beside it ("(3 vs 11 wafers)"). */
|
|
97
|
+
export declare const COMMONALITY_SMALL_GROUP = 5;
|
|
98
|
+
/** Fields that group the wafers identically, named together: "Split", "Split and Lot", "Split, Probe card and Lot". */
|
|
99
|
+
export declare const commonalityFieldNames: (fields: readonly CommonalityField[]) => string;
|
|
100
|
+
/** A row in words: "SS is 23.4 pts below TT", or for a bin, "Hard bin 3 is 4.1 pts higher in SS than in TT". */
|
|
101
|
+
export declare function commonalitySentence(r: CommonalityRow): string;
|
|
95
102
|
//# sourceMappingURL=commonality.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{diePassStatus as
|
|
1
|
+
import{diePassStatus as R,isYieldEligibleDie as E}from"../core/dies.js";import{benjaminiHochberg as Y}from"./math.js";import{compareGroups as I,comparisonP as G}from"./groupCompare.js";import{adjustedFits as H,comparableGrouping as D,mergePartitions as T,overlapping as U,partitionId as V}from"./groupEffects.js";import{facetValueOf as q}from"./facets.js";import{yieldCounts as z}from"./yield.js";import{compareNatural as J}from"../core/utils.js";export const COMMONALITY_BINS=5;function K(t,r){let c=0,d=0;for(const p of t.dies)!E(p)||p.hbin===void 0||(d++,p.hbin===r&&c++);return d?c/d*100:NaN}export function rankCommonality(t,r,c){const d=t.map(e=>{const{pass:o,total:i}=z(e.dies,e.passBins);return i?o/i*100:NaN}),p=new Map;for(const e of t){const o=new Set(e.passBins);for(const i of e.dies)E(i)&&i.hbin!==void 0&&R(i,o)===!1&&p.set(i.hbin,(p.get(i.hbin)??0)+1)}const m=[...p].sort((e,o)=>o[1]-e[1]||e[0]-o[0]).slice(0,COMMONALITY_BINS).map(([e])=>e),u=new Map(m.map(e=>[e,t.map(o=>K(o,e))])),n=[],l=[],h=[];for(const e of r){const o=t.map(a=>q(a.metadata,e.key,c)),i=[...new Set(o.filter(a=>a!==void 0))].sort(J);if(!D(o)){l.push(e);continue}h.push({field:e,value:o,keys:i})}const y=T(h.map(e=>({key:e.field.key,groupOf:e.value}))),f=new Map(r.map(e=>[e.key,e])),P=[[{kind:"yield"},d],...m.map(e=>[{kind:"bin",bin:e},u.get(e)])];for(const[e,o]of P){const i=new Map(H(o.map(a=>Number.isFinite(a)?a:void 0),y).map(a=>[a.partition.id,a]));for(const{field:a,value:w,keys:v}of h){const $=I(v.map(s=>({key:s,values:o.filter((k,x)=>w[x]===s)}))),N=$.groups.filter(s=>!$.tooSmall.includes(s.key)&&Number.isFinite(s.mean));if(N.length<2)continue;const F=N.reduce((s,k)=>k.mean<s.mean?k:s),M=N.reduce((s,k)=>k.mean>s.mean?k:s),[L,S]=e.kind==="yield"?[F,M]:[M,F],b=i.get(V(w));let g=b?.allowedFor?I(v.map(s=>({key:s,values:b.used.filter((k,x)=>w[x]===s&&k!==void 0)}))):void 0;g?.welch&&b?.fitted&&(g={...g,welch:{...g.welch,p:b.fitted.p}}),n.push({field:a,measure:e,comparison:$,worst:{key:L.key,mean:L.mean},best:{key:S.key,mean:S.mean},spread:M.mean-F.mean,pAdjusted:NaN,...g&&b?.allowedFor?{adjusted:g,allowedFor:b.allowedFor.map(s=>f.get(s)??{key:s,label:s})}:{}})}}const O=e=>G(e.adjusted??e.comparison),j=n.filter(e=>Number.isFinite(O(e))),B=Y(j.map(O));j.forEach((e,o)=>{e.pAdjusted=B[o]});const A=e=>Number.isFinite(e.pAdjusted)?e.pAdjusted:1/0;n.sort((e,o)=>A(e)-A(o)||o.spread-e.spread);const _=y.filter(e=>e.keys.length>1).map(e=>e.keys.map(o=>f.get(o))),C=[];return y.forEach((e,o)=>{for(const i of U(e,y))y.indexOf(i.partition)>o&&C.push({fields:e.keys.map(a=>f.get(a)),with:i.partition.keys.map(a=>f.get(a)),agree:i.agree,of:i.of})}),{rows:n,untestable:l,bins:m,tied:_,overlapping:C}}export const measureLabel=(t,r)=>t.kind==="yield"?"Yield":`Hard bin ${t.bin}${r?.(t.bin)?` (${r(t.bin)})`:""}`,commonalityConfidence=t=>t<.05?"clear":t<.2?"possible":"none",CONFIDENCE_LABEL={clear:"High",possible:"Medium",none:"Low"};export function groupCommonalityRows(t,r=[]){const c=new Map;for(const n of t)(c.get(n.field.key)??c.set(n.field.key,[]).get(n.field.key)).push(n);const d=n=>["clear","possible","none"].indexOf(commonalityConfidence(n.pAdjusted)),p=new Map;for(const n of r)for(const l of n)p.set(l.key,n);const m=new Set,u=[];for(const n of c.values()){const l=p.get(n[0].field.key);if(l){if(m.has(l))continue;m.add(l)}const h=n.find(f=>f.measure.kind==="yield"),y=h&&d(h)<=d(n[0])?h:n[0];u.push({field:n[0].field,fields:l?[n[0].field,...l.filter(f=>f.key!==n[0].field.key)]:[n[0].field],primary:y,others:n.filter(f=>f!==y)})}return u.sort((n,l)=>d(n.primary)-d(l.primary)||l.primary.spread-n.primary.spread)}export const COMMONALITY_SMALL_GROUP=5,commonalityFieldNames=t=>`${t.slice(0,-1).map(r=>r.label).join(", ")}${t.length>1?" and ":""}${t[t.length-1].label}`;export function commonalitySentence(t){const r=u=>`${u.toFixed(1)} pts`,c=u=>t.comparison.groups.find(n=>n.key===u)?.n??0,d=t.measure.kind==="yield"?`${t.worst.key} is ${r(t.spread)} below ${t.best.key}`:`${measureLabel(t.measure)} is ${r(t.spread)} higher in ${t.worst.key} than in ${t.best.key}`,[p,m]=[c(t.worst.key),c(t.best.key)];return Math.min(p,m)<COMMONALITY_SMALL_GROUP?`${d} (${p} vs ${m} wafers)`:d}
|
|
@@ -117,6 +117,11 @@ export declare function correlationSampleNote(m: Pick<CorrelationMatrix, 'sample
|
|
|
117
117
|
* budget an even spread of the dies is kept, as the matrix itself would; the means are those of every die.
|
|
118
118
|
*/
|
|
119
119
|
export declare function demeanWithinGroups(groups: ReadonlyArray<ReadonlyArray<Die>>, testDefs: TestDef[]): Die[];
|
|
120
|
+
/**
|
|
121
|
+
* One row per group (a wafer) holding the group's mean of every test, for a correlation between wafers: whether a wafer
|
|
122
|
+
* that runs high on one test runs high on another. A group with no value of a test has none of it.
|
|
123
|
+
*/
|
|
124
|
+
export declare function groupMeans(groups: ReadonlyArray<ReadonlyArray<Die>>, testDefs: TestDef[]): Die[];
|
|
120
125
|
/**
|
|
121
126
|
* Pearson correlation matrix for the parametric tests in `testDefs` across the
|
|
122
127
|
* dies in `dies` — every test up to `CORRELATION_TEST_BUDGET` (above it, the
|
|
@@ -148,8 +153,8 @@ export interface CorrelationSummary {
|
|
|
148
153
|
* Filter a correlation matrix to tests involved in significant pairs, clamped to
|
|
149
154
|
* [minTests, maxTests]. Pairs are ranked by |r|; the threshold gates which pairs
|
|
150
155
|
* count as "significant" for display selection, but all pair counts are computed
|
|
151
|
-
* over the full input matrix for the summary line.
|
|
152
|
-
*
|
|
156
|
+
* over the full input matrix for the summary line. The tests are ordered so that
|
|
157
|
+
* correlated tests sit side by side.
|
|
153
158
|
*/
|
|
154
159
|
export declare function filterCorrelationMatrix(matrix: CorrelationMatrix, { threshold, minTests, maxTests }?: {
|
|
155
160
|
threshold?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{dieHasValues as C,testValue as
|
|
1
|
+
import{dieHasValues as C,testValue as O}from"../core/dieTable.js";import{isParametricTest as Y}from"../renderer/buildWaferMap.js";import{markedTestLabel as k,derivedFields as P}from"../renderer/testLabel.js";export function pearsonFromSums(e,s,u,d,i,f){if(e<3)return null;const l=s/e,a=u/e,n=f/e-l*a,m=d/e-l*l,g=i/e-a*a,b=Math.sqrt(m*g);return b===0?null:Math.max(-1,Math.min(1,n/b))}export function pearsonOfPairs(e){let s=0,u=0,d=0,i=0,f=0,l=0;for(let a=0;a<e.length;a++){const{x:n,y:m}=e[a];!Number.isFinite(n)||!Number.isFinite(m)||(s++,u+=n,d+=m,i+=n*n,f+=m*m,l+=n*m)}return{r:pearsonFromSums(s,u,d,i,f,l),n:s}}export const CORRELATION_DIE_BUDGET=25e3;function $(e,s){const u=[],d=e/s;for(let i=0;i<s;i++)u.push(Math.floor(i*d));return u}export const CORRELATION_TEST_BUDGET=300,CORRELATION_WORK_BUDGET=25e7,CORRELATION_SCORE_BUDGET=25e6;export function correlationSampleNote(e){const s=[];return e.testSample&&s.push(`Among the ${e.testSample.used.toLocaleString()} of ${e.testSample.of.toLocaleString()} tests with the most dies outside their limits, then the widest spread`),e.sample&&s.push(`${s.length?"from":"From"} a ${e.sample.used.toLocaleString()}-die sample of ${e.sample.of.toLocaleString()}, spread evenly across the lot`),s.length?s.join(", "):void 0}function D(e,s,u,d){const i=e.length,f=new Float64Array(i),l=new Float64Array(i),a=new Float64Array(i),n=new Float64Array(i),m=e.map(c=>s.get(c.testNumber)?.limitLow),g=e.map(c=>s.get(c.testNumber)?.limitHigh);for(const c of u)for(let o=0;o<i;o++){const t=O(c,e[o].testNumber);t===void 0||!Number.isFinite(t)||(f[o]++,l[o]+=t,a[o]+=t*t,(m[o]!==void 0&&t<m[o]||g[o]!==void 0&&t>g[o])&&n[o]++)}const b=c=>{if(f[c]<3)return-1;const o=l[c]/f[c],t=Math.sqrt(Math.max(0,a[c]/f[c]-o*o)),h=m[c]!==void 0&&g[c]!==void 0?g[c]-m[c]:Math.abs(o);return h>0?t/h:0},w=e.map((c,o)=>({i:o,fails:f[o]<3?-1:n[o],spread:b(o)}));return w.sort((c,o)=>o.fails-c.fails||o.spread-c.spread||c.i-o.i),w.slice(0,d).map(c=>c.i).sort((c,o)=>c-o).map(c=>e[c])}function L(e){return e.filter(s=>s.testNumber!==void 0&&Y(s)).map(s=>({testNumber:s.testNumber,label:k(s,s.testNumber),unit:s.unit,...P(s)}))}export function demeanWithinGroups(e,s){const u=L(s).map(l=>l.testNumber),d=e.map(l=>u.map(a=>{let n=0,m=0;for(const g of l){const b=O(g,a);b!==void 0&&Number.isFinite(b)&&(n++,m+=b)}return n?m/n:0})),i=[];return e.forEach((l,a)=>{for(const n of l)C(n)&&i.push({die:n,group:a})}),(i.length>CORRELATION_DIE_BUDGET?$(i.length,CORRELATION_DIE_BUDGET).map(l=>i[l]):i).map(({die:l,group:a})=>{const n={};return u.forEach((m,g)=>{const b=O(l,m);b!==void 0&&Number.isFinite(b)&&(n[m]=b-d[a][g])}),{x:l.x,y:l.y,testValues:n}})}export function groupMeans(e,s){const u=L(s).map(d=>d.testNumber);return e.map((d,i)=>{const f={};for(const l of u){let a=0,n=0;for(const m of d){const g=O(m,l);g!==void 0&&Number.isFinite(g)&&(a++,n+=g)}a&&(f[l]=n/a)}return{x:i,y:0,testValues:f}})}export function buildCorrelationMatrix(e,s){const u=L(s);if(u.length<2)return{tests:u,cells:[]};const d=e.filter(C),f=d.length>CORRELATION_DIE_BUDGET?$(d.length,CORRELATION_DIE_BUDGET).map(r=>d[r]):d,l=u.length>CORRELATION_TEST_BUDGET,a=l?D(u,new Map(s.flatMap(r=>r.testNumber===void 0?[]:[[r.testNumber,r]])),f.length*u.length>CORRELATION_SCORE_BUDGET?$(f.length,Math.max(1,Math.floor(CORRELATION_SCORE_BUDGET/u.length))).map(r=>f[r]):f,CORRELATION_TEST_BUDGET):u,n=a.length*(a.length-1)/2,m=Math.max(1,Math.floor(CORRELATION_WORK_BUDGET/Math.max(1,n))),g=f.length>m?$(f.length,m).map(r=>f[r]):f,b=g.length<d.length,w=a.length,c=a.map(r=>r.testNumber),o=w*(w-1)/2,t=new Float64Array(o),h=new Float64Array(w),N=new Float64Array(o),F=new Float64Array(o),R=new Float64Array(o),A=new Float64Array(o),S=new Float64Array(o);function x(r,p){return r*w-(r*(r+1)>>1)+(p-r-1)}const y=new Float64Array(w),I=new Uint8Array(w);for(const r of g){I.fill(0);for(let p=0;p<w;p++){const M=O(r,c[p]);M!==void 0&&Number.isFinite(M)&&(y[p]=M,I[p]=1)}for(let p=0;p<w;p++){if(!I[p])continue;h[p]++;const M=y[p];for(let T=p+1;T<w;T++){if(!I[T])continue;const _=y[T],E=x(p,T);t[E]++,N[E]+=M,F[E]+=_,R[E]+=M*M,A[E]+=_*_,S[E]+=M*_}}}const X=r=>pearsonFromSums(t[r],N[r],F[r],R[r],A[r],S[r]),v=[];for(let r=0;r<w;r++)for(let p=0;p<w;p++){if(p===r){v.push({xIndex:p,yIndex:r,r:1,n:h[p]});continue}const M=Math.min(p,r),T=Math.max(p,r),_=x(M,T);v.push({xIndex:p,yIndex:r,r:X(_),n:t[_]})}return{tests:a,cells:v,...b?{sample:{of:d.length,used:g.length}}:{},...l?{testSample:{of:u.length,used:a.length}}:{}}}export function filterCorrelationMatrix(e,{threshold:s=.3,minTests:u=6,maxTests:d=20}={}){const i=[];let f=0,l=0,a=null;for(const t of e.cells){if(t.xIndex>=t.yIndex||t.r===null)continue;const h=Math.abs(t.r);i.push({xi:t.xIndex,yi:t.yIndex,absR:h}),(a===null||h>Math.abs(a.r))&&(a={xLabel:e.tests[t.xIndex].label,yLabel:e.tests[t.yIndex].label,r:t.r})}i.sort((t,h)=>h.absR-t.absR);const n=new Set;for(const{xi:t,yi:h,absR:N}of i){const F=N<s;n.size>=d||F&&n.size>=u||(n.add(t),n.size<d&&n.add(h))}if(n.size<Math.min(u,e.tests.length))for(let t=0;t<e.tests.length&&n.size<Math.min(d,u,e.tests.length);t++)n.add(t);const m=(()=>{const t=Array.from(n),h=new Map,N=new Map;for(const{xi:x,yi:y,absR:I}of i)!n.has(x)||!n.has(y)||(h.set(x,(h.get(x)??0)+I),h.set(y,(h.get(y)??0)+I),N.set(x,(N.get(x)??0)+1),N.set(y,(N.get(y)??0)+1));const F=x=>(N.get(x)??0)>0?h.get(x)/N.get(x):0,R=new Map;for(const{xi:x,yi:y,absR:I}of i)R.set(`${x},${y}`,I),R.set(`${y},${x}`,I);const A=t.sort((x,y)=>F(y)-F(x)),S=[];for(;A.length;){const x=S[S.length-1];let y=0;if(x!==void 0)for(let I=1;I<A.length;I++)(R.get(`${x},${A[I]}`)??0)>(R.get(`${x},${A[y]}`)??0)&&(y=I);S.push(A.splice(y,1)[0])}return S})(),g=m.map(t=>e.tests[t]),b=new Map(m.map((t,h)=>[t,h])),w=new Set(g.map(t=>t.testNumber)),c=e.cells.filter(t=>w.has(e.tests[t.xIndex].testNumber)&&w.has(e.tests[t.yIndex].testNumber)).map(t=>({xIndex:b.get(t.xIndex),yIndex:b.get(t.yIndex),r:t.r,n:t.n}));let o=0;for(const{xi:t,yi:h,absR:N}of i)n.has(t)&&n.has(h)?N>=.7?f++:N>=.4&&l++:N<s&&o++;return{matrix:{tests:g,cells:c},strongPairs:f,moderatePairs:l,hiddenWeakPairs:o,strongestPair:a}}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { PlotItem } from './plotData.js';
|
|
2
|
+
import { type PlotWords, type PlotWordsInput } from './plotWords.js';
|
|
3
|
+
/** One column of the table: a value per row, missing as `null` or `undefined`. */
|
|
4
|
+
export type DataTableColumn = ArrayLike<string | number | Date | null | undefined>;
|
|
5
|
+
/**
|
|
6
|
+
* A table of rows, one array per column, for the plots tab over a table.
|
|
7
|
+
* @experimental May change or be removed without notice.
|
|
8
|
+
*/
|
|
9
|
+
export interface DataTable {
|
|
10
|
+
/**
|
|
11
|
+
* Columns by name: product, lot, wafer, a date, a region, a revenue. Each is a category or a number a plot can use,
|
|
12
|
+
* and all have one value per row. The row's own name is the column given by `labelField`.
|
|
13
|
+
*/
|
|
14
|
+
fields: Record<string, DataTableColumn>;
|
|
15
|
+
/** The column that names each row. Absent, or absent from `fields`: "Wafer 1", "Wafer 2"… */
|
|
16
|
+
labelField?: string;
|
|
17
|
+
/**
|
|
18
|
+
* How many items fell in each outcome (dies in each hard bin; orders on time, late, cancelled), one array per
|
|
19
|
+
* outcome with a count per row. The key is the outcome's number. A missing count is none. Optional: without it the
|
|
20
|
+
* table has columns only, and no field offers a yield or a number of items.
|
|
21
|
+
*/
|
|
22
|
+
outcomes?: Record<string, ArrayLike<number | bigint | string | null | undefined>>;
|
|
23
|
+
/** The outcomes that count as good (the passing bins). Required with `outcomes`: a table has no default to judge a row by. */
|
|
24
|
+
goodOutcomes?: readonly number[];
|
|
25
|
+
/** What the rows, their items and the outcome are called, over the wafer words. */
|
|
26
|
+
words?: PlotWordsInput;
|
|
27
|
+
/** Names for outcomes by number, in place of "Bin 3": `{ 1: 'On time', 2: 'Late' }`. */
|
|
28
|
+
outcomeNames?: Readonly<Record<string | number, string>>;
|
|
29
|
+
}
|
|
30
|
+
export interface DataTableResult {
|
|
31
|
+
/** The plot items, one per row, or empty when the table cannot be read. */
|
|
32
|
+
items: PlotItem[];
|
|
33
|
+
/** Why the table cannot be read, each naming the column. Empty when `items` is usable. */
|
|
34
|
+
issues: string[];
|
|
35
|
+
/** The words the plots over this table say their data in: the plain wafer words unless the table says otherwise. */
|
|
36
|
+
words: PlotWords;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The plot items of a table, or the reasons it cannot be read. Validates, never throws: a column of the wrong length, an
|
|
40
|
+
* outcome named by something other than a number, a count that is negative or not a number, two rows with one name, or
|
|
41
|
+
* no good outcome.
|
|
42
|
+
*/
|
|
43
|
+
export declare function dataTableItems(table: DataTable): DataTableResult;
|
|
44
|
+
//# sourceMappingURL=dataTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{WAFER_WORDS as S,resolveWords as F}from"./plotWords.js";const v=/^(0|[1-9]\d*)$/,C=e=>{const o=e.map(Number).sort((f,c)=>f-c);return o.length>8?`${o.slice(0,8).join(", ")} and ${o.length-8} more`:o.join(", ")};function y(e){const o=typeof e=="bigint"?Number(e):typeof e=="string"?/^\s*\d+\s*$/.test(e)?Number(e):NaN:e;return Number.isFinite(o)&&Number.isInteger(o)&&o>=0?o:void 0}const I=1,T=[];function k(e,o){const f=e.words,c={...f?.outcomeNames??{},...e.outcomeNames??{}},h=!o&&f?.item===void 0;return!f&&!e.outcomeNames&&o?S:F({...f,...h?{item:null}:{},...Object.keys(c).length?{outcomeNames:c}:{}})}export function dataTableItems(e){const o=[],f=Object.keys(e.fields),c=Object.keys(e.outcomes??{}),h=c.length>0,i=k(e,h),g=()=>({items:[],issues:o,words:i}),a=i.outcome.value.toLowerCase(),O=i.item?.many??"items";if(f.length===0&&!h)return o.push("The table has no columns"),g();const d=new Map;for(const[n,t]of Object.entries(e.fields))(d.get(t.length)??d.set(t.length,[]).get(t.length)).push(n);for(const[n,t]of Object.entries(e.outcomes??{}))(d.get(t.length)??d.set(t.length,[]).get(t.length)).push(`${a} ${n}`);if(d.size>1){const n=[...d.entries()].map(([t,s])=>`${s.slice(0,3).join(", ")}${s.length>3?` and ${s.length-3} more`:""} ${t===1?"has 1 value":`have ${t} values`}`);o.push(`Every column needs one value per ${i.row.one}, but ${n.join("; ")}`)}const p=[...d.keys()][0]??0,$=e.goodOutcomes??T;if(h){for(const n of c)v.test(n)||o.push(`${i.outcome.value} "${n}" is not a ${a} number: name each ${a} count column by its number (1, 2, 3\u2026, with no leading zeros)`);if($.length===0)o.push(`Say which ${a}s pass: a table has no default pass ${a}`);else for(const n of $)(!Number.isInteger(n)||n<0)&&o.push(`Pass ${a} ${n} is not a ${a} number`)}if(e.labelField!==void 0&&!(e.labelField in e.fields)&&o.push(`The label column "${e.labelField}" is not one of the columns`),o.length)return g();for(const n of c){const t=e.outcomes[n];for(let s=0;s<p;s++){const u=t[s];if(u!=null&&y(u)===void 0){o.push(`${i.outcome.value} ${n}, ${i.row.one} ${s+1}: ${JSON.stringify(u)} is not a count of ${O} (a whole number, 0 or more)`);break}}}if(o.length)return g();const b=e.labelField!==void 0?e.fields[e.labelField]:void 0;if(b){const n=new Map,t=[];for(let s=0;s<p;s++){const u=b[s];if(u==null||u==="")continue;const l=String(u),m=(n.get(l)??0)+1;n.set(l,m),m===2&&t.push(l)}t.length&&o.push(`Each ${i.row.one} needs its own name in "${e.labelField}", but ${t.slice(0,3).map(s=>`"${s}"`).join(", ")}${t.length>3?` and ${t.length-3} more`:""} ${t.length===1?"is":"are"} used more than once. Name each ${i.row.one} by what makes it its own, such as its lot and its number together, for example "Lot 3_12"`)}if(h&&!$.some(n=>c.includes(String(n)))&&o.push(`None of the pass ${a}s (${$.join(", ")}) has a column of counts, so every ${i.row.one} would show ${i.rate.toLowerCase()} of 0. The columns are ${a}s ${C(c)}`),o.length)return g();const w=b,j=c.map(Number).sort((n,t)=>n-t),N=[];for(let n=0;n<p;n++){const t=[];for(const l of j){const m=e.outcomes[String(l)][n],r=m==null?0:y(m)??0;r&&t.push({id:`${n}:${l}`,width:1,height:1,hbin:l,wmapCount:r})}const s={};for(const[l,m]of Object.entries(e.fields)){if(l===e.labelField)continue;const r=m[n];r==null||r===""||typeof r=="number"&&!Number.isFinite(r)||r instanceof Date&&Number.isNaN(r.getTime())||(s[l]=r instanceof Date?r.toISOString():r)}const u=w?w[n]:void 0;N.push({label:u==null||u===""?`${i.row.one[0].toUpperCase()}${i.row.one.slice(1)} ${n+1}`:String(u),dies:t,waferIndex:n,metadata:s,passBins:$,ringCount:I})}return{items:N,issues:[],words:i}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{classifyDie as c}from"../core/classify.js";import{getReticleCell as f,getReticleShot as d}from"../core/reticle.js";import{requireRingCount as g}from"../core/ringCount.js";import{hasPosition as a}from"../core/dies.js";import{getRingLabel as s,radialPosition as p}from"../core/classify.js";export const DIE_REGION_KEYS=["ring","quadrant","reticleCell","reticleShot"];function m(e,r){return!!r.wafer&&a(e)&&e.physX!==void 0&&e.physY!==void 0}export function dieRadialPosition(e,r){return r.wafer&&a(e)&&e.physX!==void 0&&e.physY!==void 0?p(e,r.wafer):void 0}function i(e,r,n){if(m(e,r))return c(e,r.wafer,{ringCount:g(r,n)})}const t=new Map([["quadrant:NE",0],["quadrant:NW",1],["quadrant:SE",2],["quadrant:SW",3]]);function l(e,r){const n=r.reticle??r.wafer?.reticle;return n&&a(e)?f(e,n):void 0}export const ringPlotValue=e=>`Ring ${e}`,DIE_REGIONS={ring:{key:"ring",label:"Ring",available:(e,r)=>!!e.wafer&&r,valueOf:(e,r)=>{const n=i(e,r,"a ring of a
|
|
1
|
+
import{classifyDie as c}from"../core/classify.js";import{getReticleCell as f,getReticleShot as d}from"../core/reticle.js";import{requireRingCount as g}from"../core/ringCount.js";import{hasPosition as a}from"../core/dies.js";import{getRingLabel as s,radialPosition as p}from"../core/classify.js";export const DIE_REGION_KEYS=["ring","quadrant","reticleCell","reticleShot"];function m(e,r){return!!r.wafer&&a(e)&&e.physX!==void 0&&e.physY!==void 0}export function dieRadialPosition(e,r){return r.wafer&&a(e)&&e.physX!==void 0&&e.physY!==void 0?p(e,r.wafer):void 0}function i(e,r,n){if(m(e,r))return c(e,r.wafer,{ringCount:g(r,n)})}const t=new Map([["quadrant:NE",0],["quadrant:NW",1],["quadrant:SE",2],["quadrant:SW",3]]);function l(e,r){const n=r.reticle??r.wafer?.reticle;return n&&a(e)?f(e,n):void 0}export const ringPlotValue=e=>`Ring ${e}`,DIE_REGIONS={ring:{key:"ring",label:"Ring",available:(e,r)=>!!e.wafer&&r,valueOf:(e,r)=>{const n=i(e,r,"a ring of a chart");return n?ringPlotValue(n.ring):void 0},rawOf:(e,r)=>{const n=i(e,r,"a ring of a chart");return n?String(n.ring):void 0},grouping:{family:"ring",place:(e,r)=>{const n=i(e,r,"a ring");return n?{key:`ring:${n.ring}`,label:s(n.ring,r.ringCount)}:void 0},order:(e,r)=>e.localeCompare(r)}},quadrant:{key:"quadrant",label:"Quadrant",available:(e,r)=>!!e.wafer&&r,valueOf:(e,r)=>i(e,r,"a quadrant of a chart")?.quadrant,grouping:{family:"quadrant",place:(e,r)=>{const n=i(e,r,"a quadrant");return n?{key:`quadrant:${n.quadrant}`,label:n.quadrant}:void 0},order:(e,r)=>(t.get(e)??4)-(t.get(r)??4)}},reticleCell:{key:"reticleCell",label:"Reticle cell",available:(e,r)=>!!(e.reticle??e.wafer?.reticle)&&r,valueOf:(e,r)=>{const n=l(e,r);return n?`Reticle cell (${n.column}, ${n.row})`:void 0},grouping:{family:"reticle-position",place:(e,r)=>{const n=l(e,r);return n?{key:`reticle-position:cell:${n.column},${n.row}`,label:`Reticle cell (${n.column}, ${n.row})`}:void 0},order:(e,r)=>e.localeCompare(r,void 0,{numeric:!0})}},reticleShot:{key:"reticleShot",label:"Reticle shot",available:(e,r)=>!!(e.reticle??e.wafer?.reticle)&&r,valueOf:(e,r)=>{const n=r.reticle??r.wafer?.reticle;if(!n||!a(e))return;const{column:o,row:u}=d(e,n);return`Reticle shot (${o}, ${u})`}}};export function availableRegions(e,r){return DIE_REGION_KEYS.map(n=>DIE_REGIONS[n]).filter(n=>n.available(e,r))}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{testValuesReader as
|
|
1
|
+
import{testValuesReader as T}from"../core/dieTable.js";import{facetValueOf as j}from"./facets.js";import{dieRadialPosition as B}from"./dieRegions.js";import{pearsonOfPairs as I}from"./correlation.js";import{benjaminiHochberg as U,sampleVariance as X}from"./math.js";import{adjustedFits as v,comparableGrouping as C,mergePartitions as D}from"./groupEffects.js";import{yieldCounts as H}from"./yield.js";const L=4e3,O=60,q=20,Q=.1,x=r=>Math.sqrt(X(r));function P(r,c){const l=Math.min(r.length,c.length);return l<q?0:I(Array.from({length:l},(u,a)=>({x:r[a],y:c[a]}))).r??0}export function pickExamples(r,c,l,u){const a=c.slice(0,O),h=r.reduce((e,t)=>e+t.dies.length,0);if(a.length===0||h===0)return{ranked:[...c],...N(r,l,u)};const w=Math.max(1,Math.ceil(h/L)),b=T(a),g=new Float64Array(a.length),n=a.map(()=>[]),f=[],d=[],i=r.map(()=>[]);let M=0;r.forEach((e,t)=>{for(const o of e.dies){if(M++%w)continue;b(o,g);const s=f.length;f.push(t),i[t].push(s),d.push(B(o,{wafer:e.wafer})??NaN);for(let p=0;p<a.length;p++)n[p].push(g[p])}});const S=e=>n[e].reduce((t,o,s)=>(Number.isFinite(o)&&t.push(s),t),[]),A=e=>i.map(t=>{const o=t.map(s=>n[e][s]).filter(Number.isFinite);return o.length>=3?o.reduce((s,p)=>s+p,0)/o.length:void 0}),_=a.map((e,t)=>{const o=S(t);if(o.length<q)return 0;if(r.length===1)return Math.abs(P(o.map(m=>n[t][m]),o.map(m=>d[m]))||0);const s=x(o.map(m=>n[t][m])),p=A(t).filter(m=>m!==void 0);return s>0&&p.length>=2?Math.min(1,x(p)/s):0}),k=a.map((e,t)=>t).sort((e,t)=>_[t]-_[e]||e-t),R=[...k.map(e=>a[e]),...c.slice(O)],y=k[0];if(_[y]<=0)return{ranked:[...c],...N(r,l,u)};let E,F=.3;const V=S(y);for(const e of k.slice(1)){const t=V.filter(s=>Number.isFinite(n[e][s])),o=Math.abs(P(t.map(s=>n[y][s]),t.map(s=>n[e][s])));o>F&&(F=o,E=a[e])}const G=N(r,l,u,A(y));return{ranked:R,...E!==void 0?{partner:E}:{},...G}}function N(r,c,l,u){if(r.length<4)return{};const a=D(c.map(n=>({key:n,groupOf:r.map(f=>j(f.metadata,n,l))})).filter(n=>C(n.groupOf)));if(a.length===0)return{};const h=n=>{const f=v(n,a).filter(i=>i.fitted),d=U(f.map(i=>i.fitted.p));return f.map((i,M)=>({f:i,q:d[M]})).filter(i=>i.q<Q).sort((i,M)=>i.f.fitted.p-M.f.fitted.p).map(i=>i.f.partition)},w=u?h(u)[0]?.keys[0]:void 0,b=r.map(n=>{const{pass:f,total:d}=H(n.dies,n.passBins);return d?f/d:void 0}),g=h(b).flatMap(n=>n.keys);return{...w?{splitKey:w}:{},...g.length?{yieldKeys:g}:{}}}
|
|
@@ -66,6 +66,17 @@ export interface FacetItem {
|
|
|
66
66
|
export declare function commonMetadata(items: Array<{
|
|
67
67
|
metadata?: WaferMetadata;
|
|
68
68
|
}>): WaferMetadata;
|
|
69
|
+
/**
|
|
70
|
+
* The wafer fields that split these wafers into groups, by the host's label for each. A trend pooled across such
|
|
71
|
+
* groups may be the groups' offset rather than a relationship (Simpson's paradox). The one rule behind that warning,
|
|
72
|
+
* wherever it is shown (the scatter plot and the correlation matrix). `exclude` drops fields the chart already divides by.
|
|
73
|
+
*/
|
|
74
|
+
export declare function mixedFieldLabels(items: FacetItem[], options?: {
|
|
75
|
+
curation?: Record<string, FacetCuration>;
|
|
76
|
+
exclude?: readonly string[];
|
|
77
|
+
}): string[];
|
|
78
|
+
/** The warning's first sentence for `mixedFieldLabels`, worded once for every chart that gives it. */
|
|
79
|
+
export declare function mixedFieldsWarning(labels: readonly string[], measure: 'trend' | 'correlation', rows?: string): string;
|
|
69
80
|
export interface BuildFacetTableOptions {
|
|
70
81
|
/** Extra/override curation entries layered on top of wmap's default curation — a caller's own app-specific keys (or a relabel of a default one) without losing wmap's built-in defaults. */
|
|
71
82
|
curation?: Record<string, FacetCuration>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{metadataDisplayValue as
|
|
1
|
+
import{metadataDisplayValue as x}from"../core/metadata.js";import{compareNatural as y,listInWords as C,prettyKey as b}from"../core/utils.js";export const FACET_NONE_VALUE="(none)";export{prettyKey}from"../core/utils.js";export const DEFAULT_FACET_CURATION={split:{label:"Split"},lot:{label:"Lot"},product:{label:"Product"},testProgram:{label:"Test Program"},temperature:{label:"Temperature"},testDate:{label:"Test Date",date:!0},operator:{label:"Operator"},waferId:{label:"Wafer Id",facet:!1}};export function attributeLabel(e,t){return t?.[e]?.label??DEFAULT_FACET_CURATION[e]?.label??b(e)}function O(e){const t=e.indexOf("T");return t>0?e.slice(0,t):e}export function facetValueOf(e,t,r=DEFAULT_FACET_CURATION){const n=x(e?.[t]);if(n!==void 0)return(r[t]??DEFAULT_FACET_CURATION[t])?.date?O(n):n}export function commonMetadata(e){if(!e.length)return{};const t=e[0].metadata??{},r={};for(const[n,a]of Object.entries(t))a==null||a===""||e.every(d=>(d.metadata??{})[n]===a)&&(r[n]=a);return r}export function mixedFieldLabels(e,t={}){const r=t.exclude??[];return buildFacetTable(e,{facetableOnly:!0,curation:t.curation}).filter(n=>n.splittable&&!r.includes(n.key)).map(n=>n.label)}export function mixedFieldsWarning(e,t,r="wafers"){return`Mixed ${C(e)} across these ${r}: a ${t} here may come from the groups' offset rather than the relationship (Simpson's paradox).`}export function buildFacetTable(e,t={}){const r={...DEFAULT_FACET_CURATION,...t.curation},n=t.facetableOnly??!0,a=new Set;for(const o of e)for(const c of Object.keys(o.metadata??{}))a.add(c);const m=[...Object.keys(r).filter(o=>a.has(o)),...[...a].filter(o=>!(o in r))],p=[];for(const o of m){const c=r[o];if(n&&c&&c.facet===!1)continue;const s=new Map;for(const u of e){const l=facetValueOf(u.metadata,o,r)??FACET_NONE_VALUE,f=s.get(l)??{waferCount:0,dieCount:0};f.waferCount+=1,f.dieCount+=u.dieCount??0,s.set(l,f)}if(s.size===0)continue;const i=Array.from(s,([u,l])=>({value:u,waferCount:l.waferCount,dieCount:l.dieCount}));i.sort((u,l)=>(u.value===FACET_NONE_VALUE?1:0)-(l.value===FACET_NONE_VALUE?1:0)||l.waferCount-u.waferCount||y(u.value,l.value)),p.push({key:o,label:c?.label??b(o),values:i,splittable:i.length>1})}return p}
|
|
@@ -58,6 +58,15 @@ export interface ArrangedFindings {
|
|
|
58
58
|
export declare function isOneBinCluster(f: Pick<StatsFinding, 'comparison' | 'variable'>): boolean;
|
|
59
59
|
/** Most severe first: the order every findings list is arranged in, and how two findings' severities compare. */
|
|
60
60
|
export declare const SEVERITY_ORDER: Record<StatsSeverity, number>;
|
|
61
|
+
/**
|
|
62
|
+
* A wafer's findings counted for its badge: all of them, and how many are strong (unusual, notable), each counted once —
|
|
63
|
+
* a finding that another explains (`relatedIds`: the regions a pattern or a cluster restates) is not counted again.
|
|
64
|
+
*/
|
|
65
|
+
export declare function findingsTally(findings: readonly StatsFinding[]): {
|
|
66
|
+
total: number;
|
|
67
|
+
unusual: number;
|
|
68
|
+
notable: number;
|
|
69
|
+
};
|
|
61
70
|
/**
|
|
62
71
|
* The one arrangement of a findings list, read by the Summary panel and both HTML reports, so a
|
|
63
72
|
* finding sits under the same heading and in the same order on every surface.
|
|
@@ -69,4 +78,16 @@ export declare const SEVERITY_ORDER: Record<StatsSeverity, number>;
|
|
|
69
78
|
* run-merge records the constituents it replaced there, and those are gone.
|
|
70
79
|
*/
|
|
71
80
|
export declare function arrangeFindings(findings: readonly StatsFinding[]): ArrangedFindings;
|
|
81
|
+
/**
|
|
82
|
+
* The dies a finding covers on each wafer of a lot, as Show on map draws them: a finding about some wafers names each one
|
|
83
|
+
* with its own dies (a region's dies on that wafer, or, for a pattern repeated across wafers, the dies of that wafer's
|
|
84
|
+
* own matching finding); a finding about a bin, a region or a set of dies covers the same dies on every wafer
|
|
85
|
+
* (`allWafers`). The one rule for the gallery's cards and a presentation's maps of an item.
|
|
86
|
+
*/
|
|
87
|
+
export declare function findingDiesByWafer(finding: StatsFinding,
|
|
88
|
+
/** Each wafer's own findings, by wafer index (`perWafer[i].summary.findings`). */
|
|
89
|
+
waferFindings: (waferIndex: number) => readonly StatsFinding[] | undefined): {
|
|
90
|
+
allWafers: boolean;
|
|
91
|
+
byWafer: Map<number, string[]>;
|
|
92
|
+
};
|
|
72
93
|
//# sourceMappingURL=filterFindings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function u(t){return Array.isArray(t)?t:[t]}export function filterFindings(t,r){let n=t.findings;if(r.severity!==void 0){const i=new Set(u(r.severity));n=n.filter(o=>i.has(o.severity))}if(r.kind!==void 0){const i=new Set(u(r.kind));n=n.filter(o=>i.has(o.variable.kind))}if(r.family!==void 0){const i=new Set(u(r.family));n=n.filter(o=>i.has(o.comparison.family))}if(r.level!==void 0){const i=new Set(u(r.level));n=n.filter(o=>i.has(o.level))}return n}export function visibleFindings(t){const r=new Set(t.flatMap(n=>n.absorbedIds??[]));return t.filter(n=>!r.has(n.id))}export function findingPatternKey(t){return[t.variable.kind,t.variable.index??"",t.variable.bin??"",t.comparison.family,t.comparison.left,t.effect.direction].join("|")}export function isOneBinCluster(t){return t.comparison.family==="cluster"&&t.variable.kind==="hardBin"}export const SEVERITY_ORDER={unusual:0,notable:1,info:2};export function findingsTally(t){const r=new Set(t.flatMap(i=>i.relatedIds??[])),n=t.filter(i=>!r.has(i.id));return{total:t.length,unusual:n.filter(i=>i.severity==="unusual").length,notable:n.filter(i=>i.severity==="notable").length}}export function arrangeFindings(t){const r=new Set(t.flatMap(e=>e.absorbedIds??[])),n=t.filter(e=>!r.has(e.id)),i=n.filter(e=>e.comparison.family==="spatial-pattern"),o=new Set(i.flatMap(e=>e.relatedIds??[])),a=new Map;for(const e of n)if(isOneBinCluster(e))for(const s of e.relatedIds??[])!o.has(s)&&!a.has(s)&&a.set(s,e);const l=(e,s)=>SEVERITY_ORDER[e.severity]-SEVERITY_ORDER[s.severity],y=i.map(e=>{const s=n.filter(f=>e.relatedIds?.includes(f.id)),d=n.filter(f=>s.includes(a.get(f.id)));return{finding:e,children:[...s,...d].sort(l)}}),c=new Map,p=e=>`${e.comparison.family}\0${e.comparison.left}${isOneBinCluster(e)?`\0${e.variable.bin}`:""}`;for(const e of n){if(e.comparison.family==="spatial-pattern"||o.has(e.id))continue;const s=a.get(e.id);if(s&&o.has(s.id))continue;const d=p(s??e);c.set(d,[...c.get(d)??[],e])}const h=[...c.entries()].map(([e,s])=>{const d=[...s].sort((w,b)=>Number(a.has(w.id))-Number(a.has(b.id))||l(w,b)),[f,m]=e.split("\0");return{key:e,family:f,left:m,worst:[...s].sort(l)[0].severity,findings:d}});return h.sort((e,s)=>SEVERITY_ORDER[e.worst]-SEVERITY_ORDER[s.worst]),{patterns:y,groups:h}}export function findingDiesByWafer(t,r){const n=t.highlight,i=new Map;if(n.kind==="wafer"){const a=findingPatternKey(t);for(const l of n.waferIndices){const y=n.dieKeysByWafer?void 0:r(l)?.find(p=>findingPatternKey(p)===a),c=n.dieKeysByWafer?.[l]??y?.highlight?.dieKeys??[];i.set(l,c)}return{allWafers:!1,byWafer:i}}const o=n.dieKeys??[];return o.length&&i.set(-1,o),{allWafers:!0,byWafer:i}}
|
|
@@ -10,6 +10,14 @@ export interface Partition {
|
|
|
10
10
|
}
|
|
11
11
|
/** The wafers grouped as a number per group in order of first appearance, so equal groupings compare equal whatever their labels. */
|
|
12
12
|
export declare function partitionId(groupOf: GroupOf): string;
|
|
13
|
+
/** The most groups a field may put `wafers` wafers in and still be compared: past it the field nearly names each wafer. */
|
|
14
|
+
export declare const maxGroups: (wafers: number) => number;
|
|
15
|
+
/**
|
|
16
|
+
* Whether a field's groups can be compared: two groups or more with two wafers or more each, and no more groups than
|
|
17
|
+
* {@link maxGroups}. Every surface that reads groups of wafers takes its fields through here, so a field is read by all of
|
|
18
|
+
* them or by none, and each set of groups is read after allowing for the same others.
|
|
19
|
+
*/
|
|
20
|
+
export declare function comparableGrouping(groupOf: GroupOf): boolean;
|
|
13
21
|
/** Fields that group the wafers identically are one partition. */
|
|
14
22
|
export declare function mergePartitions(fields: ReadonlyArray<{
|
|
15
23
|
key: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{compareGroups as
|
|
1
|
+
import{compareGroups as z}from"./groupCompare.js";import{fUpperTail as k,tTwoSided as x}from"./math.js";export function partitionId(i){const o=new Map;return i.map(t=>t===void 0?"-":String(o.get(t)??o.set(t,o.size).get(t))).join(",")}export const maxGroups=i=>Math.max(2,Math.floor(i/2));export function comparableGrouping(i){const o=new Map;for(const e of i)e!==void 0&&o.set(e,(o.get(e)??0)+1);let t=0;for(const e of o.values())e>=2&&t++;return t>=2&&o.size<=maxGroups(i.length)}export function mergePartitions(i){const o=new Map;for(const t of i){const e=partitionId(t.groupOf),n=o.get(e);n?n.keys.push(t.key):o.set(e,{id:e,keys:[t.key],groupOf:t.groupOf})}return[...o.values()]}export function nested(i,o){const t=new Map;return i.every((e,n)=>e===void 0||(t.has(e)?t.get(e)===o[n]:(t.set(e,o[n]),!0)))}export function fitGroups(i,o,t=0){const e=new Map;if(i.forEach((s,u)=>{const r=o[u];s===void 0||!Number.isFinite(s)||r===void 0||(e.get(r)??e.set(r,[]).get(r)).push(u)}),e.size<2)return;const n=z([...e].map(([s,u])=>({key:s,values:u.map(r=>i[r])})));let p=n.welch?.p??n.kruskal?.p;if(n.welch&&t>0){const s=n.welch.df2-t;p=s<1?1:n.welch.method==="welch-t"?x(n.welch.statistic,s):k(n.welch.statistic,n.welch.df1,s)}return p===void 0||!Number.isFinite(p)?void 0:{byGroup:e,p}}export const ALLOW_FOR_P=.25;function y(i,o){const t=overlapOf(i,o);return!!t&&t.agree/t.of>=MIN_OVERLAP_SHARE}export function adjustedFits(i,o){const t=o.map(n=>({partition:n,fitted:fitGroups(i,n.groupOf)})),e=t.filter(n=>n.fitted).sort((n,p)=>n.fitted.p-p.fitted.p);return t.map(n=>{const p=e.filter(f=>f.partition.id!==n.partition.id&&f.fitted.p<ALLOW_FOR_P&&!nested(f.partition.groupOf,n.partition.groupOf)&&!y(f.partition.groupOf,n.partition.groupOf)),s=p.filter(f=>nested(n.partition.groupOf,f.partition.groupOf)),u=p.find(f=>!nested(n.partition.groupOf,f.partition.groupOf)),r=[...u?[u]:[],...s];let a=[...i],d=n.fitted,h;if(r.length>0){let f=0;for(const g of r){f+=Math.max(0,(g.fitted?.byGroup.size??1)-1);const w=new Map;a.forEach((l,m)=>{const c=g.partition.groupOf[m];l!==void 0&&c!==void 0&&(w.get(c)??w.set(c,[]).get(c)).push(l)});const O=new Map([...w].map(([l,m])=>[l,m.reduce((c,M)=>c+M,0)/m.length]));a=a.map((l,m)=>{const c=g.partition.groupOf[m];return l===void 0||c===void 0?void 0:l-O.get(c)})}d=fitGroups(a,n.partition.groupOf,f)??n.fitted,d!==n.fitted&&(h=r.map(g=>g.partition.keys[0]))}return{partition:n.partition,used:d===n.fitted?[...i]:a,fitted:d,...h?{allowedFor:h}:{}}})}export const MIN_OVERLAP_SHARE=.75;export function overlapOf(i,o){const t=i.flatMap((r,a)=>r!==void 0&&o[a]!==void 0?[[r,o[a]]]:[]),e=new Set(t.map(r=>r[0])),n=new Set(t.map(r=>r[1]));if(t.length===0||e.size<2||e.size!==n.size)return;const p=new Map;for(const[r,a]of t){const d=p.get(r)??p.set(r,new Map).get(r);d.set(a,(d.get(a)??0)+1)}const s=new Map;let u=0;for(const[r,a]of p){const[d,h]=[...a].sort((f,g)=>g[1]-f[1]||(f[0]<g[0]?-1:1))[0];s.set(r,d),u+=h}return new Set(s.values()).size===e.size?{agree:u,of:t.length}:void 0}export function overlapping(i,o){return o.filter(t=>t.id!==i.id).flatMap(t=>{const e=overlapOf(i.groupOf,t.groupOf);return e&&e.agree<e.of&&e.agree/e.of>=MIN_OVERLAP_SHARE?[{partition:t,...e}]:[]}).sort((t,e)=>e.agree/e.of-t.agree/t.of)}
|
|
@@ -64,6 +64,8 @@ export declare function tQuantileTwoSided(p: number, df: number): number;
|
|
|
64
64
|
export declare function fUpperTail(f: number, df1: number, df2: number): number;
|
|
65
65
|
/** Upper tail P(X ≥ x) of the chi-square distribution with `df` degrees of freedom. */
|
|
66
66
|
export declare function chiSquareUpperTail(x: number, df: number): number;
|
|
67
|
+
/** The interquartile range of a normal distribution in standard deviations: a spread that wild readings do not move. */
|
|
68
|
+
export declare const IQR_SIGMA = 1.35;
|
|
67
69
|
/** Linear-interpolation quantile of a pre-sorted array (`q` in [0, 1]).
|
|
68
70
|
*
|
|
69
71
|
* `ArrayLike<number>`, not `number[]`, so a caller holding its values in a
|