@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{quantile as
|
|
1
|
+
import{quantile as v}from"./math.js";import{formatDay as D}from"../renderer/timeAxis.js";import{WAFER_WORDS as m,cap as N}from"./plotWords.js";import{probabilityPosition as M}from"./plotData.js";const b=(e,t)=>e?e.unit?`${e.label} (${e.unit})`:e.label:t,f=e=>Number.isFinite(e)?e:null,g=(e,t)=>e?.time&&Number.isFinite(t)?D(t):f(t),E=e=>e.map((t,h)=>({header:t,get:w=>w[h]??null}));export function fileStem(e){return e.normalize("NFKD").replace(/[^\p{L}\p{N}]+/gu,"-").replace(/^-+|-+$/g,"").slice(0,80)||"plot"}function C(e,t,h){const w=n=>e.groups[n]??"",x=e.groups.length>1&&!e.colorIsX,r=x?[e.colorLabel??"Group"]:[],d=n=>x?[w(n)]:[];switch(t.type){case"scatter":{const n=t.points.some(o=>o.die&&o.die.x!==void 0),l=[N((e.words??m).row.one),...n?["Die X","Die Y"]:[],b(e.x,"X"),b(e.y,"Y"),...r,...e.colorScale?[e.colorScale.label]:[]],i=t.points.map(o=>[h(o.item),...n?[o.die?.x??null,o.die?.y??null]:[],g(e.x,o.x),g(e.y,o.y),...d(o.group),...e.colorScale?[o.value===void 0?null:f(o.value)]:[]]);return{headers:l,rows:i}}case"histogram":case"probability":{const n=t.type==="probability",s=t.values.flatMap((a,c)=>a.map((u,p)=>t.unit(t.units[c][p]).die)).some(a=>a&&a.x!==void 0),i=[N((e.words??m).row.one),...s?["Die X","Die Y"]:[],...r,b(e.x,"Value"),...n?["Cumulative share (%)"]:[]],o=[];return t.values.forEach((a,c)=>{a.forEach((u,p)=>{const y=t.unit(t.units[c][p]);o.push([h(y.item),...s?[y.die?.x??null,y.die?.y??null]:[],...d(c),f(u),...n?[100*M(p,a.length)]:[]])})}),{headers:i,rows:o}}case"box":{const s=[...t.nest?.levels??[e.x?.label??"Category"],...r,"N","Min","Q1","Median","Q3","Max"],l=[];return t.categories.forEach((i,o)=>{t.cells.forEach((a,c)=>{const u=a[o].filter(Number.isFinite).sort((y,F)=>y-F);if(u.length===0)return;const p=t.nest?t.nest.parts[o]:[i];l.push([...p,...d(c),u.length,u[0],v(u,.25),v(u,.5),v(u,.75),u[u.length-1]])})}),{headers:s,rows:l}}case"bar":{const s=[...t.nest?.levels??[e.x?.label??"Category"],...r,b(e.y,"Value"),"N",...t.cumulative?["Cumulative share (%)"]:[]],l=[];return t.categories.forEach((i,o)=>{t.values.forEach((a,c)=>{const u=a[o];if(!Number.isFinite(u))return;const p=t.nest?t.nest.parts[o]:[i];l.push([...p,...d(c),u,t.cells[c]?.[o]?.length??null,...t.cumulative?[f(t.cumulative[o])]:[]])})}),{headers:s,rows:l}}case"line":{const n=t.band,s=[b(e.x,"X"),...r,b(e.y,"Value"),"N",...n?["Band low","Band high"]:[]],l=[];return t.xs.forEach((i,o)=>{t.values.forEach((a,c)=>{const u=a[o];Number.isFinite(u)&&l.push([g(e.x,i),...d(c),g(e.y,u),t.counts[c]?.[o]??null,...n?[f(n.lo[c][o]),f(n.hi[c][o])]:[]])})}),{headers:s,rows:l}}case"control":{const n=new Map(t.violations.map(i=>[i.index,i.rules.join(" ")])),s=[b(e.x,"Order"),N((e.words??m).row.one),b(e.y,"Value"),"Centre","Lower limit","Upper limit","Rules broken"],l=t.xs.map((i,o)=>[g(e.x,i),h(t.items[o]),g(e.y,t.values[o]),t.limits.centre,t.limits.lcl,t.limits.ucl,n.get(o)??""]);return{headers:s,rows:l}}case"heatmap":{const n=[e.y?.label??"Row",e.x?.label??"Column",e.colorScale?.label??"Value","N"],s=[];return t.rows.forEach((l,i)=>t.cols.forEach((o,a)=>{const c=t.values[i][a];Number.isFinite(c)&&s.push([l,o,c,t.cellUnits[i][a].length])})),{headers:n,rows:s}}case"goal":{const n=["Test number","Test",...r,"Mean offset (share of limit window)","Spread (share of limit window)","Ppk","N","Limits"],s=t.points.map(l=>[l.testNumber,l.label,...d(l.group),f(l.x),f(l.y),f(l.ppk),l.n,l.basis==="spec"?"spec":"test"]);return{headers:n,rows:s}}}}export function plotTable(e,t){const h=r=>t(r)??"",w=fileStem(e.spec.title??e.autoTitle);if(e.facets?.length){let r;const d=[];for(const n of e.facets){if(!n.plot.marks)continue;const s=C(n.plot,n.plot.marks,h);if(s){r??=[e.facetLabel??"Panel",...s.headers];for(const l of s.rows)d.push([n.label,...l])}}return r?{name:w,columns:E(r),rows:d}:void 0}if(!e.marks)return;const x=C(e,e.marks,h);return x?{name:w,columns:E(x.headers),rows:x.rows}:void 0}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/** A thing and its plural: "wafer", "wafers". */
|
|
2
|
+
export interface Noun {
|
|
3
|
+
one: string;
|
|
4
|
+
many: string;
|
|
5
|
+
}
|
|
6
|
+
export interface PlotWords {
|
|
7
|
+
/** What one row of the table is: wafer. */
|
|
8
|
+
row: Noun;
|
|
9
|
+
/**
|
|
10
|
+
* What a row's counts are counts of: die. `null` when the rows have no counts, so nothing is said about how many
|
|
11
|
+
* items they hold and no field offers one.
|
|
12
|
+
*/
|
|
13
|
+
item: Noun | null;
|
|
14
|
+
/** The outcome of an item: `field` names it as a field ("Hard bin"), `value` prefixes a number ("Bin 3"). */
|
|
15
|
+
outcome: {
|
|
16
|
+
field: string;
|
|
17
|
+
value: string;
|
|
18
|
+
};
|
|
19
|
+
/** The share of items with a good outcome: Yield. */
|
|
20
|
+
rate: string;
|
|
21
|
+
/** Names for outcomes by number, in place of "Bin 3": `{ 1: 'On time', 2: 'Late' }`. */
|
|
22
|
+
outcomeNames?: Readonly<Record<number, string>>;
|
|
23
|
+
}
|
|
24
|
+
export declare const WAFER_WORDS: PlotWords;
|
|
25
|
+
/**
|
|
26
|
+
* What a host may say: any part, a noun as one word (made plural by adding "s") or as `[one, many]`.
|
|
27
|
+
* @experimental May change or be removed without notice.
|
|
28
|
+
*/
|
|
29
|
+
export interface PlotWordsInput {
|
|
30
|
+
row?: string | readonly [string, string] | Noun;
|
|
31
|
+
item?: string | readonly [string, string] | Noun | null;
|
|
32
|
+
/** The field's name; or `{ field, value }` to name the prefix of a number as well ("Outcome", "Order"). */
|
|
33
|
+
outcome?: string | {
|
|
34
|
+
field?: string;
|
|
35
|
+
value?: string;
|
|
36
|
+
};
|
|
37
|
+
rate?: string;
|
|
38
|
+
outcomeNames?: Readonly<Record<string | number, string>>;
|
|
39
|
+
}
|
|
40
|
+
/** The words of a host, over the wafer words where it said nothing. */
|
|
41
|
+
export declare function resolveWords(input?: PlotWordsInput): PlotWords;
|
|
42
|
+
/** A sentence-initial form: "wafer" as "Wafer". */
|
|
43
|
+
export declare const cap: (s: string) => string;
|
|
44
|
+
/** The noun for a count: "1 wafer", "72 wafers". */
|
|
45
|
+
export declare const counted: (n: number, noun: Noun) => string;
|
|
46
|
+
/** An outcome as a category reads: its name where the host gave one, else "Bin 3". */
|
|
47
|
+
export declare const outcomeLabel: (w: PlotWords, bin: number) => string;
|
|
48
|
+
/** The number an outcome label stands for, by its name or by "Bin 3"; `undefined` for any other label. */
|
|
49
|
+
export declare function outcomeOfLabel(w: PlotWords, label: string): number | undefined;
|
|
50
|
+
/** Whether these are the wafer words, for text that must stay exactly as it always was. */
|
|
51
|
+
export declare const isWaferWords: (w: PlotWords) => boolean;
|
|
52
|
+
//# sourceMappingURL=plotWords.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const WAFER_WORDS={row:{one:"wafer",many:"wafers"},item:{one:"die",many:"dies"},outcome:{field:"Hard bin",value:"Bin"},rate:"Yield"};const c=e=>typeof e=="string"?{one:e,many:`${e}s`}:Array.isArray(e)?{one:e[0],many:e[1]}:e;export function resolveWords(e){if(!e)return WAFER_WORDS;const o=e.outcome,t={};for(const[r,n]of Object.entries(e.outcomeNames??{}))typeof n=="string"&&n.trim()!==""&&/^\d+$/.test(r)&&(t[Number(r)]=n);return{row:e.row===void 0?WAFER_WORDS.row:c(e.row),item:e.item===void 0?WAFER_WORDS.item:e.item===null?null:c(e.item),outcome:typeof o=="string"?{field:o,value:WAFER_WORDS.outcome.value}:{field:o?.field??WAFER_WORDS.outcome.field,value:o?.value??WAFER_WORDS.outcome.value},rate:e.rate??WAFER_WORDS.rate,...Object.keys(t).length?{outcomeNames:t}:{}}}export const cap=e=>e.length?e[0].toUpperCase()+e.slice(1):e,counted=(e,o)=>`${e.toLocaleString("en-GB")} ${e===1?o.one:o.many}`,outcomeLabel=(e,o)=>e.outcomeNames?.[o]??`${e.outcome.value} ${o}`;export function outcomeOfLabel(e,o){if(e.outcomeNames){for(const[n,m]of Object.entries(e.outcomeNames))if(m===o)return Number(n)}const t=`${e.outcome.value} `;if(!o.startsWith(t))return;const r=o.slice(t.length);return/^-?\d+$/.test(r)?Number(r):void 0}export const isWaferWords=e=>e===WAFER_WORDS;
|
|
@@ -1,18 +1,32 @@
|
|
|
1
1
|
import type { StatsSeverity } from './types.js';
|
|
2
|
-
import type
|
|
2
|
+
import { type ImpactTier, type Synthesis, type SynthesisCategory, type SynthesisItem } from './synthesis.js';
|
|
3
3
|
/** The three steps severity and impact are drawn in. */
|
|
4
4
|
export type MeterTier = ImpactTier;
|
|
5
5
|
export declare const METER_DOTS = 3;
|
|
6
6
|
/** Dots filled for a tier: high 3, medium 2, low 1. Never zero, so the lowest tier is still marked. */
|
|
7
7
|
export declare const filledDots: (tier: MeterTier) => number;
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* A tier as its marks: a finding's severity as dots (●●○), an item's impact as bars (▮▮▯). Two shapes for two scales, so
|
|
10
|
+
* an Unusual finding and a High-impact item, which say different things, never look alike side by side.
|
|
11
|
+
*/
|
|
12
|
+
export declare const meterGlyphs: (tier: MeterTier, scale: "severity" | "impact") => string;
|
|
13
|
+
/**
|
|
14
|
+
* The one set of level words: every level a reader sees is High, Medium or Low, said with what it measures ("Impact: High",
|
|
15
|
+
* "Strength: Medium"), never a word whose order the reader has to guess. Many readers use English as a second language.
|
|
16
|
+
*/
|
|
17
|
+
export declare const LEVEL_WORD: Readonly<Record<MeterTier, string>>;
|
|
18
|
+
/**
|
|
19
|
+
* A finding's severity as the level it is shown by: its strength, how clear and how large it is (unusual is high, notable
|
|
20
|
+
* medium, info low). `word` is the full label, `level` the level alone for a place that already says "Strength".
|
|
21
|
+
*/
|
|
9
22
|
export declare const SEVERITY_MARK: Readonly<Record<StatsSeverity, {
|
|
10
23
|
tier: MeterTier;
|
|
11
24
|
word: string;
|
|
25
|
+
level: string;
|
|
12
26
|
}>>;
|
|
13
|
-
/** An item's impact (share of
|
|
27
|
+
/** An item's impact (the share of the lot it affects) as its label: "Impact: High". */
|
|
14
28
|
export declare const impactWord: (tier: MeterTier) => string;
|
|
15
|
-
/** The
|
|
29
|
+
/** The level alone, for a compact list row under a heading that already says what it measures. */
|
|
16
30
|
export declare const impactShortWord: (tier: MeterTier) => string;
|
|
17
31
|
/**
|
|
18
32
|
* How strongly a yield difference is tinted: 0 for none, 1–3 light to strong. Only a shortfall of a
|
|
@@ -21,14 +35,13 @@ export declare const impactShortWord: (tier: MeterTier) => string;
|
|
|
21
35
|
*/
|
|
22
36
|
export declare function shortfallStep(points: number): 0 | 1 | 2 | 3;
|
|
23
37
|
/**
|
|
24
|
-
* The tint of a shortfall
|
|
25
|
-
* (a translucent wash reads on the report's white and on any panel theme alike). Full ink stays
|
|
26
|
-
* every step
|
|
38
|
+
* The tint of a shortfall: three steps of the data colour scheme's rating scale, always from its bad side, as an alpha over
|
|
39
|
+
* whatever the surface is (a translucent wash reads on the report's white and on any panel theme alike). Full ink stays
|
|
40
|
+
* on every step. `dataColors` names the scheme (Classic when unnamed).
|
|
27
41
|
*/
|
|
28
|
-
export
|
|
29
|
-
export declare const SHORTFALL_ALPHA: Readonly<Record<1 | 2 | 3, number>>;
|
|
42
|
+
export { SHORTFALL_ALPHA } from '../renderer/dataColors.js';
|
|
30
43
|
/** The CSS colour for a shortfall step. */
|
|
31
|
-
export declare const shortfallColor: (step: 1 | 2 | 3) => string;
|
|
44
|
+
export declare const shortfallColor: (step: 1 | 2 | 3, dataColors?: string) => string;
|
|
32
45
|
/** A signed difference in yield points: `+1.2`, `−1.2` (a true minus sign), `0.0`. */
|
|
33
46
|
export declare function formatPoints(points: number): string;
|
|
34
47
|
/** A bar's fill as a percentage of a 0–100 scale, kept in range. */
|
|
@@ -36,9 +49,45 @@ export declare const barPercent: (percent: number) => number;
|
|
|
36
49
|
/** The legend sentence for a column of shortfall tints, naming its reference ("the lot", "the wafer"). */
|
|
37
50
|
export declare const shortfallLegend: (reference: string) => string;
|
|
38
51
|
/**
|
|
39
|
-
* The
|
|
40
|
-
*
|
|
41
|
-
|
|
52
|
+
* The categories items are listed under, in the order every surface lists them (panel, Insights, report): fixed, so a
|
|
53
|
+
* reader learns where to look; how much each matters is its importance, not its place.
|
|
54
|
+
*/
|
|
55
|
+
export declare const SYNTHESIS_CATEGORIES: ReadonlyArray<{
|
|
56
|
+
id: SynthesisCategory;
|
|
57
|
+
title: string;
|
|
58
|
+
}>;
|
|
59
|
+
/** A category's title. */
|
|
60
|
+
export declare const categoryTitle: (id: SynthesisCategory) => string;
|
|
61
|
+
/**
|
|
62
|
+
* A category's importance, from the items it holds: High when one has Impact High; Medium when one has Impact Medium, or
|
|
63
|
+
* Strength High (a small but clear defect is not left plain); else none. Shown as a word and as the attention tint.
|
|
64
|
+
*/
|
|
65
|
+
export declare function categoryImportance(items: readonly Pick<SynthesisItem, 'impact' | 'strength'>[]): 'high' | 'medium' | undefined;
|
|
66
|
+
/** "Importance: High". */
|
|
67
|
+
export declare const importanceWord: (level: "high" | "medium") => string;
|
|
68
|
+
/**
|
|
69
|
+
* An item's levels as one line: its impact, and its strength only when that is not High (Medium or Low is the caution
|
|
70
|
+
* worth reading; High, and a count against limits, need no word). A group too small to confirm reads "Confidence: Low".
|
|
71
|
+
*/
|
|
72
|
+
export declare const itemLevels: (it: Pick<SynthesisItem, "impact" | "strength">, possible?: boolean) => string;
|
|
73
|
+
/** One category with its items: by impact (High first, each level in rank order), then groups too small to confirm. */
|
|
74
|
+
export interface SynthesisCategoryGroup {
|
|
75
|
+
id: SynthesisCategory;
|
|
76
|
+
title: string;
|
|
77
|
+
importance?: 'high' | 'medium';
|
|
78
|
+
items: Array<{
|
|
79
|
+
item: SynthesisItem;
|
|
80
|
+
band: 'large' | 'possible' | 'small';
|
|
81
|
+
}>;
|
|
82
|
+
}
|
|
83
|
+
/** A synthesis as its categories, in order, empty ones left out. */
|
|
84
|
+
export declare function synthesisByCategory(s: Synthesis): SynthesisCategoryGroup[];
|
|
85
|
+
/**
|
|
86
|
+
* What an item costs, as its one line in Worth a look (the Summary panel and the report): dies lost, the shift and the
|
|
87
|
+
* dies it moves, or a shape's own size; nothing when its few words already end with its dies ("Ring 4 (edge): pass
|
|
88
|
+
* rate, 275 dies"). A group too small to confirm says so instead. The one copy, so the panel and the report agree.
|
|
42
89
|
*/
|
|
43
|
-
export declare
|
|
90
|
+
export declare function itemCostText(it: Pick<SynthesisItem, 'kind' | 'measure' | 'affected' | 'diesLost' | 'brief' | 'shape'>, possible?: boolean): string;
|
|
91
|
+
/** Worth a look's order: High, then Medium, then Low, each by what it affects. */
|
|
92
|
+
export declare const worthOrder: (a: Pick<SynthesisItem, "impact" | "affected">, b: Pick<SynthesisItem, "impact" | "affected">) => number;
|
|
44
93
|
//# sourceMappingURL=presentation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const METER_DOTS=3,filledDots=
|
|
1
|
+
import{dataColorsFor as p,shortfallTint as d}from"../renderer/dataColors.js";import{strengthOf as a}from"./synthesis.js";export const METER_DOTS=3,filledDots=e=>e==="high"?3:e==="medium"?2:1,meterGlyphs=(e,t)=>{const[o,n]=t==="impact"?["\u25AE","\u25AF"]:["\u25CF","\u25CB"],s=filledDots(e);return o.repeat(s)+n.repeat(METER_DOTS-s)},LEVEL_WORD={high:"High",medium:"Medium",low:"Low"},SEVERITY_MARK={unusual:{tier:a("unusual"),word:`Strength: ${LEVEL_WORD.high}`,level:LEVEL_WORD.high},notable:{tier:a("notable"),word:`Strength: ${LEVEL_WORD.medium}`,level:LEVEL_WORD.medium},info:{tier:a("info"),word:`Strength: ${LEVEL_WORD.low}`,level:LEVEL_WORD.low}},impactWord=e=>`Impact: ${LEVEL_WORD[e]}`,impactShortWord=e=>LEVEL_WORD[e];const f=[{points:4,step:3},{points:2,step:2},{points:1,step:1}];export function shortfallStep(e){return f.find(t=>-e>=t.points)?.step??0}export{SHORTFALL_ALPHA}from"../renderer/dataColors.js";export const shortfallColor=(e,t)=>d(e,p(t));export function formatPoints(e){return`${e>0?"+":e<0?"\u2212":""}${Math.abs(e).toFixed(1)}`}export const barPercent=e=>Math.max(0,Math.min(100,e)),shortfallLegend=e=>`Bars run 0\u2013100%. A figure is tinted when it is 1, 2 or 4 or more points below ${e}; nothing above it is.`,SYNTHESIS_CATEGORIES=[{id:"groups",title:"Groups of wafers"},{id:"tests",title:"Tests outside limits"},{id:"patterns",title:"Patterns on the wafer"},{id:"sites",title:"Test sites"},{id:"wafers",title:"Wafers"}],categoryTitle=e=>SYNTHESIS_CATEGORIES.find(t=>t.id===e).title;export function categoryImportance(e){if(e.some(t=>t.impact==="high"))return"high";if(e.some(t=>t.impact==="medium"||t.strength==="high"))return"medium"}export const importanceWord=e=>`Importance: ${LEVEL_WORD[e]}`,itemLevels=(e,t=!1)=>`${impactWord(e.impact)}${t?` \xB7 Confidence: ${LEVEL_WORD.low}`:e.strength&&e.strength!=="high"?` \xB7 Strength: ${LEVEL_WORD[e.strength]}`:""}`;const i={high:0,medium:1,low:2};export function synthesisByCategory(e){const t=[...[...e.items,...e.also?.items??[]].map(o=>({item:o,band:"large"})),...(e.possible??[]).map(o=>({item:o,band:"possible"})),...(e.small??[]).map(o=>({item:o,band:"small"}))];return SYNTHESIS_CATEGORIES.map(o=>{const n=t.filter(r=>r.item.category===o.id),s=[...n.filter(r=>r.band!=="possible").sort((r,l)=>i[r.item.impact]-i[l.item.impact]),...n.filter(r=>r.band==="possible")],m=categoryImportance(s.filter(r=>r.band!=="possible").map(r=>r.item));return{id:o.id,title:o.title,...m?{importance:m}:{},items:s}}).filter(o=>o.items.length>0)}export function itemCostText(e,t=!1){if(t)return`Confidence: ${LEVEL_WORD.low}: too few wafers to confirm`;if(e.shape)return e.measure;const o=e.measure&&!/dies?$/.test(e.measure)&&!/%$/.test(e.measure)?e.measure:"";return/\d dies?$/.test(e.brief)?o:e.kind==="signal"?`${/σ$/.test(e.measure)?`${e.measure} shift`:e.measure}${e.affected>=1?` on \u2248 ${Math.round(e.affected).toLocaleString("en-GB")} dies`:""}`:e.diesLost>=1?`\u2248 ${Math.round(e.diesLost).toLocaleString("en-GB")} dies${o?` \xB7 ${o}`:""}`:e.measure}export const worthOrder=(e,t)=>i[e.impact]-i[t.impact]||t.affected-e.affected;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ReportSectionId } from './reportBlocks.js';
|
|
2
|
+
import { type OverviewGroup } from './overview.js';
|
|
3
|
+
import { type ReportScope } from './reportSections.js';
|
|
4
|
+
import type { ReportMapOptions, ReportValueMapOptions } from './reportMaps.js';
|
|
5
|
+
import type { ReportItemsOptions } from './presentationSections.js';
|
|
6
|
+
/** A ready-made presentation: its sections and charts, in order, and the settings it brings. */
|
|
7
|
+
export interface PresentationPreset {
|
|
8
|
+
/** Stable: `'worth'`, a group (`'yield'` … `'why'`), `'test'` or `'full'`. */
|
|
9
|
+
key: string;
|
|
10
|
+
name: string;
|
|
11
|
+
/** What it shows, in a sentence, for a list of them. */
|
|
12
|
+
description: string;
|
|
13
|
+
/** Every section it holds, in the presentation's order; `null` for every section (Full report). */
|
|
14
|
+
sections: ReportSectionId[] | null;
|
|
15
|
+
charts: string[];
|
|
16
|
+
/** The groups whose Worth a look items it shows; absent for every group. */
|
|
17
|
+
topics?: OverviewGroup[];
|
|
18
|
+
maps?: ReportMapOptions;
|
|
19
|
+
valueMaps?: Pick<ReportValueMapOptions, 'layout'>;
|
|
20
|
+
items?: ReportItemsOptions;
|
|
21
|
+
/** About chosen tests: a host asks for them when none are chosen (Test report). */
|
|
22
|
+
needsTests?: true;
|
|
23
|
+
/** The sections that must have something to show for it to be offered (a group's own); greyed otherwise. */
|
|
24
|
+
needs?: ReportSectionId[];
|
|
25
|
+
}
|
|
26
|
+
/** The ready-made presentations of a kind, in the order a host lists them. */
|
|
27
|
+
export declare function presentationPresets(scope: ReportScope): PresentationPreset[];
|
|
28
|
+
/**
|
|
29
|
+
* Several ready-made presentations as one: the union of their sections (in the presentation's order) and charts (in the
|
|
30
|
+
* order first met), and their settings merged: Stacked fails if any has it, the most stacked fail-bin maps, the fewest
|
|
31
|
+
* maps per slide (the largest maps), lowest yield first if any, the wafers' maps unless every one leaves them out; their
|
|
32
|
+
* groups' items (every group's when one is What stands out). Full report is everything, alone.
|
|
33
|
+
*/
|
|
34
|
+
export declare function combinePresets(scope: ReportScope, keys: readonly string[]): PresentationPreset | undefined;
|
|
35
|
+
//# sourceMappingURL=presentationPresets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{OVERVIEW_GROUP_LABELS as y}from"./overview.js";import{OVERVIEW_CHARTS as w,REPORT_SECTIONS as u}from"./reportSections.js";import{listInWords as b,maxOf as k,minOf as g}from"../core/utils.js";const S={lot:["card-yield","card-bins-by-wafer","card-bin-pareto","card-pass-rate","card-capability","card-ring-wafer"],wafer:["card-bin-pareto","card-pass-rate","card-capability","card-ring-yield","card-quadrant-yield"]},v=a=>({yield:a==="lot"?"Yield: the yield of each wafer, and the wafer maps with the lowest yield first.":"Yield: the wafer map and its yield.",bins:"Bins: the largest fail bins, the tests that failed in each, and maps of where each bin falls.",tests:"Tests: pass rates, test values, limits and capability, and maps of the test values.",where:"Where on the wafer the dies fail: the Stacked fails map, rings, quadrants and test sites.",why:"Why: the wafer fields (splits, dates, equipment) that divide yield, and the group comparison."}),T={yield:{maps:{stacked:!0,perSlide:12,order:"lowest"}},bins:{maps:{binStacks:3}},tests:{valueMaps:{layout:"stacked"}},where:{maps:{stacked:!0,grid:!1},extra:["gallery"]},why:{}};export function presentationPresets(a){const o=u[a],l=s=>o.map(i=>i.id).filter(i=>s.includes(i)),t=["summary","items"],c=[...new Set(o.flatMap(s=>s.group?[s.group]:[]))];return[{key:"worth",name:"What stands out",description:`What stands out: the ${a} at a glance, then a slide for each thing Insights lists as worth a look, with its chart and maps.`,sections:l(["summary","highlights","items","compared"]),charts:[],items:{count:10,low:"table",maps:!0}},...c.map(s=>{const i=o.filter(n=>n.group===s).map(n=>n.id),r=T[s];return{key:s,name:y[s],description:v(a)[s],sections:l([...t,...i,...r.extra??[]]),charts:[...w[a][s]],topics:[s],...r.maps?{maps:{...r.maps}}:{},...r.valueMaps?{valueMaps:{...r.valueMaps}}:{},needs:i}}),{key:"test",name:"Test report",description:"Test report: up to six tests you choose, with their values, maps and charts.",sections:l(["summary","test-values","value-maps","capability","correlation","sites"]),charts:a==="lot"?["card-box","card-histogram","card-trend","card-box-site","card-probability","card-scatter"]:["card-histogram","card-box-site","card-probability","card-scatter"],valueMaps:{layout:"stacked"},needsTests:!0,needs:["test-values"]},{key:"full",name:"Full report",description:"Full report: every section, with the main charts. It cannot be combined with the others.",sections:null,charts:[...S[a]],maps:a==="lot"?{stacked:!0,binStacks:3}:{}}]}export function combinePresets(a,o){const t=presentationPresets(a).filter(e=>o.includes(e.key));if(!t.length)return;if(t.length===1)return t[0];const c=t.find(e=>e.key==="full");if(c)return c;const s=u[a].map(e=>e.id).filter(e=>t.some(f=>f.sections?.includes(e))),i=[...new Set(t.flatMap(e=>e.charts))],r=t.filter(e=>e.maps),n=r.map(e=>e.maps?.perSlide).filter(e=>typeof e=="number"),p=k(r.map(e=>e.maps?.binStacks??0)),m={...r.some(e=>e.maps?.stacked)?{stacked:!0}:{},...n.length?{perSlide:g(n)}:{},...r.some(e=>e.maps?.order==="lowest")?{order:"lowest"}:{},...r.length&&r.every(e=>e.maps?.grid===!1)&&!t.some(e=>e.sections?.includes("wafer-yield"))?{grid:!1}:{},...p?{binStacks:p}:{}},d=t.some(e=>!e.topics&&e.key==="worth")?void 0:[...new Set(t.flatMap(e=>e.topics??[]))],h=t.find(e=>e.items)?.items;return{key:t.map(e=>e.key).join("+"),name:b(t.map(e=>e.name)),description:t.map(e=>e.description).join(" "),sections:s,charts:i,...d&&d.length?{topics:d}:{},...Object.keys(m).length?{maps:m}:{},...t.some(e=>e.valueMaps)?{valueMaps:{layout:"stacked"}}:{},...h?{items:{...h}}:{items:{count:10,low:"table",maps:!0}},...t.some(e=>e.needsTests)?{needsTests:!0}:{}}}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { WaferMetadata } from '../core/metadata.js';
|
|
2
|
+
import type { Die } from '../core/dies.js';
|
|
3
|
+
import type { TestDef } from '../renderer/buildWaferMap.js';
|
|
4
|
+
import { type FacetCuration } from './facets.js';
|
|
5
|
+
import { type OverviewGroup, type OverviewSentence, type WaferDies } from './overview.js';
|
|
6
|
+
import type { ReportFigure, ReportSection, ReportSwatch } from './reportBlocks.js';
|
|
7
|
+
import type { StatsFinding } from './types.js';
|
|
8
|
+
import type { Synthesis, SynthesisItem } from './synthesis.js';
|
|
9
|
+
/** What the analysis compared, those that found nothing included: the panel's Lot details line, as a section. */
|
|
10
|
+
export declare function comparedSection(synthesis: Synthesis): ReportSection;
|
|
11
|
+
/** What divides yield: the Overview's Why table, a row per field (fields grouping the wafers identically are one row). */
|
|
12
|
+
export declare function dividesSection(wafers: ReadonlyArray<{
|
|
13
|
+
metadata?: WaferMetadata;
|
|
14
|
+
dies: readonly Die[];
|
|
15
|
+
passBins: readonly number[];
|
|
16
|
+
}>, attributes: Record<string, FacetCuration> | undefined): ReportSection | undefined;
|
|
17
|
+
/** Tests behind each bin: the Overview's Bins table. */
|
|
18
|
+
export declare function binsByTestSection(wafers: readonly WaferDies[], defs: readonly TestDef[]): ReportSection | undefined;
|
|
19
|
+
/** Test sites: each site's yield and each test's fail rate there, a site far above the others flagged (the Overview's Where table). */
|
|
20
|
+
export declare function sitesSection(wafers: readonly WaferDies[], defs: readonly TestDef[]): ReportSection | undefined;
|
|
21
|
+
/** What each group's opening sentence is worked out from. */
|
|
22
|
+
export interface GroupSentenceInputs {
|
|
23
|
+
items: readonly SynthesisItem[];
|
|
24
|
+
wafers: readonly WaferDies[];
|
|
25
|
+
/** Each wafer's label and yield (a lot only). */
|
|
26
|
+
yields?: ReadonlyArray<{
|
|
27
|
+
label: string;
|
|
28
|
+
yieldPercent: number;
|
|
29
|
+
}>;
|
|
30
|
+
specYield?: ReadonlyArray<{
|
|
31
|
+
label: string;
|
|
32
|
+
failLowDies: number;
|
|
33
|
+
failHighDies: number;
|
|
34
|
+
totalDies: number;
|
|
35
|
+
}>;
|
|
36
|
+
}
|
|
37
|
+
/** The sentence each Overview group opens with, as the Overview says it. */
|
|
38
|
+
export declare function groupSentence(group: OverviewGroup, input: GroupSentenceInputs): OverviewSentence | null;
|
|
39
|
+
/**
|
|
40
|
+
* The sections with each group's sentence at the start of its first section, as the Overview opens each group: the
|
|
41
|
+
* reader meets the group's point before its tables.
|
|
42
|
+
*/
|
|
43
|
+
export declare function withGroupSentences(sections: ReportSection[], groupOf: (s: ReportSection) => OverviewGroup | undefined, input: GroupSentenceInputs): ReportSection[];
|
|
44
|
+
export declare function synthesisForGroups(synthesis: Synthesis, groups: readonly OverviewGroup[] | undefined): Synthesis;
|
|
45
|
+
/**
|
|
46
|
+
* The sections in their chosen order, finished: Worth a look leaves its headline to the lot at a glance and its "what was
|
|
47
|
+
* compared" line to What was compared when those are in the report, so neither is said twice; each Overview group opens
|
|
48
|
+
* with its sentence.
|
|
49
|
+
*/
|
|
50
|
+
export declare function finishSections(sections: ReportSection[], groupOf: (s: ReportSection) => OverviewGroup | undefined, inputs: GroupSentenceInputs | undefined): ReportSection[];
|
|
51
|
+
/** How the item-by-item section shows Worth a look (`ReportContentOptions.items`). */
|
|
52
|
+
export interface ReportItemsOptions {
|
|
53
|
+
/** The items with a slide each, the costliest first: 5, 10 or every one. Default 10. */
|
|
54
|
+
count?: 5 | 10 | 'all';
|
|
55
|
+
/** The items of Low importance: in one table after the others ("Also seen"), or left out. Default the table. */
|
|
56
|
+
low?: 'table' | 'omit';
|
|
57
|
+
/** Maps of the dies each item is about, beside its chart. Default on. */
|
|
58
|
+
maps?: boolean;
|
|
59
|
+
}
|
|
60
|
+
/** What the item-by-item section draws its maps from: the lot's wafers as the report knows them, index-aligned. */
|
|
61
|
+
export interface ItemMapSources<M> {
|
|
62
|
+
/** Each wafer's built map, by wafer index (absent where the report has none). */
|
|
63
|
+
maps: ReadonlyArray<M | undefined>;
|
|
64
|
+
labels: readonly string[];
|
|
65
|
+
/** Each wafer's yield, for putting the worst first. */
|
|
66
|
+
yields: ReadonlyArray<number | null>;
|
|
67
|
+
/** Each wafer's own findings. */
|
|
68
|
+
waferFindings: (waferIndex: number) => readonly StatsFinding[] | undefined;
|
|
69
|
+
/** A bin map of wafer `i`, its `outline` dies outlined. */
|
|
70
|
+
binMap: (i: number, outline: readonly string[]) => ReportFigure | undefined;
|
|
71
|
+
/** The Stacked fails map of the lot, `outline` outlined (a lot only). */
|
|
72
|
+
stackedFails?: (outline: readonly string[]) => ReportFigure | undefined;
|
|
73
|
+
/** The value map of a test: stacked over a lot, a wafer's own. */
|
|
74
|
+
valueMap?: (testNumber: number) => ReportFigure | undefined;
|
|
75
|
+
legend: ReportSwatch[];
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Worth a look, item by item: a section per item (its sentence, its levels and cost, its chart beside the maps of its dies,
|
|
79
|
+
* the findings it rests on), High and Medium and every shape on the wafer, the costliest first; then the Low ones in one
|
|
80
|
+
* table. `synthesis` is the report's Worth a look (only the groups the presentation is about).
|
|
81
|
+
*/
|
|
82
|
+
export declare function itemsSections<M>(synthesis: Synthesis, findings: readonly StatsFinding[], totalWafers: number | undefined, src: ItemMapSources<M>, options: ReportItemsOptions, scope: string): ReportSection[];
|
|
83
|
+
//# sourceMappingURL=presentationSections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{plainBinTerms as m}from"../renderer/fmt.js";import{testLabel as w}from"../renderer/testLabel.js";import{buildFacetTable as W}from"./facets.js";import{CONFIDENCE_LABEL as F,commonalityConfidence as v,commonalityFieldNames as M,commonalitySentence as T,groupCommonalityRows as E,measureLabel as L,rankCommonality as N}from"./commonality.js";import{binsSentence as A,siteFailRates as B,testsBehindBins as C,testsSentence as O,whereSentence as D,whySentence as _,yieldSentence as G}from"./overview.js";import{findingDiesByWafer as R}from"./filterFindings.js";import{LEVEL_WORD as y,itemCostText as j}from"./presentation.js";import{isShapeItem as P,synthesisKey as K}from"./synthesis.js";import{worthItems as Y}from"./worthItems.js";import{slideSentence as q}from"./reportDeck.js";import{ITEM_GROUP as z}from"./overview.js";import{listInWords as H}from"../core/utils.js";export function comparedSection(n){return{id:"compared",title:"What was compared",blocks:[{kind:"text",style:"headline",text:m(n.checked)}]}}export function dividesSection(n,o){if(n.length<4)return;const e=W(n.map(i=>({metadata:i.metadata})),{facetableOnly:!0,...o?{curation:o}:{}}).filter(i=>i.splittable).map(i=>({key:i.key,label:i.label}));if(!e.length)return;const l=N(n,e,o);if(!l.rows.length)return;const t=E(l.rows,l.tied).map(i=>{const s=i.primary;return[M(i.fields),`${L(s.measure)}${s.allowedFor?`, allowing for ${s.allowedFor.map(f=>f.label).join(", ")}`:""}`,T(s),F[v(s.pAdjusted)]]});return{id:"divides",title:"What divides yield",blocks:[{kind:"table",headers:["Field","Measure","Effect","Confidence"],rows:t,slide:{noun:"fields"}},{kind:"text",style:"legend",text:"Each wafer field, compared for yield and the most common fail bins with each wafer as one value; the clearest first. Confidence is High when q is under 0.05, Medium under 0.2, else Low."}]}}export function binsByTestSection(n,o){const e=C(n,o);if(!e)return;const l=e.field==="sbin"?"Soft bin":"Bin";return{id:"bins-by-test",title:"Tests behind each bin",blocks:[{kind:"table",headers:["Test",...e.bins.map(t=>`${l} ${t}`),"Dies"],rows:e.rows.map(t=>[w(t.test.def,t.test.def.testNumber),...t.counts.map(i=>({text:i?i.toLocaleString("en-GB"):"\xB7",numeric:!0})),{text:t.total.toLocaleString("en-GB"),numeric:!0}]),slide:{rank:{column:e.bins.length+1,worst:"high"},noun:"tests",describe:e.bins.length+1}},{kind:"text",style:"legend",text:`Dies in each fail bin that fail each test; a die that fails several tests counts under each.${e.more?` ${e.more} more tests fail dies.`:""}`}]}}export function sitesSection(n,o){const e=B(n,o);if(!e)return;const l=t=>`${t.toFixed(1)}%`;return{id:"sites",title:"Test sites",blocks:[{kind:"table",headers:["Test",...e.sites.map(t=>`Site ${t}`)],rows:[["Yield",...e.yields.map(t=>({text:l(t),numeric:!0}))],...e.rows.map(t=>[w(t.test.def,t.test.def.testNumber),...t.rates.map((i,s)=>({text:l(i),numeric:!0,...t.flagged[s]?{flag:!0}:{}}))])],slide:{noun:"tests"}},{kind:"text",style:"legend",text:"The share of each site\u2019s dies that fail each test. A marked rate is more than 2.5 times the other sites\u2019 and at least 2 points above it."}]}}export function groupSentence(n,o){switch(n){case"yield":return G(o.items,o.yields??[]);case"bins":return A(o.wafers);case"tests":return O(o.specYield);case"where":return D(o.items,!0);case"why":return _(o.items)}}export function withGroupSentences(n,o,e){const l=new Set;return n.map(t=>{const i=o(t);if(!i||l.has(i))return t;l.add(i);const s=groupSentence(i,e);return s?{...t,blocks:[{kind:"text",style:"headline",text:s.text},...t.blocks]}:t})}const U={yield:"the yield",bins:"the bins",tests:"the tests",where:"where on the wafer dies fail",why:"what divides yield"};export function synthesisForGroups(n,o){if(!o)return n;const e=s=>o.includes(z[s.category]),l=n.items.filter(e),i=l.length||n.also?.items.some(e)||n.small?.some(e)?n.nothing:`Worth a look lists nothing about ${H(o.map(s=>U[s]))}.`;return{...n,items:l,...i?{nothing:i}:{},...n.also?{also:{...n.also,items:n.also.items.filter(e)}}:{},...n.small?{small:n.small.filter(e)}:{},...n.possible?{possible:n.possible.filter(e)}:{}}}export function finishSections(n,o,e){const l=new Set(n.map(i=>i.id)),t=n.filter(i=>!(l.has("highlights")&&(i.className===p||i.id==="compared"))).map(i=>i.id!=="highlights"?i:{...i,blocks:i.blocks.map(s=>s.kind==="synthesis"?{...s,headline:!l.has("summary"),checked:!0,...l.has("items")?{brief:!0}:{}}:s)});return e?withGroupSentences(t,o,e):t}const p="also-seen",x=n=>n.reason.length<=n.text.length?n.reason:n.text,V=6;function J(n,o,e){const l=e.maps.length>1,t=n.target,i=t.kind==="finding"?o.get(t.id):t.kind==="wafer"?e.waferFindings(t.waferIndex)?.find(r=>r.id===t.findingId):void 0;if(!i||i.variable.kind==="test"){const r=n.testNumbers[0]??(t.kind==="test"?t.testNumber:void 0),d=r!==void 0?e.valueMap?.(r):void 0;return d?[{figure:d,label:""}]:[]}if(t.kind==="wafer"){const r=i.highlight.dieKeys??[],d=e.binMap(t.waferIndex,r);return d?[{figure:d,label:e.labels[t.waferIndex]??""}]:[]}const s=R(i,e.waferFindings);if(!l){const r=s.byWafer.get(-1)??s.byWafer.get(0)??[],d=e.binMap(0,r);return d?[{figure:d,label:""}]:[]}if((s.allWafers?e.maps.length:s.byWafer.size)>=.8*e.maps.length&&e.stackedFails){const r=s.byWafer.get(-1)??[...s.byWafer.values()][0]??[],d=e.stackedFails(r);if(d)return[{figure:d,label:`Stacked fails \xB7 ${e.maps.length} wafers`}]}return[...s.byWafer.keys()].filter(r=>r>=0).sort((r,d)=>(e.yields[r]??1/0)-(e.yields[d]??1/0)).slice(0,V).flatMap(r=>{const d=e.binMap(r,s.byWafer.get(r)??[]),c=e.yields[r];return d?[{figure:d,label:`${e.labels[r]??""}${c==null?"":` \xB7 ${c.toFixed(1)}%`}`}]:[]})}function Q(n,o){const e=n.target;if(e.kind==="group")return e.waferIndices?.length;if(e.kind==="wafer")return 1;const l=e.kind==="finding"?o.get(e.id):void 0;return l?.highlight.kind==="wafer"?l.highlight.waferIndices.length:void 0}export function itemsSections(n,o,e,l,t,i){const s=Y(n),f=s.filter(a=>a.impact!=="low"||P(a)),u=t.count==="all"?f:f.slice(0,t.count??10),r=s.filter(a=>!u.includes(a));if(!s.length)return n.nothing?[{id:"items",title:"Worth a look",blocks:[{kind:"text",style:"headline",text:n.nothing}]}]:[];const d=new Map(o.map(a=>[a.id,a])),c=u.map(a=>{const b=Q(a,d),g=j(a),S=[{text:`Importance ${y[a.impact]}`,tone:a.impact},...a.strength?[{text:`Strength ${y[a.strength]}`,tone:a.strength}]:[],...b!==void 0&&e?[{text:`${b} of ${e} wafers`}]:[],...g&&!x(a).includes(g)?[{text:g}]:[]],k=t.maps===!1?[]:J(a,d,l),$=[{kind:"text",style:"headline",text:m(x(a))},{kind:"badges",badges:S},{kind:"evidence",chart:{kind:"plot",key:K(a),spec:a.chart},maps:k,legend:k.some(I=>I.figure.kind==="bin-map")?l.legend:[]}];return{id:"items",title:m(a.brief),blocks:$}}),h=`Also seen${r.every(a=>a.impact==="low")?", of Low importance":""}: ${r.map(a=>m(a.brief)).join("; ")}.`;if(r.length&&r.length<=2&&t.low!=="omit"&&q(h)===h)c.push({id:"items",title:"Also seen",className:p,blocks:[{kind:"text",style:"headline",text:h}]});else if(r.length&&t.low!=="omit"){const a={...n,items:r,also:void 0,small:void 0,possible:void 0,nothing:void 0};c.push({id:"items",title:"Also seen",className:p,blocks:[{kind:"synthesis",synthesis:a,anchorFor:()=>{},headline:!1,checked:!1,brief:!0}]})}return c}
|
|
@@ -4,6 +4,11 @@ import { type BinColors } from '../renderer/binColors.js';
|
|
|
4
4
|
import { type BinDef, type TestDef, type YieldSummary, type WaferMapResult } from '../renderer/buildWaferMap.js';
|
|
5
5
|
import type { StatsSummary, AnalyzeWaferMapOptions } from './types.js';
|
|
6
6
|
import { openHtmlReport } from './renderFindingsReport.js';
|
|
7
|
+
import { type FacetCuration } from './facets.js';
|
|
8
|
+
import { type ReportItemsOptions } from './presentationSections.js';
|
|
9
|
+
import type { OverviewGroup } from './overview.js';
|
|
10
|
+
import type { ReportDocument, ReportSectionId } from './reportBlocks.js';
|
|
11
|
+
import { type ReportMapOptions, type ReportValueMapOptions } from './reportMaps.js';
|
|
7
12
|
export interface SummaryReportParams {
|
|
8
13
|
wafer: Wafer;
|
|
9
14
|
dies: Die[];
|
|
@@ -26,11 +31,21 @@ export interface SummaryReportParams {
|
|
|
26
31
|
binColors?: BinColors;
|
|
27
32
|
/** @internal Shown inside the app: a click on a finding's row selects it on the map (see `LIVE_FINDINGS_SCRIPT`). */
|
|
28
33
|
live?: boolean;
|
|
34
|
+
/** @internal The built map these pieces came from, so a writer that shows pictures can draw it. */
|
|
35
|
+
source?: WaferMapResult;
|
|
36
|
+
/** @internal The Insights charts to include, by card id, in this order. */
|
|
37
|
+
charts?: readonly string[];
|
|
38
|
+
/** @internal The sections to include, in this order; all, in the report's order, when absent. */
|
|
39
|
+
sections?: readonly ReportSectionId[];
|
|
29
40
|
}
|
|
30
41
|
/** Generate a full wafer summary as a standalone HTML string suitable for `openHtmlReport()`. */
|
|
31
42
|
export declare function renderSummaryReportHtml(params: SummaryReportParams, options?: {
|
|
32
43
|
title?: string;
|
|
33
44
|
}): string;
|
|
45
|
+
/** The wafer summary report as a document of sections, for any writer. */
|
|
46
|
+
export declare function buildWaferReport(params: SummaryReportParams, options?: {
|
|
47
|
+
title?: string;
|
|
48
|
+
} & ReportLayout): ReportDocument;
|
|
34
49
|
export interface LotSummaryReportParams {
|
|
35
50
|
/** One entry per wafer/item — grouping, per-group analysis (`analyzeWaferLot`),
|
|
36
51
|
* and rendering all happen internally; callers never pre-compute a lotSummary
|
|
@@ -68,6 +83,12 @@ export interface LotSummaryReportParams {
|
|
|
68
83
|
binColors?: BinColors;
|
|
69
84
|
/** @internal Shown inside the app: a click on a finding's row selects it on the map. */
|
|
70
85
|
live?: boolean;
|
|
86
|
+
/** @internal The host's wafer attributes, so the report names a field as the panel does. */
|
|
87
|
+
attributes?: Record<string, FacetCuration>;
|
|
88
|
+
/** @internal The Insights charts to include, by card id, in this order. */
|
|
89
|
+
charts?: readonly string[];
|
|
90
|
+
/** @internal The sections to include, in this order; all, in the report's order, when absent. */
|
|
91
|
+
sections?: readonly ReportSectionId[];
|
|
71
92
|
}
|
|
72
93
|
/**
|
|
73
94
|
* Generate a full lot summary as a standalone HTML string suitable for
|
|
@@ -81,6 +102,10 @@ export interface LotSummaryReportParams {
|
|
|
81
102
|
export declare function renderLotSummaryReportHtml(params: LotSummaryReportParams, options?: {
|
|
82
103
|
title?: string;
|
|
83
104
|
}): string;
|
|
105
|
+
/** The lot summary report as a document of sections, for any writer: one part per identity group. */
|
|
106
|
+
export declare function buildLotReport(params: LotSummaryReportParams, options?: {
|
|
107
|
+
title?: string;
|
|
108
|
+
} & ReportLayout): ReportDocument;
|
|
84
109
|
export { openHtmlReport };
|
|
85
110
|
/** A built map as the report builders read it. A `WaferMapResult` is one. */
|
|
86
111
|
export type ReportMap = Pick<WaferMapResult, 'wafer' | 'dies' | 'passBins' | 'ringCount'> & Partial<Pick<WaferMapResult, 'hbinDefs' | 'sbinDefs' | 'testDefs'>> & {
|
|
@@ -89,6 +114,47 @@ export type ReportMap = Pick<WaferMapResult, 'wafer' | 'dies' | 'passBins' | 'ri
|
|
|
89
114
|
/** This wafer's analysis, when already run — reused, never recomputed. */
|
|
90
115
|
statsSummary?: StatsSummary;
|
|
91
116
|
};
|
|
117
|
+
/** What the report builders take besides the maps: which sections and charts, in which order, and a title. */
|
|
118
|
+
export interface ReportContentOptions extends ReportLayout {
|
|
119
|
+
title?: string;
|
|
120
|
+
/** The sections to include, in this order; all, in the report's order, when absent. */
|
|
121
|
+
sections?: readonly ReportSectionId[];
|
|
122
|
+
/** The Insights charts to include, by card id, in this order. */
|
|
123
|
+
charts?: readonly string[];
|
|
124
|
+
}
|
|
125
|
+
/** How a report shows its maps and which tests it is about. */
|
|
126
|
+
export interface ReportLayout {
|
|
127
|
+
/** The wafers' bin maps: which bins, how many to a slide, in which order, and a stacked map of where they fail. */
|
|
128
|
+
maps?: ReportMapOptions;
|
|
129
|
+
/**
|
|
130
|
+
* The tests the report is about, by test number: its test tables, test value maps and group comparison cover only these,
|
|
131
|
+
* and a chart that shows one test is drawn once for each. All tests when absent.
|
|
132
|
+
*/
|
|
133
|
+
tests?: readonly number[];
|
|
134
|
+
/** The test value maps (section `value-maps`): stacked over the wafers, or every wafer's. */
|
|
135
|
+
valueMaps?: ReportValueMapOptions;
|
|
136
|
+
/** The Overview groups a presentation is about: Worth a look, and its items, keep only theirs. All when absent. */
|
|
137
|
+
topics?: readonly OverviewGroup[];
|
|
138
|
+
/** Worth a look, item by item (section `items`): how many items, the Low ones, the maps of each item's dies. */
|
|
139
|
+
items?: ReportItemsOptions;
|
|
140
|
+
/**
|
|
141
|
+
* Made for slides: a table a chart says better gives way to it (the per-wafer yield when the Yield by wafer chart is in),
|
|
142
|
+
* rows that say nothing are left out and counted, and the group comparison is a chart per wafer field, not tables.
|
|
143
|
+
*/
|
|
144
|
+
presentation?: boolean;
|
|
145
|
+
/** @internal The wafers of a part, by their place in the report's maps: the charts made for it are drawn over these. */
|
|
146
|
+
wafers?: number[];
|
|
147
|
+
}
|
|
148
|
+
/** The wafer report of one built map, as a document of sections for any writer (`renderWaferReportHtml` writes it as HTML). */
|
|
149
|
+
export declare function waferReportOf(map: ReportMap & {
|
|
150
|
+
yield: YieldSummary;
|
|
151
|
+
dataCoverage: SummaryReportParams['dataCoverage'];
|
|
152
|
+
}, summary?: StatsSummary, options?: ReportContentOptions & {
|
|
153
|
+
binColors?: BinColors; /** @internal */
|
|
154
|
+
live?: boolean; /** @internal */
|
|
155
|
+
presentation?: boolean; /** @internal */
|
|
156
|
+
dataColors?: string;
|
|
157
|
+
}): ReportDocument;
|
|
92
158
|
/**
|
|
93
159
|
* The wafer summary report for one built map, as a standalone HTML document.
|
|
94
160
|
* Analyses the map with `analyzeWaferMap` when `summary` is not given and the
|
|
@@ -102,8 +168,18 @@ export declare function renderWaferReportHtml(map: ReportMap & {
|
|
|
102
168
|
}, summary?: StatsSummary, options?: {
|
|
103
169
|
title?: string; /** @internal */
|
|
104
170
|
binColors?: BinColors; /** @internal */
|
|
105
|
-
live?: boolean;
|
|
171
|
+
live?: boolean; /** @internal */
|
|
172
|
+
dataColors?: string;
|
|
106
173
|
}): string;
|
|
174
|
+
/** The lot report of several built maps, as a document of sections for any writer (`renderLotReportHtml` writes it as HTML). */
|
|
175
|
+
export declare function lotReportOf(maps: readonly ReportMap[], options?: ReportContentOptions & {
|
|
176
|
+
analyzeOptions?: AnalyzeWaferMapOptions; /** @internal */
|
|
177
|
+
binColors?: BinColors; /** @internal */
|
|
178
|
+
live?: boolean; /** @internal */
|
|
179
|
+
attributes?: Record<string, FacetCuration>; /** @internal */
|
|
180
|
+
presentation?: boolean; /** @internal */
|
|
181
|
+
dataColors?: string;
|
|
182
|
+
}): ReportDocument;
|
|
107
183
|
/**
|
|
108
184
|
* The lot summary report for several built maps, as a standalone HTML document.
|
|
109
185
|
* Wafers are grouped by lot identity inside; bin and test definitions are merged
|
|
@@ -114,6 +190,8 @@ export declare function renderLotReportHtml(maps: readonly ReportMap[], options?
|
|
|
114
190
|
title?: string;
|
|
115
191
|
analyzeOptions?: AnalyzeWaferMapOptions; /** @internal */
|
|
116
192
|
binColors?: BinColors; /** @internal */
|
|
117
|
-
live?: boolean;
|
|
193
|
+
live?: boolean; /** @internal */
|
|
194
|
+
attributes?: Record<string, FacetCuration>; /** @internal */
|
|
195
|
+
dataColors?: string;
|
|
118
196
|
}): string;
|
|
119
197
|
//# sourceMappingURL=renderSummaryReport.d.ts.map
|