@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,58 +1,80 @@
|
|
|
1
|
-
import
|
|
2
|
-
<h2>${
|
|
3
|
-
${
|
|
4
|
-
</section>`}
|
|
5
|
-
`);return`<dl class="${
|
|
6
|
-
${
|
|
7
|
-
</dl>`}export function buildMetadataRows(e){return
|
|
8
|
-
${e.map(
|
|
9
|
-
<dt>${
|
|
10
|
-
<dd>${
|
|
11
|
-
${
|
|
1
|
+
import"./synthesis.js";import{formatFindingTooltip as k,findingMetricLabel as z,isProportionFinding as j}from"./findingText.js";import{arrangeFindings as S}from"./filterFindings.js";import{dataColorsFor as F,barOnWhite as L}from"../renderer/dataColors.js";import{SEVERITY_MARK as b,meterGlyphs as T,itemCostText as I,shortfallColor as u,shortfallStep as N,formatPoints as M,barPercent as E,LEVEL_WORD as A}from"./presentation.js";import{worthItems as R}from"./worthItems.js";import{fmt as x,plainBinTerms as f}from"../renderer/fmt.js";import{buildFacetTable as B,attributeLabel as C}from"./facets.js";import{escHtml as n}from"../core/utils.js";import{derivedKeyText as v,derivedFields as w}from"../renderer/testLabel.js";function D(e,t,r="",a){return`<section class="${["report-section",r].filter(Boolean).join(" ")}"${a?` id="${n(a)}"`:""}>
|
|
2
|
+
<h2>${n(e)}</h2>
|
|
3
|
+
${t}
|
|
4
|
+
</section>`}function H(e,t="meta-list"){if(!e.length)return"";const r=e.map(a=>`<div class="definition-item"><dt>${n(a.label)}</dt><dd>${n(a.value)}</dd></div>`).join(`
|
|
5
|
+
`);return`<dl class="${t}">
|
|
6
|
+
${r}
|
|
7
|
+
</dl>`}export function buildMetadataRows(e){return B(e,{facetableOnly:e.length>1}).map(r=>({label:C(r.key),value:r.values.map(a=>a.value).join(", ")}))}function _(e){return e.length?`<dl class="metric-grid">
|
|
8
|
+
${e.map(r=>`<div class="metric">
|
|
9
|
+
<dt>${n(r.label)}</dt>
|
|
10
|
+
<dd>${n(r.value)}</dd>
|
|
11
|
+
${r.hint?`<span class="metric-hint">${n(r.hint)}</span>`:""}
|
|
12
12
|
</div>`).join(`
|
|
13
13
|
`)}
|
|
14
|
-
</dl>`:""}
|
|
15
|
-
`);return`<table class="${
|
|
16
|
-
<thead><tr>${
|
|
17
|
-
<tbody>${
|
|
18
|
-
</table>`}export function renderMeter(e,r){
|
|
19
|
-
|
|
14
|
+
</dl>`:""}function P(e,t,r={}){if(!t.length)return`<p class="no-data">${n(r.emptyMessage??"No data")}</p>`;const a=["report-table",r.className].filter(Boolean).join(" "),s=e.map(i=>`<th>${n(i)}</th>`).join(""),d=i=>typeof i=="string"?`<td>${i}</td>`:`<td${i.className?` class="${i.className}"`:""}>${i.html}</td>`,o=t.map(i=>`<tr>${i.map(d).join("")}</tr>`).join(`
|
|
15
|
+
`);return`<table class="${a}">
|
|
16
|
+
<thead><tr>${s}</tr></thead>
|
|
17
|
+
<tbody>${o}</tbody>
|
|
18
|
+
</table>`}export function renderMeter(e,t,r){return`<span class="meter"><span class="meter-dots" aria-hidden="true">${T(e,r)}</span><span class="meter-word">${n(t)}</span></span>`}export function renderSeverityMeter(e){const{tier:t,word:r}=b[e];return renderMeter(t,r,"severity")}export const severityTier=e=>b[e].tier;function G(e,t,r="",a){const s=a?`;background:${n(a)}`:"";return{html:`<span class="cellbar"><span class="cellbar-value">${n(t)}</span><span class="cellbar-track" aria-hidden="true"><i style="width:${E(e).toFixed(1)}%${s}"></i></span></span>`,className:["barcell",r].filter(Boolean).join(" ")}}function O(e){const t=N(e);return{html:n(M(e)),className:["numeric",t?`low-${t}`:""].filter(Boolean).join(" ")}}function K(e){if(typeof e=="string")return n(e);if("delta"in e)return O(e.delta);const t=e.muted?"muted-row":"";if(e.bar)return G(e.bar.percent,e.text,t,e.bar.color);const r=[e.numeric?"numeric":"",t,e.flag?"flagged":""].filter(Boolean).join(" ");return r?{html:n(e.text),className:r}:n(e.text)}function V(e){switch(e.kind){case"metrics":return _(e.items);case"definitions":return H(e.entries);case"table":return P(e.headers,e.rows.map(t=>t.map(K)),{className:"compact",emptyMessage:e.emptyMessage});case"text":return`<p class="report-${e.style}">${n(e.text)}</p>`;case"subheading":return`<h${e.level} class="report-subheading">${n(e.text)}</h${e.level}>`;case"findings":return findingsTableHtml(e.findings,e.totalWafers,e.scope,e.live);case"synthesis":return J(e.synthesis,e.anchorFor,e.headline!==!1,e.checked!==!1,e.findingsListed!==!1);case"figure":case"figures":case"charts":case"evidence":case"plots":return"";case"badges":return`<p class="report-note">${n(e.badges.map(t=>t.text).join(" \xB7 "))}</p>`}}const W=e=>e.kind==="figure"||e.kind==="figures"||e.kind==="charts"||e.kind==="evidence"||e.kind==="plots"||e.kind==="text"&&e.style==="legend",U=e=>e.blocks.some(t=>!W(t));function Y(e){const t=e.sections.filter(U),r=t.length>=4,a=t.map((o,i)=>o.anchor??(r?`sec-${e.scope}${i+1}`:void 0)),s=t.map((o,i)=>D(o.title,o.blocks.map(V).join(`
|
|
19
|
+
`),o.className,a[i])).join(`
|
|
20
|
+
`);return r?`<nav class="report-toc" aria-label="Sections">${t.map((o,i)=>`<a href="#${a[i]}">${n(o.title)}</a>`).join("")}</nav>
|
|
21
|
+
${s}`:s}function $(e,t){return`<main class="report">
|
|
22
|
+
<header class="report-header">
|
|
23
|
+
<h1>${n(e.title)}</h1>
|
|
24
|
+
<p class="report-subtitle">Generated ${n(t)}</p>
|
|
25
|
+
</header>
|
|
26
|
+
${Y(e)}
|
|
27
|
+
<p class="footer">Generated ${n(t)}</p>
|
|
28
|
+
</main>`}export function renderReportHtml(e,t){const r=`<!DOCTYPE html>
|
|
29
|
+
<html lang="en">
|
|
30
|
+
<head>
|
|
31
|
+
<meta charset="UTF-8">
|
|
32
|
+
<title>${n(e.title)}</title>
|
|
33
|
+
<style>
|
|
34
|
+
${reportStyles(e.dataColors)}
|
|
35
|
+
</style>
|
|
36
|
+
</head>
|
|
37
|
+
<body>`,a=`${reportScripts(e.live)}
|
|
38
|
+
</body>
|
|
39
|
+
</html>`;if(!e.banner)return`${r}
|
|
40
|
+
${e.parts.map(o=>$(o,t)).join(`
|
|
41
|
+
`)}
|
|
42
|
+
${a}`;const s=`<p style="max-width:1080px;margin:0 auto 8px;padding:8px 12px;background:var(--report-surface);border:1px solid var(--report-line);border-radius:4px;font-size:12px;color:var(--report-muted);">${n(e.banner)}</p>`,d=e.parts.map((o,i)=>`${i===0?"":'<hr style="max-width:1080px;margin:32px auto 0;border:none;border-top:3px solid var(--report-line-strong);">'}
|
|
43
|
+
${$(o,t)}`).join(`
|
|
44
|
+
`);return`${r}
|
|
45
|
+
<div class="report" style="padding-top:24px;">
|
|
46
|
+
${s}
|
|
47
|
+
</div>
|
|
48
|
+
${d}
|
|
49
|
+
${a}`}export function formatFindingDelta(e){if(e.variable.kind==="spatialPattern")return"\u2014";const t=e.effect.absoluteDelta??0,r=t>0?"+":t<0?"\u2212":"";if(j(e))return`${r}${Math.abs(t*100).toFixed(1)} points`;if(e.variable.kind==="test"){if(e.effect.relativeDelta!==void 0&&Number.isFinite(e.effect.relativeDelta)){const a=Math.abs(e.effect.relativeDelta*100).toFixed(1);return`${r}${a}%`}return`${r}${x(Math.abs(t),e.variable.unit)}`}return`${r}${x(Math.abs(t),e.variable.unit)}`}export function derivedFindingsKeyHtml(e){const t=v(e.map(r=>({label:r.variable.label,...w(r.variable)})));return t?`<p class="report-note">${n(t)}</p>`:""}export function findingAnchor(e,t=""){return`finding-${t}`+e.replace(/[^A-Za-z0-9]/g,r=>`_${r.charCodeAt(0).toString(16)}_`)}const q="Indented rows are the findings a pattern explains, most severe first. The other findings follow, grouped by region, most severe first.";export function findingRows(e,t){const r=S(e),s=[...r.patterns.flatMap(o=>[{f:o.finding,nested:!1},...o.children.map(i=>({f:i,nested:!0}))]),...r.groups.flatMap(o=>o.findings.map(i=>({f:i,nested:!1})))].map(({f:o,nested:i})=>({finding:o,nested:i,region:o.comparison.left,metric:f(z(o)),delta:formatFindingDelta(o),coverage:formatFindingCoverage(o,t)})),d=v(e.map(o=>({label:o.variable.label,...w(o.variable)})));return{rows:s,coverageHeader:t!==void 0?"Wafers":"N (region/rest)",notes:[...r.patterns.length?[q]:[],...d?[d]:[]]}}export function findingsTableHtml(e,t,r,a=!1){const{rows:s,coverageHeader:d,notes:o}=findingRows(e,t),i=s.length?s.map(({finding:l,nested:c,region:g,metric:p,delta:h,coverage:m})=>`<tr class="tier-${severityTier(l.severity)}${c?" nested":""}${a?" live":""}"${r!==void 0?` id="${findingAnchor(l.id,r)}"`:""}${a?` data-finding="${n(l.id)}"`:""} title="${n(k(l))}${a?`
|
|
20
50
|
Click to show it on the map`:""}">
|
|
21
|
-
<td class="tight">${renderSeverityMeter(
|
|
22
|
-
<td class="tight">${
|
|
23
|
-
<td>${
|
|
24
|
-
<td class="numeric">${
|
|
25
|
-
<td class="numeric">${
|
|
51
|
+
<td class="tight">${renderSeverityMeter(l.severity)}</td>
|
|
52
|
+
<td class="tight">${n(g)}</td>
|
|
53
|
+
<td>${n(p)}</td>
|
|
54
|
+
<td class="numeric">${n(h)}</td>
|
|
55
|
+
<td class="numeric">${n(m)}</td>
|
|
26
56
|
</tr>`).join(`
|
|
27
57
|
`):'<tr><td colspan="5" class="no-data">No significant findings</td></tr>';return`<table class="report-table findings-table compact">
|
|
28
58
|
<thead>
|
|
29
59
|
<tr>
|
|
30
|
-
<th>
|
|
60
|
+
<th>Strength</th>
|
|
31
61
|
<th>Region</th>
|
|
32
62
|
<th>Metric</th>
|
|
33
63
|
<th class="numeric">Delta</th>
|
|
34
|
-
<th class="numeric">${
|
|
64
|
+
<th class="numeric">${d}</th>
|
|
35
65
|
</tr>
|
|
36
66
|
</thead>
|
|
37
67
|
<tbody>
|
|
38
|
-
${
|
|
68
|
+
${i}
|
|
39
69
|
</tbody>
|
|
40
|
-
</table>${
|
|
41
|
-
|
|
42
|
-
</ol>`:`<p class="synthesis-none">${a(e.nothing??"Nothing stands out.")}</p>`,m=c.length?`<p class="synthesis-smaller">${a(w)}</p>
|
|
43
|
-
<ul class="synthesis-more">
|
|
44
|
-
${c.map(i=>`<li>${renderMeter(i.impact,M(i.impact))}<span>${t(i.brief,i.target)}</span><span class="synthesis-share">${a(k(i))}</span></li>`).join(`
|
|
45
|
-
`)}${l?`
|
|
46
|
-
<li class="synthesis-rest"><span></span><span>and ${l} more</span><span></span></li>`:""}
|
|
47
|
-
</ul>`:"",g=e.possible?.length?`<p class="synthesis-smaller">${a($)}</p>
|
|
48
|
-
<ul class="synthesis-more">
|
|
49
|
-
${e.possible.map(i=>`<li><span>${a(i.text)}</span></li>`).join(`
|
|
70
|
+
</table>${o.map(l=>`<p class="report-note">${n(l)}</p>`).join("")}`}export function synthesisRows(e){const t=R(e),r=(a,s)=>({item:a,impact:A[a.impact],brief:f(a.brief),text:f(a.text),cost:I(a,s)});return[...t.map(a=>r(a,!1)),...(e.possible??[]).map(a=>r(a,!0))]}export function synthesisLowStrengthLine(e,t="in the Findings table below"){const r=e.lowStrengthIds.length;return r?`Low strength: ${r} finding${r===1?"":"s"}${t?`, ${t}`:""}.`:void 0}function J(e,t,r=!0,a=!0,s=!0){const d=(p,h)=>{const m=t(h);return m?`<a href="#${n(m)}">${n(p)}</a>`:n(p)},o=synthesisRows(e).map(p=>`<tr><td class="synthesis-marks"><span class="importance importance-${p.item.impact}" aria-label="Impact: ${n(p.impact)}"><i aria-hidden="true"></i>${n(p.impact)}</span></td><td><span class="synthesis-brief">${d(p.brief,p.item.target)}</span> ${n(p.text)}</td><td class="synthesis-share">${n(p.cost)}</td></tr>`),i=o.length?`<table class="synthesis-table">
|
|
71
|
+
${o.join(`
|
|
50
72
|
`)}
|
|
51
|
-
</
|
|
52
|
-
${
|
|
53
|
-
${
|
|
73
|
+
</table>`:"",l=e.nothing?`<p class="synthesis-none">${n(e.nothing)}</p>`:"",c=synthesisLowStrengthLine(e,s?void 0:""),g=c?`<p class="synthesis-checked">${n(c)}</p>`:"";return`${r?`<p class="synthesis-headline">${n(e.headline)}</p>`:""}
|
|
74
|
+
${l}
|
|
75
|
+
${i}
|
|
54
76
|
${g}
|
|
55
|
-
|
|
77
|
+
${a?`<p class="synthesis-checked">${n(e.checked)}${s?" Every finding is in the Findings table below.":""}</p>`:""}`}const y=`<script>
|
|
56
78
|
(function () {
|
|
57
79
|
var embedded = location.href === 'about:srcdoc';
|
|
58
80
|
var stack = [];
|
|
@@ -96,13 +118,13 @@ ${e.possible.map(i=>`<li><span>${a(i.text)}</span></li>`).join(`
|
|
|
96
118
|
});
|
|
97
119
|
window.addEventListener('popstate', function () { if (stack.length) restore(); });
|
|
98
120
|
})();
|
|
99
|
-
<\/script>`;export function reportScripts(e){return e?`${
|
|
100
|
-
${LIVE_FINDINGS_SCRIPT}`:
|
|
121
|
+
<\/script>`;export function reportScripts(e){return e?`${y}
|
|
122
|
+
${LIVE_FINDINGS_SCRIPT}`:y}export const LIVE_FINDINGS_SCRIPT=`<script>
|
|
101
123
|
document.addEventListener('click', function (e) {
|
|
102
124
|
var row = e.target.closest && e.target.closest('[data-finding]');
|
|
103
125
|
if (row && window.parent !== window) window.parent.postMessage({ wmapFinding: row.getAttribute('data-finding') }, '*');
|
|
104
126
|
});
|
|
105
|
-
<\/script>`;export function formatFindingCoverage(e,
|
|
127
|
+
<\/script>`;export function formatFindingCoverage(e,t){return t!==void 0?`${e.stats.sampleSizeLeft}/${t}`:`${e.stats.sampleSizeLeft}/${e.stats.sampleSizeRight}`}export function reportStyles(e){return`
|
|
106
128
|
:root {
|
|
107
129
|
--report-font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
108
130
|
--report-text: #1f2328;
|
|
@@ -121,10 +143,12 @@ document.addEventListener('click', function (e) {
|
|
|
121
143
|
--report-tier-medium-edge: #a8741a;
|
|
122
144
|
--report-tier-low-bg: #edf2f7;
|
|
123
145
|
--report-tier-low-edge: #5f7f9f;
|
|
124
|
-
--report-low-1: ${u(1)};
|
|
125
|
-
--report-low-2: ${u(2)};
|
|
126
|
-
--report-low-3: ${u(3)};
|
|
127
|
-
--report-bar:
|
|
146
|
+
--report-low-1: ${u(1,e)};
|
|
147
|
+
--report-low-2: ${u(2,e)};
|
|
148
|
+
--report-low-3: ${u(3,e)};
|
|
149
|
+
--report-bar: ${L(F(e).quantity)};
|
|
150
|
+
/* Importance: attention, not failure (red is the fail bins'). */
|
|
151
|
+
--report-attention-edge: #92400e;
|
|
128
152
|
}
|
|
129
153
|
|
|
130
154
|
html {
|
|
@@ -194,6 +218,16 @@ document.addEventListener('click', function (e) {
|
|
|
194
218
|
.synthesis-checked, .synthesis-none { color: var(--report-muted); margin: 0; }
|
|
195
219
|
.synthesis a { color: var(--report-link); text-decoration: underline; text-underline-offset: 2px; }
|
|
196
220
|
.synthesis-see { display: block; margin-top: 4px; color: var(--report-muted); }
|
|
221
|
+
/* An item's impact as the panel shows it: a dot and the level's word (a ring for Low), no tint. */
|
|
222
|
+
.importance { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--report-muted); }
|
|
223
|
+
.importance i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-sizing: border-box; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
|
|
224
|
+
.importance-high { color: var(--report-attention-edge); font-weight: 600; }
|
|
225
|
+
.importance-low i { background: none; border: 1.5px solid currentColor; }
|
|
226
|
+
.synthesis-table { width: 100%; border-collapse: collapse; margin: 0 0 8px; line-height: 1.45; }
|
|
227
|
+
.synthesis-table td { padding: 4px 8px; border-bottom: 1px solid var(--report-line); vertical-align: top; }
|
|
228
|
+
.synthesis-table td.synthesis-marks { width: 6em; color: var(--report-muted); font-size: 12px; white-space: nowrap; }
|
|
229
|
+
.synthesis-table td.synthesis-share { text-align: right; white-space: nowrap; }
|
|
230
|
+
.synthesis-brief { font-weight: 600; }
|
|
197
231
|
|
|
198
232
|
.report-subheading {
|
|
199
233
|
margin: 14px 0 6px;
|
|
@@ -418,6 +452,8 @@ document.addEventListener('click', function (e) {
|
|
|
418
452
|
table.report-table td.low-3 { background: var(--report-low-3); }
|
|
419
453
|
table.report-table td.muted-row, table.report-table td.muted-row .cellbar { color: var(--report-muted); }
|
|
420
454
|
.report-legend { margin: 6px 0 0; color: var(--report-muted); font-size: 11px; }
|
|
455
|
+
.report-headline { margin: 0 0 8px; font-size: 13px; }
|
|
456
|
+
table.report-table td.flagged { color: var(--report-tier-high-edge); font-weight: 600; }
|
|
421
457
|
|
|
422
458
|
.meter {
|
|
423
459
|
display: inline-flex;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { type Die } from '../core/dies.js';
|
|
2
|
+
import { type AggregationMethod } from '../core/aggregates.js';
|
|
3
|
+
import { type TestDef, type WaferMapResult } from '../renderer/buildWaferMap.js';
|
|
4
|
+
import type { ReportSection, ReportValueMap } from './reportBlocks.js';
|
|
5
|
+
import type { SynthesisItem } from './synthesis.js';
|
|
6
|
+
import type { StatsFinding } from './types.js';
|
|
7
|
+
/** How a presentation shows its wafers' bin maps (`ReportContentOptions.maps`). */
|
|
8
|
+
export interface ReportMapOptions {
|
|
9
|
+
/** Hard or soft bins; the data's own (hard when the dies carry them) when absent or when the data has not got them. */
|
|
10
|
+
bins?: 'hard' | 'soft';
|
|
11
|
+
/**
|
|
12
|
+
* Maps to a slide: `'auto'` (as few slides as hold every map at a readable size), or a number, each map as large as that
|
|
13
|
+
* many fit (12 about 180 px, 6 about 230, 2 about 470); 1 is one wafer, large, with its label and the legend.
|
|
14
|
+
*/
|
|
15
|
+
perSlide?: 'auto' | 12 | 6 | 2 | 1;
|
|
16
|
+
/** The wafers in the order loaded, or the lowest yield first. */
|
|
17
|
+
order?: 'loaded' | 'lowest';
|
|
18
|
+
/** The Stacked fails map, before the wafers' own maps: at each die position, the wafers on which it fails (a lot only). */
|
|
19
|
+
stacked?: boolean;
|
|
20
|
+
/** The wafers' own maps; off leaves the Stacked fails map alone (a presentation about where on the wafer). Default on. */
|
|
21
|
+
grid?: boolean;
|
|
22
|
+
/** Stacked maps of the largest fail bins, in the Bin breakdown: 0, 3 or 5 (each the app's Stacked hard bins card). */
|
|
23
|
+
binStacks?: 0 | 3 | 5;
|
|
24
|
+
}
|
|
25
|
+
/** How a presentation shows its test value maps (`ReportContentOptions.valueMaps`). */
|
|
26
|
+
export interface ReportValueMapOptions {
|
|
27
|
+
/** One stacked map per test (Stacked test values), or every wafer's map of each test. A wafer has its own map. */
|
|
28
|
+
layout?: 'stacked' | 'every';
|
|
29
|
+
/** How a stacked map combines the wafers: the app's choice (the gallery's aggregation method); mean when absent. */
|
|
30
|
+
method?: AggregationMethod;
|
|
31
|
+
}
|
|
32
|
+
/** At most this many tests can be named: each adds a slide, or several. */
|
|
33
|
+
export declare const MAX_REPORT_TESTS = 6;
|
|
34
|
+
/** The Stacked fails map of these wafers (`stackFails`), each judged by its own pass bins. */
|
|
35
|
+
export declare function failStackMap(sources: readonly WaferMapResult[]): ReportValueMap | undefined;
|
|
36
|
+
/** The Stacked test values map of one test (`stackTestValues`), combined as the app combines them. */
|
|
37
|
+
export declare function stackedValueMap(sources: readonly WaferMapResult[], def: TestDef, method: AggregationMethod): ReportValueMap | undefined;
|
|
38
|
+
/** Each wafer's Test value map of one test, each with its own colour bar, as the gallery's cards have them. */
|
|
39
|
+
export declare function everyWaferValueMaps(sources: readonly WaferMapResult[], def: TestDef): Array<ReportValueMap | undefined>;
|
|
40
|
+
/** The tests a presentation is about when none are chosen: the first few the analysis points at. */
|
|
41
|
+
export declare const POINTED_TESTS = 3;
|
|
42
|
+
/**
|
|
43
|
+
* The tests a presentation's one-test charts and value maps are of: the parametric ones chosen; else the tests the
|
|
44
|
+
* analysis points at (`pointedTests`, the rule Insights' Distributions opens on), at most `POINTED_TESTS`.
|
|
45
|
+
*/
|
|
46
|
+
export declare function presentationTests(testDefs: readonly TestDef[], chosen: readonly number[] | undefined, items: readonly SynthesisItem[], findings: readonly StatsFinding[], diesByWafer: readonly (readonly Die[])[]): TestDef[];
|
|
47
|
+
/** A test's name as a heading: its name, and its unit unless the name states it (`nameStatesUnit`: iddq_uA). */
|
|
48
|
+
export declare const testHeading: (def: Pick<TestDef, "name" | "unit">) => string;
|
|
49
|
+
/**
|
|
50
|
+
* The test value map sections, one per test, so each test's heading is on its slide: a lot's Stacked test values map (or
|
|
51
|
+
* every wafer's map in a grid labelled by wafer), a wafer's own map.
|
|
52
|
+
*/
|
|
53
|
+
export declare function valueMapSections(sources: readonly WaferMapResult[], labels: readonly string[], tests: readonly TestDef[], options: ReportValueMapOptions): ReportSection[];
|
|
54
|
+
/** The wafers' order for their maps: as loaded, or the lowest yield first (a wafer with no yield last). */
|
|
55
|
+
export declare function mapOrder<T>(entries: readonly T[], yieldOf: (e: T) => number | null, order: ReportMapOptions['order']): T[];
|
|
56
|
+
/**
|
|
57
|
+
* Stacked maps of a lot's largest fail bins, each the app's Stacked hard (or soft) bins card for that bin: at each die
|
|
58
|
+
* position, the wafers that had the bin there. `bins` are the fail bins, largest first.
|
|
59
|
+
*/
|
|
60
|
+
export declare function binStackMaps(sources: readonly WaferMapResult[], bins: ReadonlyArray<{
|
|
61
|
+
bin: number;
|
|
62
|
+
name?: string;
|
|
63
|
+
}>, space: 'hard' | 'soft'): Array<{
|
|
64
|
+
figure: ReportValueMap;
|
|
65
|
+
label: string;
|
|
66
|
+
}>;
|
|
67
|
+
//# sourceMappingURL=reportMaps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isPositionedDie as k}from"../core/dies.js";import{aggregateBinCounts as v}from"../core/aggregates.js";import{testValue as m}from"../core/dieTable.js";import{isParametricTest as $}from"../renderer/buildWaferMap.js";import{stackFails as S,stackTestValues as b}from"../renderer/stacks.js";import{nameStatesUnit as x}from"../renderer/fmt.js";import{pointedTests as w}from"./worthItems.js";export const MAX_REPORT_TESTS=6;const u=t=>t.dies.filter(a=>k(a)&&!a.filteredOut);function p(t,a,n){return{wafer:t.wafer,dies:a,testDefs:[n],passBins:[...t.passBins],ringCount:t.ringCount,reticles:t.reticles,dataAxisFlip:t.dataAxisFlip}}export function failStackMap(t){if(t.length<2)return;const a=S(t.map(n=>({dies:u(n),passBins:n.passBins})));if(a.dies.some(n=>m(n,0)!==void 0))return{kind:"value-map",mode:"stackedFails",map:p(t[0],a.dies,a.testDef),test:0,lotSize:t.length,aggrMethod:"countBin"}}export function stackedValueMap(t,a,n){const e=b(t.map(u),n,a);if(e.dies.some(i=>m(i,0)!==void 0))return{kind:"value-map",mode:"stackedValues",map:p(t[0],e.dies,e.testDef),test:0,lotSize:t.length,aggrMethod:n}}export function everyWaferValueMaps(t,a){return t.map(n=>n.dies.some(e=>m(e,a.testNumber)!==void 0)?{kind:"value-map",mode:"value",map:n,test:a.testNumber}:void 0)}export const POINTED_TESTS=3;export function presentationTests(t,a,n,e,i){const o=t.filter($),l=new Map(o.map(s=>[s.testNumber,s]));return(a?.length?a.filter(s=>l.has(s)).slice(0,MAX_REPORT_TESTS):w(n,e,o,i,POINTED_TESTS)).map(s=>l.get(s))}export const testHeading=t=>t.unit&&!x(t.name,t.unit)?`${t.name} (${t.unit})`:t.name;export function valueMapSections(t,a,n,e){const i=t.length>1,o=e.method??"mean",l={kind:"text",style:"legend",text:i&&e.layout!=="every"?`Each die position shows the ${o} of its values over the ${t.length} wafers, as the Stacked test values mode shows it.`:"Each map has its own colour bar: the test\u2019s limits when it has both, else that wafer\u2019s values. \u25BD and \u25B3 mark values below and above a limit."};return n.flatMap(r=>{const s=`Test value map \u2014 ${testHeading(r)}`;if(i&&e.layout==="every"){const d=everyWaferValueMaps(t,r).flatMap((c,g)=>c?[{figure:c,label:a[g]}]:[]);return d.length?[{id:"value-maps",title:s,blocks:[{kind:"figures",figures:d,legend:[]},l]}]:[]}const f=i?stackedValueMap(t,r,o):everyWaferValueMaps(t,r)[0];if(!f)return[];const h=i?`${o} of ${r.name} at each die position over ${t.length} wafers`:`${r.name} at each die`;return[{id:"value-maps",title:s,blocks:[{kind:"figure",figure:f,alt:`Map of the ${h}`,legend:[]},l]}]})}export function mapOrder(t,a,n){return n!=="lowest"?[...t]:t.map((e,i)=>({e,i,y:a(e)})).sort((e,i)=>(e.y??1/0)-(i.y??1/0)||e.i-i.i).map(e=>e.e)}export function binStackMaps(t,a,n){return t.length<2?[]:a.map(({bin:e,name:i})=>{const o=v(t.map(u),e,n),l=`${n==="soft"?"Soft bin":"Hard bin"} ${e}${i?` \xB7 ${i}`:""}`,r={testNumber:0,name:`Wafers in ${l} (of ${t.length})`},s={...p(t[0],o,r),...n==="soft"?{sbinDefs:[{bin:e,name:i??""}]}:{hbinDefs:[{bin:e,name:i??""}]}};return{figure:{kind:"value-map",mode:n==="soft"?"stackedSoftBins":"stackedBins",map:s,test:0,lotSize:t.length,aggrMethod:"countBin"},label:l}})}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ReportSectionId } from './reportBlocks.js';
|
|
2
|
+
import type { OverviewGroup } from './overview.js';
|
|
3
|
+
export type ReportScope = 'wafer' | 'lot';
|
|
4
|
+
export interface ReportSectionInfo {
|
|
5
|
+
id: ReportSectionId;
|
|
6
|
+
/** Its name in a list of contents, and the heading of its charts in a report. */
|
|
7
|
+
label: string;
|
|
8
|
+
/** Why a report of this data has none of it: said beside it, greyed, in a list of contents. */
|
|
9
|
+
empty: string;
|
|
10
|
+
/**
|
|
11
|
+
* The Insights Overview group it belongs to (Yield, Bins, Tests, Where, Why), as the Overview places what it shows; none
|
|
12
|
+
* for the sections every presentation shares (at a glance, Worth a look) and the details at the end.
|
|
13
|
+
*/
|
|
14
|
+
group?: OverviewGroup;
|
|
15
|
+
/** A presentation's only: the printed Summary report leaves it out unless it is asked for by name. */
|
|
16
|
+
presentation?: true;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Every section of a report, in the report's own order (the order a report has when none is chosen): the lot at a glance
|
|
20
|
+
* and Worth a look; then the Overview's groups, Yield, Bins, Tests, Where and Why, in its order; then the details.
|
|
21
|
+
*/
|
|
22
|
+
export declare const REPORT_SECTIONS: Readonly<Record<ReportScope, readonly ReportSectionInfo[]>>;
|
|
23
|
+
/**
|
|
24
|
+
* The charts each Insights Overview group shows (as its section draws them), for the ready-made presentation of that group.
|
|
25
|
+
* Charts the Overview shows only when the data has them (Reticle cell yield, Yield by site, Re-probed dies) are left out: a
|
|
26
|
+
* ready-made presentation never lists as "not included" a chart its data cannot draw. tests/presentationPresets.test.mjs
|
|
27
|
+
* holds this to the Overview.
|
|
28
|
+
*/
|
|
29
|
+
export declare const OVERVIEW_CHARTS: Readonly<Record<ReportScope, Readonly<Record<OverviewGroup, readonly string[]>>>>;
|
|
30
|
+
/** A section's Overview group, when it has one. */
|
|
31
|
+
export declare const sectionGroup: (id: ReportSectionId, scope: ReportScope) => OverviewGroup | undefined;
|
|
32
|
+
/** Sections that hold only charts: offered whatever the data, as the charts are the host's choice. */
|
|
33
|
+
export declare const CHART_ONLY_SECTIONS: ReadonlySet<ReportSectionId>;
|
|
34
|
+
/**
|
|
35
|
+
* The catalogue's id for a card on screen: its own, except the pass-rate cards, one per judgement (`card-pass-rate-spec`,
|
|
36
|
+
* `-testFlag`, `-functional`), which the catalogue lists once as `card-pass-rate`.
|
|
37
|
+
*/
|
|
38
|
+
export declare const catalogueCardId: (cardId: string) => string;
|
|
39
|
+
/**
|
|
40
|
+
* The charts that show one test at a time (the test Insights' Distributions opens on, or the one picked there): a
|
|
41
|
+
* presentation draws one of each per test it is about. A presentation's fact, kept here beside the sections and not in the
|
|
42
|
+
* chart catalogue, which the report builders (in the root entry) do not load; tests/reportContents.test.mjs holds both
|
|
43
|
+
* tables to the catalogue.
|
|
44
|
+
*/
|
|
45
|
+
export declare const ONE_TEST_CHARTS: ReadonlySet<string>;
|
|
46
|
+
/** @internal Every chart the table places, for the test that holds it to the catalogue. */
|
|
47
|
+
export declare const CHART_SECTION_IDS: readonly string[];
|
|
48
|
+
/**
|
|
49
|
+
* The section a chart belongs to in a report of this kind. A wafer report has no per-wafer yield section, so its yield
|
|
50
|
+
* charts are the summary's; a chart the table does not place (a user's own plot) is under My plots.
|
|
51
|
+
*/
|
|
52
|
+
export declare function chartSection(cardId: string, scope: ReportScope): ReportSectionId;
|
|
53
|
+
/** A section's name, as a list of contents and a report's charts heading give it. */
|
|
54
|
+
export declare const sectionLabel: (id: ReportSectionId, scope: ReportScope) => string;
|
|
55
|
+
//# sourceMappingURL=reportSections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=(a,s,t,n)=>({id:a,label:s,empty:t,...n?{group:n}:{}}),r=a=>({...a,presentation:!0}),I=e("summary","The lot at a glance","nothing to summarise"),E=e("summary","The wafer at a glance","nothing to summarise"),i=e("highlights","Worth a look","the data was not analysed"),o=r(e("items","Worth a look, item by item","nothing is worth a look")),c=e("bins","Bin breakdown","the dies carry no bins","bins"),d=r(e("bins-by-test","Tests behind each bin","no failing die fails a judged test","bins")),l=e("test-values","Test values","no parametric test has values","tests"),y=e("value-maps","Test value maps","no parametric test has values","tests"),f=e("functional-tests","Functional tests","no functional tests","tests"),h=e("capability","Process capability","no parametric test has values","tests"),p=e("correlation","Test correlation","charts only","tests"),b=e("regions","Ring and quadrant yield","the dies carry no bins","where"),w=r(e("sites","Test sites","one test site","where")),u=r(e("compared","What was compared","the data was not analysed")),g=e("my-plots","My charts","charts only"),m=e("wafer-info","Wafer info","the wafers record no fields"),S=e("findings","Findings","nothing was found");export const REPORT_SECTIONS={wafer:[E,i,o,e("wafer-map","Wafer map","the dies carry no bins","yield"),c,d,l,y,f,h,p,b,w,u,g,m,S],lot:[I,i,o,e("wafer-yield","Per-wafer yield","no wafer has a yield","yield"),e("gallery","Wafer maps","the dies carry no bins","yield"),c,d,l,y,f,h,p,b,w,r(e("divides","What divides yield","no wafer field can be compared","why")),e("group-comparison","Group comparison","no wafer field divides the lot","why"),u,g,m,S,e("findings-by-wafer","Findings by wafer","no wafer has findings of its own")]},OVERVIEW_CHARTS={lot:{yield:["card-yield","card-bins-by-wafer"],bins:["card-bin-pareto"],tests:["card-pass-rate"],where:["card-ring-wafer","card-ring-yield","card-quadrant-wafer","card-quadrant-yield"],why:[]},wafer:{yield:[],bins:["card-bin-pareto"],tests:["card-pass-rate"],where:["card-ring-yield","card-quadrant-yield"],why:[]}},sectionGroup=(a,s)=>REPORT_SECTIONS[s].find(t=>t.id===a)?.group,CHART_ONLY_SECTIONS=new Set(["correlation","my-plots"]),catalogueCardId=a=>a.startsWith("card-pass-rate-")?"card-pass-rate":a;const T={"card-yield":"wafer-yield","card-bins-by-wafer":"wafer-yield","card-site":"sites","card-reprobed":"sites","card-bin-pareto":"bins","card-pass-rate":"test-values","card-tests-wafer":"test-values","card-box":"test-values","card-box-site":"sites","card-probability":"test-values","card-histogram":"test-values","card-trend":"test-values","card-ring-yield":"regions","card-ring-wafer":"regions","card-quadrant-yield":"regions","card-quadrant-wafer":"regions","card-reticle-yield":"regions","card-capability":"capability","card-scatter":"correlation","card-correlation":"correlation"};export const ONE_TEST_CHARTS=new Set(["card-histogram","card-box","card-box-site","card-probability","card-trend"]),CHART_SECTION_IDS=Object.keys(T);export function chartSection(a,s){const t=T[catalogueCardId(a)]??"my-plots";return t==="wafer-yield"&&s==="wafer"?"summary":t}export const sectionLabel=(a,s)=>REPORT_SECTIONS[s].find(t=>t.id===a)?.label??a;
|
|
@@ -173,14 +173,22 @@ export interface SweepData {
|
|
|
173
173
|
*/
|
|
174
174
|
notMeasured?: string;
|
|
175
175
|
}
|
|
176
|
+
/** A run of tests that read as one sweep: one unit, one name with only the swept number changing. */
|
|
177
|
+
export interface SweepRun {
|
|
178
|
+
/** The name with the swept number replaced by `{x}`: also the series' `xFromName` pattern. */
|
|
179
|
+
pattern: string;
|
|
180
|
+
/** The tests, in order of their swept value. */
|
|
181
|
+
tests: number[];
|
|
182
|
+
unit?: string;
|
|
183
|
+
/** The swept quantity's unit, when the name writes one right after the number. */
|
|
184
|
+
xUnit?: string;
|
|
185
|
+
}
|
|
176
186
|
/**
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
* defined after a different lot was loaded. Internal: the Sweeps tab and the
|
|
181
|
-
* sweep card say so themselves.
|
|
187
|
+
* The runs of parametric tests in a program that form a sweep: at least `minTests` tests sharing a unit and a name that
|
|
188
|
+
* differs only in one number ("Fmax @ 0.65V" … "Fmax @ 0.95V"), longest first. A series must be one quantity, so tests
|
|
189
|
+
* are never grouped across units; a name with no number is in no run.
|
|
182
190
|
*/
|
|
183
|
-
export declare function
|
|
191
|
+
export declare function sweepRuns(testDefs: readonly TestDef[] | undefined, minTests?: number): SweepRun[];
|
|
184
192
|
/** Whether two test names are the same test's name: case and surrounding space do not count. */
|
|
185
193
|
export declare const sameTestName: (a: string, b: string) => boolean;
|
|
186
194
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isYieldEligibleDie as
|
|
1
|
+
import{isYieldEligibleDie as ee}from"../core/dies.js";import{testValue as te}from"../core/dieTable.js";import{isParametricTest as V}from"../renderer/buildWaferMap.js";import{markedTestLabel as ne,derivedFields as se}from"../renderer/testLabel.js";import{parseTestReference as ie}from"../renderer/derivedTests/parser.js";import{quantile as C}from"./math.js";import{compileXNamePattern as D,readXFromName as E}from"./sweepXFromName.js";function L(r,u,s){const e=[];let t=!1;for(const o of r.tests){if(typeof o=="number"){Number.isInteger(o)?e.push(o):s.push(`"${r.label}": ${o} is not a test number.`);continue}const n=ie(String(o),u);if(!n.ok){s.push(`"${r.label}": "${o}" \u2014 ${n.message}.`);continue}n.range&&(t=!0),e.push(...n.tests)}return{spec:r,tests:e,usedRange:t}}const oe=["V","mV","A","mA","uA","\xB5A","Hz","kHz","MHz","GHz","C","\xB0C","dBm","dB","s","ms","us","ns","W","mW","\u03A9","ohm"];export function sweepRuns(r,u=3){const s=new Map;for(const e of r??[]){if(!V(e)||!e.name)continue;const t=/(?:(?<![A-Za-z0-9])-)?\d+(?:\.\d+)?/.exec(e.name);if(!t)continue;const o=e.name.slice(0,t.index)+"{x}"+e.name.slice(t.index+t[0].length),n=e.unit?.trim()||void 0,a=`${n??""}\0${o.toLowerCase()}`,l=s.get(a)??{pattern:o,unit:n,members:[]};l.members.push({test:e.testNumber,x:Number(t[0])}),s.set(a,l)}return[...s.values()].filter(e=>e.members.length>=u&&new Set(e.members.map(t=>t.x)).size===e.members.length).map(e=>{const t=/^[A-Za-zµΩ°]+/.exec(e.pattern.slice(e.pattern.indexOf("{x}")+3))?.[0];return{pattern:e.pattern,tests:[...e.members].sort((o,n)=>o.x-n.x).map(o=>o.test),...e.unit?{unit:e.unit}:{},...t&&oe.includes(t)?{xUnit:t}:{}}}).sort((e,t)=>t.tests.length-e.tests.length||e.tests[0]-t.tests[0])}export const sameTestName=(r,u)=>r.trim().toLowerCase()===u.trim().toLowerCase();export function recordSweepTestNames(r,u){const s=new Map((u??[]).map(e=>[e.testNumber,e]));return{...r,series:r.series.map(e=>{const t={};for(const a of L(e,s,[]).tests){const l=s.get(a)?.name;l&&(t[String(a)]=l)}const{testNames:o,...n}=e;return Object.keys(t).length>0?{...n,testNames:t}:n})}}function Y(r,u=16){return r.length<=u?r.join(", "):`${r.slice(0,u).join(", ")}, \u2026 (${r.length-u} more)`}function re(r,u,s=3){const e=o=>o.length>70?`${o.slice(0,69)}\u2026`:o;return r.slice(0,s).map(o=>{const n=u.get(o);return n===void 0?`${o} (not in this data)`:`${o} "${e(n.name)}"`}).join(", ")+(r.length>s?`, \u2026 (${r.length-s} more)`:"")}export function previewXFromName(r,u,s=4){const e=new Map((u??[]).map(a=>[a.testNumber,a])),t=L(r,e,[]).tests,o=D(r.xFromName??"");return{rows:t.slice(0,s).map(a=>{const l=e.get(a)?.name;return{test:a,name:l,x:"error"in o||l===void 0?null:E(o,l)}}),total:t.length,..."error"in o?{error:o.error}:{}}}function ae(r,u){const s=r?.[u];return s!==void 0&&Number.isFinite(s)?s:u}function ue(r,u,s){const e=r.spec;if(e.xValues!==void 0&&e.xFromName!==void 0)return s.push(`"${e.label}": gives both xValues and xFromName \u2014 use one.`),{asked:!0};if(e.xValues!==void 0){const t=e.xValues.length;return t===r.tests.length?{xs:e.xValues,asked:!0}:(s.push(r.usedRange?`"${e.label}": ${t} x values for ${r.tests.length} tests \u2014 the ranges matched ${Y(r.tests)}.`:`"${e.label}": ${t} x values for ${r.tests.length} tests.`),{asked:!0})}if(e.xFromName!==void 0){const t=D(e.xFromName);if("error"in t)return s.push(`"${e.label}": xFromName "${e.xFromName}" \u2014 ${t.error}.`),{asked:!0};const o=[],n=[],a=[];for(const l of r.tests){const c=u.get(l)?.name,d=c===void 0?null:E(t,c);typeof d=="number"?o.push(d):(n.push(l),d!==null&&a.push(d.ambiguous))}return n.length>0?(s.push(`"${e.label}": xFromName "${e.xFromName}" found no x value in the name of ${n.length===1?"test":"tests"} ${Y(n)}`+(a.length>0?` \u2014 "${a[0]}" is written in capitals, where M could be milli or mega; put the letter in the pattern ("\u2026{x}M\u2026") and the unit in xLabel.`:".")+` The names are: ${re(n,u)}.`),{asked:!0}):{xs:o,asked:!0}}return{asked:!1}}function le(r,u,s){const e=new Map;for(let t=0;t<s.length;t++){const o=e.get(s[t]);if(o!==void 0)return`"${r}": tests ${u[o]} and ${u[t]} have the same x value (${s[t]}) \u2014 a curve cannot be measured where it revisits an x.`;e.set(s[t],t)}return null}function Z(r,u){const s=r.filter(e=>e.count>0);for(let e=1;e<s.length;e++){const t=s[e-1],o=s[e],n=Math.min(t.median,o.median),a=Math.max(t.median,o.median);if(u<n||u>a)continue;if(t.median===o.median)return t.x;const l=(u-t.median)/(o.median-t.median);return t.x+l*(o.x-t.x)}return null}function me(r,u){const s=new Map(u.filter(n=>n.count>0).map(n=>[n.x,n])),e=[];for(const n of r){if(n.count===0)continue;const a=s.get(n.x);a!==void 0&&e.push({x:n.x,d:n.median-a.median,y:n.median})}if(e.length<2)return null;const t=[];for(let n=0;n<e.length;n++){const a=e[n];if(a.d===0){t.push({x:a.x,y:a.y});continue}if(n===0)continue;const l=e[n-1];if(l.d===0||l.d<0==a.d<0)continue;const c=l.d/(l.d-a.d);t.push({x:l.x+c*(a.x-l.x),y:l.y+c*(a.y-l.y)})}const o=t[0];return o===void 0?null:{x:o.x,y:o.y,multiple:t.length>1}}export function buildSweepData(r,u,s){const e=[],t=new Map((u??[]).map(i=>[i.testNumber,i])),o=r.filter(i=>ee(i)),n=s.series.map(i=>L(i,t,e)),a=n.map(i=>ue(i,t,e)),l=n.length>0&&a.every(i=>i.xs!==void 0),c=!l&&a.some(i=>i.asked);c&&a.some(i=>!i.asked)&&e.push("x values are given for some series but not all.");const d=l?n.map((i,m)=>le(i.spec.label,i.tests,a[m].xs)).find(i=>i!==null)??null:null;d!==null&&e.push(d);const z=s.xScale==="log",j=l&&a.every(i=>i.xs.every(m=>m>0)),$=z&&j?"log":"linear";z&&!j&&e.push(l?"A log x axis needs every x value to be positive \u2014 drawn on a linear axis.":"A log x axis needs x values (xValues or xFromName) \u2014 drawn in test order.");let w=0;const U=n.map(({spec:i,tests:m},g)=>{const v=l?a[g].xs:void 0,f=[],I=[...new Set(m.flatMap(h=>{const y=t.get(h)?.unit?.trim();return y?[y]:[]}))],O=I.length>1;O&&e.push(`"${i.label}": its tests measure different units (${I.join(", ")}), so it is not drawn. A series is one quantity: put tests of one unit in it.`);const Q=m.map((h,y)=>{const p=t.get(h),S=i.testNames?.[String(h)],W=p!==void 0&&!!S&&!!p.name&&!sameTestName(S,p.name);W?(f.push(`${h} is "${S}" in this sweep and "${p.name}" here`),w++):p===void 0?e.push(`"${i.label}": test ${h} is not in this program's test definitions.`):V(p)||e.push(`"${i.label}": test ${h} is functional and has no measured value.`);const x=[];if(p!==void 0&&V(p)&&!W&&!O)for(const T of o){const b=te(T,h);b!==void 0&&Number.isFinite(b)&&x.push(b)}return x.sort((T,b)=>T-b),{testNumber:h,label:ne(p,h),...se(p),x:ae(v,y),median:x.length?C(x,.5):NaN,p10:x.length?C(x,.1):NaN,p90:x.length?C(x,.9):NaN,count:x.length}});return f.length>0&&e.push(`"${i.label}": ${f.length} test${f.length!==1?"s are":" is"} not the one this sweep was set up on, so ${f.length!==1?"they are":"it is"} not drawn (${f.slice(0,3).join("; ")}${f.length>3?"; \u2026":""}). It may belong to another test program.`),{label:i.label,color:i.color,points:Q}}),[X,P]=U,N=X!==void 0&&P!==void 0&&!c&&d===null&&w===0,_=s.crossing??!0,G=i=>$==="log"?Math.log10(i):i,A=i=>$==="log"?10**i:i,R=i=>i.map(m=>({...m,x:G(m.x)})),q=N?R(X.points):[],B=N?R(P.points):[],J=(c||d!==null||w>0?[]:s.separationAt??[]).map(i=>{if(!N)return{y:i,distance:null};const m=Z(q,i),g=Z(B,i);if(m===null)return{y:i,distance:null,reason:"first-series-never-reaches"};if(g===null)return{y:i,distance:null,reason:"second-series-never-reaches"};const v=A(m),f=A(g);return{y:i,distance:Math.abs(f-v),from:v,to:f,...$==="log"?{ratio:10**Math.abs(m-g)}:{}}}),M=N&&_?me(q,B):null,K=M&&{...M,x:A(M.x)},H=i=>i===void 0?void 0:t.get(i.tests[0]??-1)?.unit,k=H(n[0]),F=H(n[1]);return k!==void 0&&F!==void 0&&k!==F&&e.push(`Series measure different units (${k} and ${F}) \u2014 crossing and separation compare unlike quantities.`),{title:s.title,xLabel:c?"Test":s.xLabel??(l?"Sweep value":"Test"),yLabel:s.yLabel??"Value",series:U,xIsPhysical:l,...l&&s.xUnit?{xUnit:s.xUnit}:{},xScale:$,crossing:K,separations:J,dieCount:o.length,warnings:e,...w>0?{notMeasured:"some tests are not the ones this sweep was set up on, so the crossing and widths are not measured"}:c&&s.series.length>=2?{notMeasured:"x values do not match the tests, so the sweep is drawn in test order and the crossing and widths are not measured"}:d!==null&&s.series.length>=2?{notMeasured:"a series revisits an x value, so its points cannot be paired with the other series"}:{}}}
|