@wafertools/wafermap 0.38.0 → 0.39.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.
Files changed (61) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/README.md +2 -1
  3. package/dist/packages/canvas-adapter/cellShade.d.ts +21 -0
  4. package/dist/packages/canvas-adapter/cellShade.js +1 -0
  5. package/dist/packages/canvas-adapter/charts/chartShell.d.ts +19 -3
  6. package/dist/packages/canvas-adapter/charts/chartShell.js +1 -1
  7. package/dist/packages/canvas-adapter/charts/commonality.js +1 -1
  8. package/dist/packages/canvas-adapter/charts/correlation.d.ts +11 -0
  9. package/dist/packages/canvas-adapter/charts/correlation.js +1 -1
  10. package/dist/packages/canvas-adapter/charts/divergingScale.d.ts +23 -0
  11. package/dist/packages/canvas-adapter/charts/divergingScale.js +1 -0
  12. package/dist/packages/canvas-adapter/charts/groupComparison.js +1 -1
  13. package/dist/packages/canvas-adapter/charts/palette.d.ts +10 -3
  14. package/dist/packages/canvas-adapter/charts/palette.js +1 -1
  15. package/dist/packages/canvas-adapter/charts/plotChart.d.ts +3 -0
  16. package/dist/packages/canvas-adapter/charts/plotChart.js +1 -1
  17. package/dist/packages/canvas-adapter/dataTab.js +1 -1
  18. package/dist/packages/canvas-adapter/differenceMapPanel.d.ts +1 -0
  19. package/dist/packages/canvas-adapter/differenceMapPanel.js +1 -1
  20. package/dist/packages/canvas-adapter/filterJson.d.ts +25 -0
  21. package/dist/packages/canvas-adapter/filterJson.js +5 -0
  22. package/dist/packages/canvas-adapter/insightsTab.js +1 -1
  23. package/dist/packages/canvas-adapter/pageFilter.js +2 -2
  24. package/dist/packages/canvas-adapter/plotEditor.js +10 -1
  25. package/dist/packages/canvas-adapter/plotJsonComplete.d.ts +46 -0
  26. package/dist/packages/canvas-adapter/plotJsonComplete.js +4 -0
  27. package/dist/packages/canvas-adapter/plotJsonHistory.d.ts +12 -0
  28. package/dist/packages/canvas-adapter/plotJsonHistory.js +1 -0
  29. package/dist/packages/canvas-adapter/plotJsonSuggest.d.ts +16 -0
  30. package/dist/packages/canvas-adapter/plotJsonSuggest.js +1 -0
  31. package/dist/packages/canvas-adapter/plotModal.js +1 -1
  32. package/dist/packages/canvas-adapter/plotTab.js +1 -1
  33. package/dist/packages/canvas-adapter/renderWaferGallery.js +1 -1
  34. package/dist/packages/canvas-adapter/summaryPanel.js +4 -4
  35. package/dist/packages/canvas-adapter/userGuideHtml.d.ts +1 -1
  36. package/dist/packages/canvas-adapter/userGuideHtml.js +40 -18
  37. package/dist/packages/canvas-adapter/version.d.ts +2 -2
  38. package/dist/packages/canvas-adapter/version.js +1 -1
  39. package/dist/packages/canvas-adapter/virtualTable.d.ts +2 -0
  40. package/dist/packages/canvas-adapter/virtualTable.js +1 -1
  41. package/dist/packages/core/utils.d.ts +6 -0
  42. package/dist/packages/core/utils.js +1 -1
  43. package/dist/packages/renderer/fmt.js +1 -1
  44. package/dist/packages/stats/chartCatalogue.js +1 -1
  45. package/dist/packages/stats/coFailure.d.ts +11 -0
  46. package/dist/packages/stats/coFailure.js +1 -0
  47. package/dist/packages/stats/correlation.d.ts +7 -0
  48. package/dist/packages/stats/correlation.js +1 -1
  49. package/dist/packages/stats/differenceMap.d.ts +2 -0
  50. package/dist/packages/stats/differenceMap.js +1 -1
  51. package/dist/packages/stats/plotData.d.ts +11 -2
  52. package/dist/packages/stats/plotData.js +1 -1
  53. package/dist/packages/stats/plotSpec.d.ts +31 -2
  54. package/dist/packages/stats/plotSpec.js +4 -4
  55. package/dist/packages/stats/plotTable.d.ts +18 -0
  56. package/dist/packages/stats/plotTable.js +1 -0
  57. package/dist/packages/stats/synthesis.d.ts +6 -0
  58. package/dist/packages/stats/synthesis.js +1 -1
  59. package/dist/packages/stats/testsByWafer.d.ts +11 -0
  60. package/dist/packages/stats/testsByWafer.js +1 -0
  61. package/package.json +1 -1
@@ -72,7 +72,7 @@ export const USER_GUIDE_HTML=`<div class="wmap-guide">
72
72
  .wmap-guide-toc{display:none!important}
73
73
  }
74
74
  </style>
75
- <h1 id="wmap-wafer-map-user-guide">Wafer Map \u2014 User Guide<span class="wmap-guide-version" title="Built 2026-10-28T17:57:47.014Z">v0.38.0</span></h1>
75
+ <h1 id="wmap-wafer-map-user-guide">Wafer Map \u2014 User Guide<span class="wmap-guide-version" title="Built 2026-10-31T09:06:32.439Z">v0.39.0</span></h1>
76
76
  <p class="wmap-guide-online-link">This is a quick reference. <a href="https://wafertools.github.io/wafermap/user-guide/" target="_blank" rel="noopener">View the full illustrated guide online \u2197</a></p>
77
77
  <p>This guide describes the display and analysis features of the wafer map viewer.
78
78
  It is written for users who may be semiconductor test engineers, device engineers, and yield engineers
@@ -538,7 +538,7 @@ it as a file and send it to whoever supports this software.</p>
538
538
  <tr>
539
539
  <td><img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJub25lIiBzdHJva2U9IiMzNzQxNTEiIHN0cm9rZS13aWR0aD0iMS44IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPgogIDxyZWN0IHg9IjMiIHk9IjMiIHdpZHRoPSI0IiBoZWlnaHQ9IjE4IiByeD0iMSIvPgogIDxyZWN0IHg9IjEwIiB5PSIzIiB3aWR0aD0iNCIgaGVpZ2h0PSIxOCIgcng9IjEiLz4KICA8cmVjdCB4PSIxNyIgeT0iMyIgd2lkdGg9IjQiIGhlaWdodD0iMTgiIHJ4PSIxIi8+Cjwvc3ZnPgo=" width="20" height="20"></td>
540
540
  <td>Columns</td>
541
- <td>Sets the number of columns, or press <strong>1</strong> to <strong>5</strong>, or <strong>0</strong> for Auto, while the pointer is over the gallery or focus is in it. <strong>Auto</strong> fits as many cards as keep each die at least 6 px across, so a dense wafer gets a wider card and a window that cannot hold another column at that width keeps the columns it has; a number divides the full width between that many columns.</td>
541
+ <td>Sets the number of columns, or press <strong>1</strong> to <strong>5</strong>, or <strong>0</strong> for Auto, while the pointer is over the gallery or focus is in it; it offers no more columns than there are cards. <strong>Auto</strong> fits as many cards as keep each die at least 6 px across, so a dense wafer gets a wider card and a window that cannot hold another column at that width keeps the columns it has; a number divides the full width between that many columns.</td>
542
542
  </tr>
543
543
  <tr>
544
544
  <td><img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJub25lIiBzdHJva2U9IiMzNzQxNTEiIHN0cm9rZS13aWR0aD0iMS44IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjxwYXRoIGQ9Ik01IDNhMiAyIDAgMCAwLTIgMiIvPjxwYXRoIGQ9Ik0xOSAzYTIgMiAwIDAgMSAyIDIiLz48cGF0aCBkPSJNMjEgMTlhMiAyIDAgMCAxLTIgMiIvPjxwYXRoIGQ9Ik01IDIxYTIgMiAwIDAgMS0yLTIiLz48cGF0aCBkPSJNOSAzaDEiLz48cGF0aCBkPSJNOSAyMWgxIi8+PHBhdGggZD0iTTE0IDNoMSIvPjxwYXRoIGQ9Ik0xNCAyMWgxIi8+PHBhdGggZD0iTTMgOXYxIi8+PHBhdGggZD0iTTIxIDl2MSIvPjxwYXRoIGQ9Ik0zIDE0djEiLz48cGF0aCBkPSJNMjEgMTR2MSIvPjwvc3ZnPgo=" width="20" height="20"></td>
@@ -618,6 +618,13 @@ losing it, and the line stays, saying the filter is off, until you remove it. A
618
618
  not have (a test this lot lacks) filters nothing, and the line says so.</p>
619
619
  <p>The filter is view state, like <strong>Group by</strong>: it is not part of any plot or plots file, and a host application can remember
620
620
  it for the next lot.</p>
621
+ <h4 id="wmap-filter-as-json">Filter as JSON</h4>
622
+ <p>The Filter window has a <strong>Conditions | JSON</strong> switch. JSON shows the same filter as text, which you can edit, paste into or
623
+ copy out of. The text is read as you type: the preview follows it, and <strong>Apply</strong> is held, with the reason under the text,
624
+ while it cannot be read. Suggestions list the filter&#39;s keys, the lot&#39;s own wafer fields and tests, and the values a field
625
+ takes (<strong>Suggest</strong> or Ctrl/Cmd+Space opens them by hand), and Ctrl/Cmd+Z steps back through the text. Pasting a saved
626
+ filters file with several filters offers each to choose from; anything the reader leaves out is named under the text.
627
+ Switching back to <strong>Conditions</strong> drops text that could not be read.</p>
621
628
  <h4 id="wmap-saved-filters">Saved filters</h4>
622
629
  <p>Conditions you use again can be saved. In the Filter window, type a name and press <strong>Save</strong> to keep the conditions you
623
630
  have set; saving under a name already used updates that filter. <strong>Load</strong> puts a saved filter&#39;s conditions in the window
@@ -880,7 +887,7 @@ field Group by offers (a process split, a lot, a test program). A group is judge
880
887
  one value, the way Insights compares groups, adjusted over every field and test compared, and its size
881
888
  is the shift in the test&#39;s within-wafer standard deviations, the scale a region&#39;s shift is measured on.
882
889
  A field is one item however many tests it moves (&quot;34 tests differ by Split. Largest: \u2026; next: \u2026&quot;), with the tests
883
- that moved most as its chips, so a corner lot does not fill the list with one split. Both are ranked on one scale, the share of the dies an item
890
+ that moved most as its chips, so a corner lot does not fill the list with one split. Its chart is a grid of the field&#39;s values by those tests, in z-scores (and a card that shows a bar per wafer draws the wafers under their group, in the group&#39;s colour, when Group by is on): blue where a group sits below the lot&#39;s average on a test, red where it sits above, so a process corner reads as a pattern of cells. Both are ranked on one scale, the share of the dies an item
884
891
  affects: a loss by the dies it cost; a shift by its dies, counted in full from two standard deviations
885
892
  and by the square of its size below that (a one-sigma shift counts a quarter of its dies); a trend by
886
893
  how far it moved; a group&#39;s shift by the dies of the wafers that moved, weighted as a shift is; a Ppk under 1.0 by
@@ -1054,8 +1061,9 @@ against once the map is replaced.</p>
1054
1061
  <p>The <a href="https://wafertools.github.io/wafermap/charts/">Chart reference</a> describes every chart, plot and table: what it
1055
1062
  shows, how to read it, when to reach for it and where to find it. This section covers how the tab works.</p>
1056
1063
  <p>The <strong>Columns</strong> control beside <strong>Group by</strong> and <strong>Show</strong>, or the keys <strong>1</strong> to <strong>5</strong> (and <strong>0</strong> for Auto), sets how many columns of
1057
- cards every section of the tab uses. <strong>Auto</strong> fits as many as the width holds at 420 px or more; a number divides the width that many ways,
1058
- and the choice stays while you move between the tabs.</p>
1064
+ cards every section of the tab uses. <strong>Auto</strong> fits as many as the width holds at 420 px or more; a number is the most columns a section uses, dividing the width that many ways,
1065
+ and the choice stays while you move between the tabs. A tab uses the smaller of that number and the cards in its fullest section, so a tab
1066
+ of two cards is two columns even with 4 chosen.</p>
1059
1067
  <p>Any chart mark that stands for one wafer \u2014 a bar in <em>Yield by wafer</em>, a box in
1060
1068
  <em>Test value distribution</em>, a point in <em>Wafer-to-wafer trend</em> \u2014 can be
1061
1069
  right-clicked to chart that wafer on its own (see
@@ -1159,8 +1167,8 @@ yield/box-plot rows.</em></p>
1159
1167
  orange marginal, red poor; tests without limits are muted and dashed), a
1160
1168
  per-wafer test-value box plot, and a value histogram. Clicking a capability
1161
1169
  box drives the box plot and histogram onto that test.</em></p>
1162
- <p><em>Correlation sub-tab: test-to-test Pearson correlation matrix (blue =
1163
- positive, orange = negative; intensity = strength) and a die-level scatter
1170
+ <p><em>Correlation sub-tab: test-to-test Pearson correlation matrix (orange =
1171
+ positive, blue = negative; intensity = strength) and a die-level scatter
1164
1172
  plot coloured by hard bin. Clicking a matrix cell drives the scatter plot
1165
1173
  onto that pair.</em></p>
1166
1174
  <h3 id="wmap-what-a-click-does">What a click does</h3>
@@ -1228,15 +1236,24 @@ same &quot;Group by&quot; and &quot;Show&quot; scope as the charts.</p>
1228
1236
  <li><strong>Statistics</strong> \u2014 the <strong>Test Values</strong> table (count, min, quartiles, mean, \u03C3,
1229
1237
  Ppk, limits and the limit yield for each test, with its N stated) and the
1230
1238
  <strong>Functional Tests</strong> pass-rate table. With &quot;Group by&quot; active there is one set
1231
- per group.</li>
1239
+ per group, below one table that compares every test across the groups (a
1240
+ test&#39;s groups side by side, with its own CSV).</li>
1232
1241
  <li><strong>Dies</strong> \u2014 one row per die: wafer, X, Y, ring, quadrant (and reticle cell and shot when a reticle is set), site, bins, a column
1233
1242
  for each test, and the wafer&#39;s metadata. Only the rows in view are drawn, so a
1234
1243
  lot of hundreds of thousands of dies scrolls smoothly. Click a column heading
1235
1244
  to sort by it (again to reverse; a die with no value sorts last).</li>
1236
- <li><strong>Wafers</strong> \u2014 one row per wafer: lot, split and any other metadata, the die
1237
- counts, the yield (the same figure as the yield chart), and the mean of each
1238
- test (the first 50).</li>
1245
+ <li><strong>Wafers</strong> \u2014 one row per wafer: the wafer, the field Group by divides it by, the die
1246
+ counts, the yield (the same figure as the yield chart), the mean of each test (the first
1247
+ 50), then the other attributes that differ between wafers. Attributes the same on every
1248
+ wafer (lot, part type, tester\u2026) are named in a line above the table and kept in the export.</li>
1239
1249
  </ul>
1250
+ <p><strong>Shading.</strong> Where a table compares values, a pale colour sits behind the number and the number is always
1251
+ printed: a group&#39;s or wafer&#39;s mean is blue below the average of its peers and warm above (the same two hues as the
1252
+ correlation matrix), a yield (or a share inside limits) is tinted red only when it falls a point or more short of its reference, as in the
1253
+ summary report: a wafer short of the lot&#39;s mean per-wafer yield, a group short of the best group&#39;s share inside limits, and
1254
+ nothing at all on a lot with nothing wrong. A Ppk is capable, marginal or poor, and in the Dies table a reading outside its
1255
+ test&#39;s limits is tinted warm. The <strong>Comparison by</strong>
1256
+ table in Distributions shades each group&#39;s mean among the groups the same way.</p>
1240
1257
  <p>In the Dies table, <strong>click a row</strong> to show that die on its map: the table steps
1241
1258
  aside (or Insights closes) and the die is ringed, on its own card in a gallery. The
1242
1259
  ring goes with the next click on the map, or Esc.</p>
@@ -1253,18 +1270,18 @@ warns when that is more than a spreadsheet can open (1,048,576).</p>
1253
1270
  <p>The <strong>My plots</strong> sub-tab is where you build your own charts. <strong>+ New plot</strong> starts one,
1254
1271
  already filled in with the first two tests of the lot, and opens it beside a large
1255
1272
  copy of the chart. <strong>Edit as plot</strong>, in the \u22EF menu of an Insights chart, opens that chart as a plot of your own (see
1256
- <em>A chart&#39;s buttons</em> below). <strong>Add examples</strong> draws plots to start from, or to see what each chart and
1257
- setting is for. They are chosen from the lot in view: the <em>lead</em> test is the one that varies most from wafer to
1273
+ <em>A chart&#39;s buttons</em> below). The <strong>My plots | Examples</strong> switch above the list shows one or the other, never both: <strong>Examples</strong> shows plots to start from, or to see what each chart and
1274
+ setting is for, each marked as an example; none is saved until you add it. They are chosen from the lot in view: the <em>lead</em> test is the one that varies most from wafer to
1258
1275
  wafer (for a single wafer, the one that follows distance from the centre most), its partner the test that tracks it
1259
1276
  best, and the split is the lot field that best explains the lead test. The examples are a scatter of the lead
1260
1277
  test against its partner with a fitted line, a histogram with its
1261
- normal curve, a box of the lead test by wafer, a bar of yield by the split, a line over wafer order with a \xB11 SD band, and a probability plot. It adds one of each newer
1278
+ normal curve, a box of the lead test by wafer, a bar of yield by the split, a line over wafer order with a \xB11 SD band, and a probability plot. It shows one of each newer
1262
1279
  feature the lot can show: the most telling tests as one set rescaled to z-scores (a box per test, and a heatmap of
1263
1280
  tests by wafer), the lead test by split and by wafer nested in split, panels by ring, the lead test by ranges of its
1264
1281
  partner and of the distance from the centre, a pareto of the hard bins and each wafer&#39;s bin mix, the
1265
1282
  lead test by PAT verdict, an individuals control chart (five or more wafers), a capability goal plot and a
1266
1283
  pass-rate bar when tests have limits, and a sweep of the first
1267
- tests in test order. Edit any of them to see how it is set. Pressing the button again adds only what is missing. Every change you make there is drawn at once; there is no Apply
1284
+ tests in test order. Each example has <strong>Add to my plots</strong>, and <strong>Add all</strong> adds the ones you do not have yet and shows My plots, with an <strong>Undo</strong>; edit a plot to see how it is set. Every change you make there is drawn at once; there is no Apply
1268
1285
  button, and the plot is kept as you go.</p>
1269
1286
  <p>In <strong>Setup</strong>, choose the <strong>chart type</strong>, then the field for each role:</p>
1270
1287
  <table>
@@ -1488,6 +1505,11 @@ scatter or histogram of yield cannot, and says why.</li>
1488
1505
  <p>When fields do not go together, the list says so before you choose: a field that would leave a plot that cannot be
1489
1506
  drawn is dimmed in the <strong>X</strong>, <strong>Y</strong> and <strong>Colour</strong> lists with the reason after it, and does nothing when picked. A plot
1490
1507
  that cannot be drawn says in words what is wrong and what to use instead.</p>
1508
+ <p>The <strong>JSON</strong> tab shows the plot as text, in the format of a saved plots file, for when a plot is easier to copy, share or
1509
+ paste in than to rebuild with the controls. Edit the text and choose <strong>Apply</strong>; the plot changes only then, and the tab says
1510
+ beforehand if a setting would be left out or the text is not a plot. Suggestions appear as you type inside a key or a string and after a comma, brace, colon or bracket, or on demand from the <strong>Suggest</strong> button or <strong>Ctrl/Cmd+Space</strong>: the plot&#39;s settings, the words a setting can take, your lot&#39;s test numbers and wafer fields. Use <strong>Up</strong> and <strong>Down</strong>, then <strong>Tab</strong> or <strong>Enter</strong> to accept, or <strong>Esc</strong> to close the list. A list that opened by itself leaves <strong>Enter</strong> as a new line until you type a letter or use the arrow keys; <strong>Tab</strong> always accepts. <strong>Discard edits</strong> drops text not yet applied;
1511
+ <strong>Ctrl/Cmd+Z</strong> (and <strong>Shift+Ctrl/Cmd+Z</strong>) step back and forward through the text you have typed, accepted or discarded and then through what you have applied, and the window&#39;s <strong>Reset</strong> and <strong>Cancel</strong> go back to the plot as it was when the window opened. <strong>Copy</strong> puts the text on the clipboard. The id is not part of the text, and a plots file can be pasted too, and when it holds several plots the tab lists them to choose one.</p>
1512
+ <p>A heatmap, or a scatter coloured by a number, also has <strong>Colours</strong> in Customise: blue to orange around zero (the automatic choice for values rescaled to a z-score), orange-red to blue for a yield or pass rate (bad to good), or any of the map&#39;s gradients (Viridis, Cividis, Plasma, Traffic and the rest), with <strong>Reverse colours</strong> to flip the direction. Blue to orange, orange-red to blue and Cividis stay distinguishable for the common kinds of colour blindness; Traffic and Jet do not, so they are offered by choice and never the automatic one. A gradient is stretched over the plot&#39;s own lowest and highest values, so it says &quot;relative to this plot&quot;, not &quot;above a target&quot;.</p>
1491
1513
  <p>In <strong>Customise</strong>, the <strong>title</strong> and each <strong>axis title</strong> are written for you until
1492
1514
  you type your own (the box shows what it would say, and clearing it brings that
1493
1515
  back). If you type a title and later change the fields, the plot says when the title
@@ -1614,7 +1636,7 @@ reads 0.55 from <code>Fmax @ 0.55 V</code>, and <code>-{x}</code> reads 5 from <
1614
1636
  naming the word, and is not applied, so the curve beside it never shows
1615
1637
  something you did not mean. <strong>+ Add series</strong> adds a curve and <strong>Remove</strong> drops
1616
1638
  one; the crossing and widths appear once there are two.</p>
1617
- <p><strong>A sweep remembers what its tests were called.</strong> The editor and <strong>+ New sweep</strong> record each test&#39;s name
1639
+ <p><strong>A sweep remembers what its tests were called.</strong> The editor records each test&#39;s name
1618
1640
  alongside its number. Open the sweep on a lot where a number now carries a different name (a test program that
1619
1641
  reuses numbers for other measurements) and that test is not drawn: the card names it, and the crossing and widths
1620
1642
  are not measured, rather than presenting another quantity as the original curve. Renaming a test in the selector
@@ -1673,7 +1695,7 @@ point to open this wafer&quot;) are left out. A chart on the <strong>My plots</s
1673
1695
  its wafers and dies in the same place. The image takes the card&#39;s own background, so a dark
1674
1696
  theme saves a dark chart. The file name identifies the lot, wafers and chart (see below).</p>
1675
1697
  <p><strong>Printing.</strong> The dropdowns, toggles and buttons (Expand, the \u22EF menu button and, on the My plots tab, New
1676
- plot, Add examples, Import, Export, Delete all, Edit, Duplicate and Delete) are left off the printed page.
1698
+ plot, Examples, Import, Export, Delete all, Edit, Duplicate and Delete) are left off the printed page.
1677
1699
  In their place each chart prints a small block under its title giving the same settings and
1678
1700
  lines as the saved image, so a printed histogram says which test it is of.</p>
1679
1701
  <h3 id="wmap-names-of-saved-files">Names of saved files</h3>
@@ -1846,7 +1868,7 @@ and sets sample sizes only for static limits.</li>
1846
1868
  <p>Neighbourhood screens (good die in a bad neighbourhood) are not part of AEC-Q001 and are not in this card.
1847
1869
  Treat the counts as a way to find out where PAT would matter and which tests drive it.</p>
1848
1870
  <h3 id="wmap-example-plots">10.13 Example plots</h3>
1849
- <p><strong>Add examples</strong> chooses its tests from the data in view rather than the order they are listed in. The <strong>lead test</strong>
1871
+ <p><strong>Examples</strong> chooses its tests from the data in view rather than the order they are listed in. The <strong>lead test</strong>
1850
1872
  is the one with the largest share of its variation lying between wafers (for a single wafer, the one most tied to
1851
1873
  distance from the centre); its <strong>partner</strong> is the test that follows it most closely over a sample of dies (correlation
1852
1874
  above 0.3); the <strong>split</strong> is the lot field whose groups explain most of the lead test&#39;s variation between wafers,
@@ -1,3 +1,3 @@
1
- export declare const WMAP_VERSION = "0.38.0";
2
- export declare const WMAP_BUILD_TIME = "2026-10-28T18:00:48.604Z";
1
+ export declare const WMAP_VERSION = "0.39.0";
2
+ export declare const WMAP_BUILD_TIME = "2026-11-01T07:39:49.203Z";
3
3
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- export const WMAP_VERSION="0.38.0",WMAP_BUILD_TIME="2026-10-28T18:00:48.604Z";
1
+ export const WMAP_VERSION="0.39.0",WMAP_BUILD_TIME="2026-11-01T07:39:49.203Z";
@@ -6,6 +6,8 @@ export interface VirtualColumn<R> {
6
6
  sortKey?: (row: R) => number | string | undefined;
7
7
  /** Right-align (numbers). */
8
8
  numeric?: boolean;
9
+ /** A colour behind the cell (see cellShade.ts), or undefined for none. */
10
+ shade?: (row: R) => string | undefined;
9
11
  }
10
12
  export interface VirtualTableOptions<R> {
11
13
  columns: VirtualColumn<R>[];
@@ -1 +1 @@
1
- import{ensureStylesInjected as U}from"./dieList.js";import{CLR as _,RADIUS as K}from"./toolbar.js";const X=64,G=260,J=7.4;export function createVirtualTable(h){const l=h.ownerDocument??document;U(l);const b=h.rowHeight??24,L=h.overscan??10,w=h.columns;let c=h.rows,g=null,C=-1,x=1,M=0,k=-1;const i=l.createElement("div");Object.assign(i.style,{overflow:"auto",flex:"1",minHeight:"0",minWidth:"0",border:`1px solid ${_.menuBorder}`,borderRadius:K.control}),i.tabIndex=0,i.setAttribute("role","region"),i.setAttribute("aria-label",h.ariaLabel);const d=l.createElement("table");d.className="wmap-dielist-table",d.setAttribute("aria-label",h.ariaLabel),d.style.tableLayout="fixed";const N=l.createElement("colgroup"),j=Math.min(c.length,50);let H=0;w.forEach(t=>{let n=t.header.length+2;for(let o=0;o<j;o++)n=Math.max(n,t.get(c[o]).length);const e=Math.max(X,Math.min(G,Math.round(n*J+20)));H+=e;const a=l.createElement("col");a.style.width=`${e}px`,N.appendChild(a)}),d.style.width=`${H}px`,d.style.minWidth="100%",d.appendChild(N);const R=l.createElement("thead"),O=l.createElement("tr"),S=[];w.forEach((t,n)=>{const e=l.createElement("th");e.className="wmap-dielist-th",e.scope="col",e.textContent=t.header,e.style.cursor="pointer",e.style.overflow="hidden",e.style.textOverflow="ellipsis",t.numeric&&(e.style.textAlign="right"),e.setAttribute("aria-sort","none"),e.tabIndex=0;const a=()=>B(n);e.addEventListener("click",a),e.addEventListener("keydown",o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),a())}),S.push(e),O.appendChild(e)}),R.appendChild(O),d.appendChild(R);const $=l.createElement("tbody");d.appendChild($),i.appendChild(d);const D=()=>{const t=l.createElement("tr");t.setAttribute("aria-hidden","true");const n=l.createElement("td");return n.colSpan=w.length,n.style.padding="0",n.style.border="none",t.appendChild(n),t},F=D(),I=D(),q=t=>c[g?g[t]:t];function z(){return i.clientHeight>0?i.clientHeight:h.fallbackViewportHeight??480}function E(t=!1){const n=c.length,e=R.offsetHeight||b,a=Math.max(0,i.scrollTop-e),o=Math.max(0,Math.floor(a/b)-L),r=Math.min(n-1,Math.ceil((a+z())/b)+L);if(!t&&o===M&&r===k)return;M=o,k=r;const p=l.createDocumentFragment();F.firstElementChild.style.height=`${o*b}px`,I.firstElementChild.style.height=`${Math.max(0,n-1-r)*b}px`,p.appendChild(F);for(let s=o;s<=r;s++){const u=q(s),m=l.createElement("tr");m.style.height=`${b}px`,m.setAttribute("aria-rowindex",String(s+2));for(const y of w){const f=l.createElement("td");f.className="wmap-dielist-td",f.textContent=y.get(u),f.style.overflow="hidden",f.style.textOverflow="ellipsis",y.numeric&&(f.style.textAlign="right"),m.appendChild(f)}if(h.onRowClick){m.style.cursor="pointer";const y=g?g[s]:s;m.addEventListener("click",()=>h.onRowClick(u,y))}p.appendChild(m)}p.appendChild(I),$.replaceChildren(p)}function B(t){C===t?x=x===1?-1:1:(C=t,x=1),S.forEach((n,e)=>n.setAttribute("aria-sort",e!==C?"none":x===1?"ascending":"descending")),S.forEach((n,e)=>{n.textContent=w[e].header+(e===C?x===1?" \u25B2":" \u25BC":"")}),T(),i.scrollTop=0,E(!0)}function T(){const t=c.length;if(C<0||t===0){g=null;return}const n=w[C],e=n.sortKey??n.get,a=new Array(t);for(let r=0;r<t;r++)a[r]=e(c[r]);const o=new Uint32Array(t);for(let r=0;r<t;r++)o[r]=r;o.sort((r,p)=>{const s=a[r],u=a[p],m=s===void 0||s===""||typeof s=="number"&&Number.isNaN(s),y=u===void 0||u===""||typeof u=="number"&&Number.isNaN(u);if(m||y)return m===y?r-p:m?1:-1;const f=typeof s=="number"&&typeof u=="number"?s-u:String(s).localeCompare(String(u),void 0,{numeric:!0});return f!==0?f*x:r-p}),g=o}let v=0;const A=l.defaultView,V=()=>{v||(A&&typeof A.requestAnimationFrame=="function"?v=A.requestAnimationFrame(()=>{v=0,E()}):E())};i.addEventListener("scroll",V);const W=typeof ResizeObserver<"u"?new ResizeObserver(()=>E()):null;return W?.observe(i),d.setAttribute("aria-rowcount",String(c.length+1)),E(!0),{el:i,get length(){return c.length},orderedRows(){const t=c,n=g;return(function*(){for(let e=0;e<t.length;e++)yield t[n?n[e]:e]})()},setRows(t){c=t,d.setAttribute("aria-rowcount",String(c.length+1)),T(),i.scrollTop=0,E(!0)},drawnRange:()=>({first:M,last:k}),destroy(){i.removeEventListener("scroll",V),W?.disconnect(),v&&A&&A.cancelAnimationFrame(v),i.remove()}}}
1
+ import{ensureStylesInjected as _}from"./dieList.js";import{CLR as K,RADIUS as X}from"./toolbar.js";const G=64,J=260,P=7.4;export function createVirtualTable(u){const l=u.ownerDocument??document;_(l);const b=u.rowHeight??24,L=u.overscan??10,w=u.columns;let c=u.rows,y=null,C=-1,x=1,k=0,M=-1;const i=l.createElement("div");Object.assign(i.style,{overflow:"auto",flex:"1",minHeight:"0",minWidth:"0",border:`1px solid ${K.menuBorder}`,borderRadius:X.control}),i.tabIndex=0,i.setAttribute("role","region"),i.setAttribute("aria-label",u.ariaLabel);const d=l.createElement("table");d.className="wmap-dielist-table",d.setAttribute("aria-label",u.ariaLabel),d.style.tableLayout="fixed";const N=l.createElement("colgroup"),q=Math.min(c.length,50);let H=0;w.forEach(t=>{let n=t.header.length+2;for(let o=0;o<q;o++)n=Math.max(n,t.get(c[o]).length);const e=Math.max(G,Math.min(J,Math.round(n*P+20)));H+=e;const a=l.createElement("col");a.style.width=`${e}px`,N.appendChild(a)}),d.style.width=`${H}px`,d.style.minWidth="100%",d.appendChild(N);const R=l.createElement("thead"),O=l.createElement("tr"),S=[];w.forEach((t,n)=>{const e=l.createElement("th");e.className="wmap-dielist-th",e.scope="col",e.textContent=t.header,e.style.cursor="pointer",e.style.overflow="hidden",e.style.textOverflow="ellipsis",t.numeric&&(e.style.textAlign="right"),e.setAttribute("aria-sort","none"),e.tabIndex=0;const a=()=>U(n);e.addEventListener("click",a),e.addEventListener("keydown",o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),a())}),S.push(e),O.appendChild(e)}),R.appendChild(O),d.appendChild(R);const $=l.createElement("tbody");d.appendChild($),i.appendChild(d);const D=()=>{const t=l.createElement("tr");t.setAttribute("aria-hidden","true");const n=l.createElement("td");return n.colSpan=w.length,n.style.padding="0",n.style.border="none",t.appendChild(n),t},F=D(),I=D(),z=t=>c[y?y[t]:t];function B(){return i.clientHeight>0?i.clientHeight:u.fallbackViewportHeight??480}function E(t=!1){const n=c.length,e=R.offsetHeight||b,a=Math.max(0,i.scrollTop-e),o=Math.max(0,Math.floor(a/b)-L),r=Math.min(n-1,Math.ceil((a+B())/b)+L);if(!t&&o===k&&r===M)return;k=o,M=r;const p=l.createDocumentFragment();F.firstElementChild.style.height=`${o*b}px`,I.firstElementChild.style.height=`${Math.max(0,n-1-r)*b}px`,p.appendChild(F);for(let s=o;s<=r;s++){const h=z(s),m=l.createElement("tr");m.style.height=`${b}px`,m.setAttribute("aria-rowindex",String(s+2));for(const g of w){const f=l.createElement("td");f.className="wmap-dielist-td",f.textContent=g.get(h),f.style.overflow="hidden",f.style.textOverflow="ellipsis",g.numeric&&(f.style.textAlign="right");const j=g.shade?.(h);j&&(f.style.background=j),m.appendChild(f)}if(u.onRowClick){m.style.cursor="pointer";const g=y?y[s]:s;m.addEventListener("click",()=>u.onRowClick(h,g))}p.appendChild(m)}p.appendChild(I),$.replaceChildren(p)}function U(t){C===t?x=x===1?-1:1:(C=t,x=1),S.forEach((n,e)=>n.setAttribute("aria-sort",e!==C?"none":x===1?"ascending":"descending")),S.forEach((n,e)=>{n.textContent=w[e].header+(e===C?x===1?" \u25B2":" \u25BC":"")}),T(),i.scrollTop=0,E(!0)}function T(){const t=c.length;if(C<0||t===0){y=null;return}const n=w[C],e=n.sortKey??n.get,a=new Array(t);for(let r=0;r<t;r++)a[r]=e(c[r]);const o=new Uint32Array(t);for(let r=0;r<t;r++)o[r]=r;o.sort((r,p)=>{const s=a[r],h=a[p],m=s===void 0||s===""||typeof s=="number"&&Number.isNaN(s),g=h===void 0||h===""||typeof h=="number"&&Number.isNaN(h);if(m||g)return m===g?r-p:m?1:-1;const f=typeof s=="number"&&typeof h=="number"?s-h:String(s).localeCompare(String(h),void 0,{numeric:!0});return f!==0?f*x:r-p}),y=o}let v=0;const A=l.defaultView,V=()=>{v||(A&&typeof A.requestAnimationFrame=="function"?v=A.requestAnimationFrame(()=>{v=0,E()}):E())};i.addEventListener("scroll",V);const W=typeof ResizeObserver<"u"?new ResizeObserver(()=>E()):null;return W?.observe(i),d.setAttribute("aria-rowcount",String(c.length+1)),E(!0),{el:i,get length(){return c.length},orderedRows(){const t=c,n=y;return(function*(){for(let e=0;e<t.length;e++)yield t[n?n[e]:e]})()},setRows(t){c=t,d.setAttribute("aria-rowcount",String(c.length+1)),T(),i.scrollTop=0,E(!0)},drawnRange:()=>({first:k,last:M}),destroy(){i.removeEventListener("scroll",V),W?.disconnect(),v&&A&&A.cancelAnimationFrame(v),i.remove()}}}
@@ -44,6 +44,12 @@ export declare function hasAnyKey<T extends object>(obj: T | null | undefined):
44
44
  * Returns 0 for an empty array, matching the callers that treat "no values" as no
45
45
  * extent rather than as ±Infinity.
46
46
  */
47
+ /**
48
+ * A spread this small, as a share of the level it sits on, is noise to colour: a scale stretched over it would make a
49
+ * hundredth of a percent look as large as any other difference. Colour scales are widened to at least this share of the
50
+ * mean, and a set of means within it is left unshaded.
51
+ */
52
+ export declare const NEGLIGIBLE_SPREAD = 0.01;
47
53
  export declare function minOf(values: readonly number[]): number;
48
54
  export declare function maxOf(values: readonly number[]): number;
49
55
  export declare function clamp01(v: number): number;
@@ -1 +1 @@
1
- export function compareNatural(t,r){return t.localeCompare(r,"en",{numeric:!0})}export function prettyKey(t){return t.replace(/([A-Z])/g," $1").replace(/_/g," ").trim().replace(/^./,r=>r.toUpperCase())}export function hasAnyKey(t){if(t==null)return!1;for(const r in t)if(Object.hasOwn(t,r))return!0;return!1}export function minOf(t){if(t.length===0)return 0;let r=t[0];for(let e=1;e<t.length;e++)t[e]<r&&(r=t[e]);return r}export function maxOf(t){if(t.length===0)return 0;let r=t[0];for(let e=1;e<t.length;e++)t[e]>r&&(r=t[e]);return r}export function clamp01(t){return Math.max(0,Math.min(1,t))}export function mean(t){if(t.length===0)return NaN;let r=0;for(const e of t)r+=e;return r/t.length}export function medianOfSorted(t){const r=t.length;if(r===0)return 0;const e=Math.floor(r/2);return r%2===1?t[e]:(t[e-1]+t[e])/2}export function median(t){return medianOfSorted([...t].sort((r,e)=>r-e))}export function percentile98(t){if(t.length===0)return 0;const r=Float64Array.from(t);r.sort();const e=Math.floor(r.length*.98);return r[Math.min(e,r.length-1)]}export function modeOf(t){if(!t.length)return null;const r=new Map;for(const o of t)r.set(o,(r.get(o)??0)+1);let e=0,n=t[0];for(const[o,f]of r)f>e&&(e=f,n=o);return n}const i=/^[=+\-@]/;export function csvField(t){const r=i.test(t)&&Number.isNaN(Number(t))?`'${t}`:t;return/[",\n\r]/.test(r)?`"${r.replace(/"/g,'""')}"`:r}export function escHtml(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}export function arrayEqual(t,r){if(t===r)return!0;if(!t||!r||t.length!==r.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==r[e])return!1;return!0}export function mapEqual(t,r){if(t===r)return!0;if(!t||!r||t.size!==r.size)return!1;for(const[e,n]of t)if(!r.has(e)||r.get(e)!==n)return!1;return!0}export function setEqual(t,r){if(t===r)return!0;if(!t||!r||t.size!==r.size)return!1;for(const e of t)if(!r.has(e))return!1;return!0}export function drain(t){let r=t.next();for(;!r.done;)r=t.next();return r.value}export function asList(t){return t===void 0?[]:Array.isArray(t)?t:[t]}export function toggleHighlight(t,r,e){const n=asList(t),o=e?n.includes(r)?n.filter(f=>f!==r):[...n,r]:n.length===1&&n[0]===r?[]:[r];return o.length===0?void 0:o.length===1?o[0]:o}
1
+ export function compareNatural(t,r){return t.localeCompare(r,"en",{numeric:!0})}export function prettyKey(t){return t.replace(/([a-z\d])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/_/g," ").trim().replace(/^./,r=>r.toUpperCase())}export function hasAnyKey(t){if(t==null)return!1;for(const r in t)if(Object.hasOwn(t,r))return!0;return!1}export const NEGLIGIBLE_SPREAD=.01;export function minOf(t){if(t.length===0)return 0;let r=t[0];for(let e=1;e<t.length;e++)t[e]<r&&(r=t[e]);return r}export function maxOf(t){if(t.length===0)return 0;let r=t[0];for(let e=1;e<t.length;e++)t[e]>r&&(r=t[e]);return r}export function clamp01(t){return Math.max(0,Math.min(1,t))}export function mean(t){if(t.length===0)return NaN;let r=0;for(const e of t)r+=e;return r/t.length}export function medianOfSorted(t){const r=t.length;if(r===0)return 0;const e=Math.floor(r/2);return r%2===1?t[e]:(t[e-1]+t[e])/2}export function median(t){return medianOfSorted([...t].sort((r,e)=>r-e))}export function percentile98(t){if(t.length===0)return 0;const r=Float64Array.from(t);r.sort();const e=Math.floor(r.length*.98);return r[Math.min(e,r.length-1)]}export function modeOf(t){if(!t.length)return null;const r=new Map;for(const o of t)r.set(o,(r.get(o)??0)+1);let e=0,n=t[0];for(const[o,f]of r)f>e&&(e=f,n=o);return n}const i=/^[=+\-@]/;export function csvField(t){const r=i.test(t)&&Number.isNaN(Number(t))?`'${t}`:t;return/[",\n\r]/.test(r)?`"${r.replace(/"/g,'""')}"`:r}export function escHtml(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}export function arrayEqual(t,r){if(t===r)return!0;if(!t||!r||t.length!==r.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==r[e])return!1;return!0}export function mapEqual(t,r){if(t===r)return!0;if(!t||!r||t.size!==r.size)return!1;for(const[e,n]of t)if(!r.has(e)||r.get(e)!==n)return!1;return!0}export function setEqual(t,r){if(t===r)return!0;if(!t||!r||t.size!==r.size)return!1;for(const e of t)if(!r.has(e))return!1;return!0}export function drain(t){let r=t.next();for(;!r.done;)r=t.next();return r.value}export function asList(t){return t===void 0?[]:Array.isArray(t)?t:[t]}export function toggleHighlight(t,r,e){const n=asList(t),o=e?n.includes(r)?n.filter(f=>f!==r):[...n,r]:n.length===1&&n[0]===r?[]:[r];return o.length===0?void 0:o.length===1?o[0]:o}
@@ -1 +1 @@
1
- import{stepDecimals as m}from"./axisTicks.js";const M=[[1e12,"T"],[1e9,"G"],[1e6,"M"],[1e3,"k"],[1,""],[.001,"m"],[1e-6,"\xB5"],[1e-9,"n"],[1e-12,"p"],[1e-15,"f"]];export const SI_PREFIX_SCALE={T:1e12,G:1e9,M:1e6,k:1e3,m:.001,\u00B5:1e-6,u:1e-6,n:1e-9,p:1e-12,f:1e-15},KNOWN_BASE_UNITS=["Hz","V","A","W","F","\u03A9","Ohm","ohm","S","H","J","C","s"];function p(t){for(const e of KNOWN_BASE_UNITS)if(t.length===e.length+1&&t.endsWith(e)){const n=t[0];if(n in SI_PREFIX_SCALE)return{preScale:SI_PREFIX_SCALE[n],base:e}}return{preScale:1,base:t}}export function nameStatesUnit(t,e){if(!t||!e)return!1;let n=t.trimEnd();if((n.endsWith(")")||n.endsWith("]"))&&(n=n.slice(0,-1)),!n.endsWith(e))return!1;const r=n.length===e.length?"":n[n.length-e.length-1];return r===""||/[\s_\-/([]/.test(r)}function S(t,e){const{preScale:n,base:r}=p(e),i=t*n,o=Math.abs(i),[c,l]=M.find(([s])=>o>=s*.9999)??[1e-15,"f"],a=i/c,x=Math.abs(a),d=x>=100?0:x>=10?1:2;return`${a.toFixed(d)} ${l}${r}`}function $(t){const e=Math.abs(t);if(e===0)return"0%";const n=e>=100?0:e>=10?1:e>=1?2:Math.min(6,1-Math.floor(Math.log10(e)));return`${t.toFixed(n)}%`}function E(t){const e=Math.abs(t),n=Math.floor(Math.log10(e)/3)*3,r=Math.max(-15,Math.min(12,n)),i=t/Math.pow(10,r),o=Math.abs(i),c=o>=100?0:o>=10?1:2,l=r===0?"":`E${r>0?"+":""}${r}`;return`${i.toFixed(c)}${l}`}export const AGGREGATION_METHOD_LABELS={mean:"mean",median:"median",stddev:"std dev",min:"min",max:"max",count:"count",countBin:"occurrence count",percent:"occurrence %"};export function fmtAggregationMethod(t){return AGGREGATION_METHOD_LABELS[t??""]??t??"aggregated"}export function plainBinTerms(t){return t.replace(/\bHBin\b/g,"hard bin").replace(/\bSBin\b/g,"soft bin")}export function fmtExact(t){if(!Number.isFinite(t)||Math.fround(t)!==t)return String(t);for(let e=1;e<=9;e++){const n=Number(t.toPrecision(e));if(Math.fround(n)===t)return String(n)}return String(t)}export function fmt(t,e,n){if(!isFinite(t))return String(t);if(e==="%")return $(t);const r=Math.abs(t);return r===0?e?`0 ${e}`:"0":e!==void 0?S(t,e):n==="si"?S(t,""):r>=.1&&r<1e4?r>=1e3?t.toFixed(0):r>=100?t.toFixed(1):r>=10?t.toFixed(2):t.toFixed(3):E(t)}function A(t,e){const n=e!==void 0&&e>0?m(e/t):void 0;return r=>{if(!isFinite(r))return String(r);if(r===0)return"0";const i=r/t;if(n!==void 0)return i.toFixed(n);const o=Math.abs(i),c=o>=100?0:o>=10?1:2;return i.toFixed(c)}}function _(t,e,n){if(e===void 0||!(e>0))return n;const r=m(e/t)+1;return i=>{if(!isFinite(i))return String(i);if(i===0)return"0";const o=(i/t).toFixed(r);return o.endsWith("0")?o.slice(0,r===1?-2:-1):o}}export function fmtColorbarAxis(t,e,n,r="engineering",i){const o=Math.abs(t),c=(s,u,f,h)=>{const g=h&&i===void 0?h:A(s,i);return{tickFmt:g,edgeFmt:_(s,i,g),axisLabel:u,scaledUnit:f}};if(n==="%")return c(1,e?`${e} (%)`:"%","%");if(n&&nameStatesUnit(e,n)){const s=o===0||o>=.1&&o<1e4;return p(n).preScale!==1||s?c(1,e,n):fmtColorbarAxis(t,e,void 0,r,i)}if(n){const{preScale:s,base:u}=p(n),f=o*s,[h,g]=f===0?[1,""]:M.find(([F])=>f>=F*.9999)??[1e-15,"f"],b=`${g}${u}`;return c(h/s,e?`${e} (${b})`:b,b)}if(o===0||o>=.1&&o<1e4)return c(1,e??"","",s=>fmt(s,void 0,r));if(r==="si"){const[s]=M.find(([h])=>o>=h*.9999)??[1e-15,"f"],u=Math.round(Math.log10(s)),f=u===0?"":`\xD710E${u}`;return c(s,e?f?`${e} (${f})`:e:f,f)}const l=Math.floor(Math.log10(o)/3)*3,a=Math.max(-15,Math.min(12,l)),x=Math.pow(10,a),d=a===0?"":`\xD710E${a}`;return c(x,e?d?`${e} (${d})`:e:d,d)}
1
+ import{stepDecimals as m}from"./axisTicks.js";const M=[[1e12,"T"],[1e9,"G"],[1e6,"M"],[1e3,"k"],[1,""],[.001,"m"],[1e-6,"\xB5"],[1e-9,"n"],[1e-12,"p"],[1e-15,"f"]];export const SI_PREFIX_SCALE={T:1e12,G:1e9,M:1e6,k:1e3,m:.001,\u00B5:1e-6,u:1e-6,n:1e-9,p:1e-12,f:1e-15},KNOWN_BASE_UNITS=["Hz","V","A","W","F","\u03A9","Ohm","ohm","S","H","J","C","s"];function p(e){for(const t of KNOWN_BASE_UNITS)if(e.length===t.length+1&&e.endsWith(t)){const n=e[0];if(n in SI_PREFIX_SCALE)return{preScale:SI_PREFIX_SCALE[n],base:t}}return{preScale:1,base:e}}export function nameStatesUnit(e,t){if(!e||!t)return!1;let n=e.trimEnd();if((n.endsWith(")")||n.endsWith("]"))&&(n=n.slice(0,-1)),!n.endsWith(t))return!1;const r=n.length===t.length?"":n[n.length-t.length-1];return r===""||/[\s_\-/([]/.test(r)}function S(e,t){const{preScale:n,base:r}=p(t),i=e*n,o=Math.abs(i),[c,u]=M.find(([s])=>o>=s*.9999)??[1e-15,"f"],h=i/c,g=Math.abs(h),a=g>=100?0:g>=10?1:2;return`${h.toFixed(a)} ${u}${r}`}function E(e){const t=Math.abs(e);if(t===0)return"0%";const n=t>=100?0:t>=10?1:t>=1?2:Math.min(6,1-Math.floor(Math.log10(t)));return`${e.toFixed(n)}%`}function A(e){const t=Math.abs(e),n=Math.floor(Math.log10(t)/3)*3,r=Math.max(-15,Math.min(12,n)),i=e/Math.pow(10,r),o=Math.abs(i),c=o>=100?0:o>=10?1:2,u=r===0?"":`E${r>0?"+":""}${r}`;return`${i.toFixed(c)}${u}`}export const AGGREGATION_METHOD_LABELS={mean:"mean",median:"median",stddev:"std dev",min:"min",max:"max",count:"count",countBin:"occurrence count",percent:"occurrence %"};export function fmtAggregationMethod(e){return AGGREGATION_METHOD_LABELS[e??""]??e??"aggregated"}export function plainBinTerms(e){return e.replace(/\bHBin\b/g,"hard bin").replace(/\bSBin\b/g,"soft bin")}export function fmtExact(e){if(!Number.isFinite(e)||Math.fround(e)!==e)return String(e);for(let t=1;t<=9;t++){const n=Number(e.toPrecision(t));if(Math.fround(n)===e)return String(n)}return String(e)}export function fmt(e,t,n){if(!isFinite(e))return String(e);if(t==="%")return E(e);const r=Math.abs(e);return r===0?t?`0 ${t}`:"0":t!==void 0?S(e,t):n==="si"?S(e,""):r>=.1&&r<1e4?r>=1e3?e.toFixed(0):r>=100?e.toFixed(1):r>=10?e.toFixed(2):e.toFixed(3):A(e)}function T(e,t){const n=t!==void 0&&t>0?m(t/e):void 0;return r=>{if(!isFinite(r))return String(r);if(r===0)return"0";const i=r/e;if(n!==void 0)return i.toFixed(n);const o=Math.abs(i),c=o>=100?0:o>=10?1:2;return i.toFixed(c)}}function _(e,t,n){if(t===void 0||!(t>0))return n;const r=m(t/e)+1;return i=>{if(!isFinite(i))return String(i);if(i===0)return"0";const o=(i/e).toFixed(r);return o.endsWith("0")?o.slice(0,r===1?-2:-1):o}}const I={"-":"\u207B",0:"\u2070",1:"\xB9",2:"\xB2",3:"\xB3",4:"\u2074",5:"\u2075",6:"\u2076",7:"\u2077",8:"\u2078",9:"\u2079"},F=e=>e===0?"":`\xD710${[...String(e)].map(t=>I[t]).join("")}`;export function fmtColorbarAxis(e,t,n,r="engineering",i){const o=Math.abs(e),c=(s,l,f,d)=>{const x=d&&i===void 0?d:T(s,i);return{tickFmt:x,edgeFmt:_(s,i,x),axisLabel:l,scaledUnit:f}};if(n==="%")return c(1,t?`${t} (%)`:"%","%");if(n&&nameStatesUnit(t,n)){const s=o===0||o>=.1&&o<1e4;return p(n).preScale!==1||s?c(1,t,n):fmtColorbarAxis(e,t,void 0,r,i)}if(n){const{preScale:s,base:l}=p(n),f=o*s,[d,x]=f===0?[1,""]:M.find(([$])=>f>=$*.9999)??[1e-15,"f"],b=`${x}${l}`;return c(d/s,t?`${t} (${b})`:b,b)}if(o===0||o>=.1&&o<1e4)return c(1,t??"","",s=>fmt(s,void 0,r));if(r==="si"){const[s]=M.find(([d])=>o>=d*.9999)??[1e-15,"f"],l=Math.round(Math.log10(s)),f=F(l);return c(s,t?f?`${t} (${f})`:t:f,f)}const u=Math.floor(Math.log10(o)/3)*3,h=Math.max(-15,Math.min(12,u)),g=Math.pow(10,h),a=F(h);return c(g,t?a?`${t} (${a})`:t:a,a)}
@@ -1 +1 @@
1
- import{GUIDE_SECTIONS as e}from"./guideSections.js";export const CHART_CATALOGUE=[{id:"bin-map",kind:"map",title:"Bin map",mode:["hardBin","softBin"],example:"display-control.html",about:"Each die coloured by its hard or soft bin, passing bins in greens and failing bins in other colours, to show where the failures are.",see:["test-value-map","bin-pareto"]},{id:"test-value-map",kind:"map",title:"Test value map",mode:["value"],example:"test-values.html",about:"Each die coloured by one test\u2019s value on a colour scale, with the test\u2019s limits on the colour bar, to show where on the wafer the value shifts.",see:["bin-map","limit-passfail-map","test-passfail-map","value-histogram"]},{id:"limit-passfail-map",kind:"map",title:"Limit pass/fail map",example:"test-values.html",about:"Each die coloured by whether its value for one test lies inside the test\u2019s limits, with the dies below the low limit and above the high limit marked apart, to show where a test fails its limits.",see:["test-value-map","test-passfail-map","pass-rate-by-test"]},{id:"test-passfail-map",kind:"map",title:"Test pass/fail map",example:"test-values.html",about:"Each die coloured by the pass or fail the tester recorded for one test, to show where a test failed, whether or not it has a measured value.",see:["limit-passfail-map","test-value-map","pass-rate-by-test"]},{id:"die-attribute-map",kind:"map",title:"Die attribute map",mode:["metadata"],example:"metadata-mode.html",about:"Each die coloured by an attribute the data carries (a test site, a probe step, a zone), to show whether a pattern follows it.",see:["bin-map"]},{id:"stacked-map",kind:"map",title:"Stacked map",mode:["stackedBins","stackedSoftBins","stackedValues"],example:"lot-stack-analysis.html",about:"The wafers of a lot laid over one another die by die: how often a bin occurs, or a value\u2019s mean, median or spread at each position, to show what repeats from wafer to wafer.",see:["difference-map","reticle-cell-yield"]},{id:"pat-verdict-map",kind:"map",title:"PAT verdict map",tab:"overview",about:"Each die coloured by its part average testing verdict (within the limits, an outlier or failing), on the map or on every wafer of a gallery, to show where the PAT outliers sit.",see:["part-average-testing-pat","bin-map","test-value-map"]},{id:"difference-map",kind:"map",title:"Difference map",card:"difference-map",tab:"distributions",about:"One group\u2019s wafer map less another\u2019s, die position by die position, to show where on the wafer they differ.",guide:[e.heatmap],see:["stacked-map","comparison-by-group"]},{id:"yield-by-wafer",kind:"chart",title:"Yield by wafer",cards:["card-yield"],tab:"overview",about:"Yield of each wafer or group: passing dies as a share of judged dies, with partial and edge-excluded dies left out. The line is the median bar.",see:["bin-pareto","what-divides-yield"]},{id:"bin-pareto",kind:"chart",title:"Bin pareto",cards:["card-bin-pareto"],tab:"overview",about:"Dies in each bin, largest first, so the bins that cost the most yield lead. Shown alone, the line is the running share of all dies.",see:["bin-map","pareto"]},{id:"pass-rate-by-test",kind:"chart",title:"Pass rate by test",cards:["card-pass-rate"],tab:"overview",about:"The share of judged dies that pass each test, lowest first, so the tests that fail the most dies lead.",see:["process-capability","bin-pareto"]},{id:"ring-yield",kind:"chart",title:"Ring yield",card:"ring-yield",tab:"overview",about:"Yield of each ring, from the wafer centre to its edge, to show a radial pattern.",see:["ring-yield-by-wafer","quadrant-yield","bin-map"]},{id:"ring-yield-by-wafer",kind:"chart",title:"Ring yield by wafer",cards:["card-ring-wafer"],tab:"overview",about:"Yield of each ring on each wafer (or group), as a colour, to show whether a radial pattern is on every wafer or on one.",guide:[e.heatmap],see:["ring-yield","heatmap"]},{id:"quadrant-yield",kind:"chart",title:"Quadrant yield",card:"quadrant-yield",tab:"overview",about:"Yield of each quarter of the wafer, to show a one-sided pattern.",see:["quadrant-yield-by-wafer","ring-yield","bin-map"]},{id:"quadrant-yield-by-wafer",kind:"chart",title:"Quadrant yield by wafer",cards:["card-quadrant-wafer"],tab:"overview",about:"Yield of each quarter of the wafer on each wafer (or group), as a colour, to show whether a one-sided pattern is on every wafer or on one.",guide:[e.heatmap],see:["quadrant-yield","ring-yield-by-wafer","heatmap"]},{id:"reticle-cell-yield",kind:"chart",title:"Reticle cell yield",card:"reticle-yield",tab:"overview",about:"Yield of each position in the reticle, pooled over every shot on every wafer. A cell low everywhere points at the mask rather than the wafer.",see:["stacked-map","ring-yield"]},{id:"test-value-distribution",kind:"chart",title:"Test value distribution",cards:["card-box"],tab:"distributions",about:"How one test\u2019s values spread on each wafer or group: the box holds the middle half of the dies, the line inside it is the median, and the whiskers reach the lowest and highest values.",see:["box-plot","value-histogram"]},{id:"value-histogram",kind:"chart",title:"Value histogram",cards:["card-histogram"],tab:"distributions",about:"How one test\u2019s values are distributed: the number of dies in each value range, with the test\u2019s limits marked.",see:["histogram","probability-plot","test-value-map"]},{id:"histogram-of-the-dies-picked",kind:"chart",title:"Histogram of the dies picked",cards:["drill-histogram"],tab:"drilldown",about:"How one test\u2019s values are distributed over the dies picked: the number of dies in each value range, with the test\u2019s limits marked.",see:["value-histogram"]},{id:"wafer-to-wafer-trend",kind:"chart",title:"Wafer-to-wafer trend",cards:["card-trend"],tab:"distributions",about:"Each wafer\u2019s mean of one test in wafer order, with a band of one standard deviation either side, to show drift through the lot.",guide:[e.bands],see:["control-chart","line-chart"]},{id:"test-scatter",kind:"chart",title:"Test scatter",cards:["card-scatter"],tab:"correlation",about:"One test against another, a point per die, to show whether the two move together. r is the correlation coefficient and n the number of dies.",guide:[e.fit],see:["test-correlation-matrix","scatter-plot"]},{id:"test-correlation-matrix",kind:"chart",title:"Test correlation matrix",card:"correlation",tab:"correlation",about:"The correlation of every pair of tests. A strong colour means two tests move together; click a cell to show the pair in the scatter.",see:["test-scatter","heatmap"]},{id:"process-capability",kind:"chart",title:"Process capability",card:"capability",tab:"distributions",about:"Every test with limits on one scale, the low limit at 0 and the high limit at 1, sorted lowest Ppk first, so the tests closest to their limits lead.",guide:[e.goal],see:["capability-goal-plot","pass-rate-by-test"]},{id:"comparison-by-group",kind:"table",title:"Comparison by group",card:"comparison",tab:"distributions",about:"Yield and each test compared between groups, counting each wafer once, with how likely a difference this large is by chance.",guide:[e.groups],see:["what-divides-yield","difference-map","box-plot"]},{id:"what-divides-yield",kind:"table",title:"What divides yield",card:"commonality",tab:"overview",about:"The wafer and lot fields ranked by how strongly they divide yield, as places to look for a cause.",guide:[e.dividesYield],see:["comparison-by-group","yield-by-wafer"]},{id:"part-average-testing-pat",kind:"table",title:"Part average testing (PAT)",card:"pat",tab:"overview",about:"Dies outside part average testing limits, set from each wafer\u2019s own spread of each test (the AEC-Q001 method), by wafer and by test.",guide:[e.pat],see:["pat-verdict-map","process-capability","scatter-plot"]},{id:"scatter-plot",kind:"chart",title:"Scatter plot",chart:"scatter",tab:"plots",about:"One field against another, a point per die or per wafer, to show whether they move together.",guide:[e.fit],see:["test-scatter","heatmap"]},{id:"histogram",kind:"chart",title:"Histogram",chart:"histogram",tab:"plots",about:"How a value is distributed: the number of dies or wafers in each value range.",see:["value-histogram","probability-plot","box-plot"]},{id:"box-plot",kind:"chart",title:"Box plot",chart:"box",tab:"plots",about:"How a value spreads in each category: the box holds the middle half, the line inside it is the median, and the whiskers reach the lowest and highest values.",guide:[e.groups],see:["test-value-distribution","nested-categories","probability-plot"]},{id:"bar-chart",kind:"chart",title:"Bar chart",chart:"bar",tab:"plots",about:"A count, a share or a summary value for each category, side by side.",see:["pareto","stacked-bars-and-shares","yield-by-wafer"]},{id:"line-chart",kind:"chart",title:"Line chart",chart:"line",tab:"plots",about:"A summary value in order along the X axis (wafer order, a test, a condition), to show a trend.",guide:[e.bands],see:["control-chart","sweep","wafer-to-wafer-trend"]},{id:"sweep",kind:"chart",title:"Sweep",chart:"sweep",tab:"plots",about:"A measured value against a swept condition, a curve per series, to show how the part responds across the range.",see:["line-chart"]},{id:"probability-plot",kind:"chart",title:"Probability plot",chart:"probability",tab:"plots",about:"The share of values at or below each value, a curve per colour, so whole distributions compare, tails included.",guide:[e.probability],see:["histogram","box-plot"]},{id:"control-chart",kind:"chart",title:"Control chart",chart:"control",tab:"plots",about:"One value per wafer in order against its centre line and control limits, with the points that break a Western Electric rule marked.",guide:[e.control],see:["wafer-to-wafer-trend","line-chart","capability-goal-plot"]},{id:"capability-goal-plot",kind:"chart",title:"Capability goal plot",chart:"goal",tab:"plots",about:"Each test with both limits placed by how far its mean is off centre and how wide its spread is, as shares of its limit window. A test outside the solid triangle is short of Ppk 1.33.",guide:[e.goal],see:["process-capability","control-chart"]},{id:"heatmap",kind:"chart",title:"Heatmap",chart:"heatmap",tab:"plots",about:"A value for every pair of two categories, as a colour, to show where the two interact.",guide:[e.heatmap],see:["test-correlation-matrix","difference-map","bar-chart"]},{id:"pareto",kind:"chart",title:"Pareto",tab:"plots",about:"Categories largest first with a line for their running share, to show which few account for most of the total.",see:["bin-pareto","bar-chart"]},{id:"stacked-bars-and-shares",kind:"chart",title:"Stacked bars and shares",tab:"plots",about:"Each bar split into its colours, as counts or as each colour\u2019s share of its own total, to show what a category is made of.",see:["bar-chart"]},{id:"nested-categories",kind:"chart",title:"Nested categories",tab:"plots",about:"A box or bar with categories inside categories, such as lots with their wafers, to show whether variation sits between or within the groups.",guide:[e.ranges],see:["box-plot","bar-chart"]},{id:"panels-small-multiples",kind:"chart",title:"Panels (small multiples)",tab:"plots",about:"One small chart per value of a field, on shared axes, to compare the same view across groups side by side.",guide:[e.ranges],see:["box-plot","scatter-plot","histogram"]},{id:"statistics-table",kind:"table",title:"Statistics table",tab:"data",about:"One row per test and group: the count, mean, spread, extremes, limits and capability, to read the numbers behind the charts.",see:["dies-table","process-capability"]},{id:"dies-table",kind:"table",title:"Dies table",tab:"data",about:"One row per die with its position, bin and values, to see exactly which dies a chart counts; it exports to CSV.",see:["wafers-table","statistics-table"]},{id:"wafers-table",kind:"table",title:"Wafers table",tab:"data",about:"One row per wafer with its attributes and its yield, to check what each wafer is and to compare them.",see:["dies-table","yield-by-wafer"]}];export function catalogueEntry(t){return CHART_CATALOGUE.find(a=>a.id===t)}
1
+ import{GUIDE_SECTIONS as e}from"./guideSections.js";export const CHART_CATALOGUE=[{id:"bin-map",kind:"map",title:"Bin map",mode:["hardBin","softBin"],example:"display-control.html",about:"Each die coloured by its hard or soft bin, passing bins in greens and failing bins in other colours, to show where the failures are.",see:["test-value-map","bin-pareto"]},{id:"test-value-map",kind:"map",title:"Test value map",mode:["value"],example:"test-values.html",about:"Each die coloured by one test\u2019s value on a colour scale, with the test\u2019s limits on the colour bar, to show where on the wafer the value shifts.",see:["bin-map","limit-passfail-map","test-passfail-map","value-histogram"]},{id:"limit-passfail-map",kind:"map",title:"Limit pass/fail map",example:"test-values.html",about:"Each die coloured by whether its value for one test lies inside the test\u2019s limits, with the dies below the low limit and above the high limit marked apart, to show where a test fails its limits.",see:["test-value-map","test-passfail-map","pass-rate-by-test"]},{id:"test-passfail-map",kind:"map",title:"Test pass/fail map",example:"test-values.html",about:"Each die coloured by the pass or fail the tester recorded for one test, to show where a test failed, whether or not it has a measured value.",see:["limit-passfail-map","test-value-map","pass-rate-by-test"]},{id:"die-attribute-map",kind:"map",title:"Die attribute map",mode:["metadata"],example:"metadata-mode.html",about:"Each die coloured by an attribute the data carries (a test site, a probe step, a zone), to show whether a pattern follows it.",see:["bin-map"]},{id:"stacked-map",kind:"map",title:"Stacked map",mode:["stackedBins","stackedSoftBins","stackedValues"],example:"lot-stack-analysis.html",about:"The wafers of a lot laid over one another die by die: how often a bin occurs, or a value\u2019s mean, median or spread at each position, to show what repeats from wafer to wafer.",see:["difference-map","reticle-cell-yield"]},{id:"pat-verdict-map",kind:"map",title:"PAT verdict map",tab:"overview",about:"Each die coloured by its part average testing verdict (within the limits, an outlier or failing), on the map or on every wafer of a gallery, to show where the PAT outliers sit.",see:["part-average-testing-pat","bin-map","test-value-map"]},{id:"difference-map",kind:"map",title:"Difference map",card:"difference-map",tab:"distributions",about:"One group\u2019s wafer map less another\u2019s, die position by die position, to show where on the wafer they differ.",guide:[e.heatmap],see:["stacked-map","comparison-by-group"]},{id:"yield-by-wafer",kind:"chart",title:"Yield by wafer",cards:["card-yield"],tab:"overview",about:"Yield of each wafer or group: passing dies as a share of judged dies, with partial and edge-excluded dies left out. The line is the median bar.",see:["bin-pareto","what-divides-yield"]},{id:"bin-pareto",kind:"chart",title:"Bin pareto",cards:["card-bin-pareto"],tab:"overview",about:"Dies in each bin, largest first, so the bins that cost the most yield lead. Shown alone, the line is the running share of all dies.",see:["bin-map","pareto"]},{id:"pass-rate-by-test",kind:"chart",title:"Pass rate by test",cards:["card-pass-rate"],tab:"overview",about:"The share of judged dies that pass each test, lowest first, so the tests that fail the most dies lead.",see:["process-capability","bin-pareto"]},{id:"ring-yield",kind:"chart",title:"Ring yield",card:"ring-yield",tab:"overview",about:"Yield of each ring, from the wafer centre to its edge, to show a radial pattern.",see:["ring-yield-by-wafer","quadrant-yield","bin-map"]},{id:"ring-yield-by-wafer",kind:"chart",title:"Ring yield by wafer",cards:["card-ring-wafer"],tab:"overview",about:"Yield of each ring on each wafer (or group), as a colour, to show whether a radial pattern is on every wafer or on one.",guide:[e.heatmap],see:["ring-yield","heatmap"]},{id:"quadrant-yield",kind:"chart",title:"Quadrant yield",card:"quadrant-yield",tab:"overview",about:"Yield of each quarter of the wafer, to show a one-sided pattern.",see:["quadrant-yield-by-wafer","ring-yield","bin-map"]},{id:"quadrant-yield-by-wafer",kind:"chart",title:"Quadrant yield by wafer",cards:["card-quadrant-wafer"],tab:"overview",about:"Yield of each quarter of the wafer on each wafer (or group), as a colour, to show whether a one-sided pattern is on every wafer or on one.",guide:[e.heatmap],see:["quadrant-yield","ring-yield-by-wafer","heatmap"]},{id:"reticle-cell-yield",kind:"chart",title:"Reticle cell yield",card:"reticle-yield",tab:"overview",about:"Yield of each position in the reticle, pooled over every shot on every wafer. A cell low everywhere points at the mask rather than the wafer.",see:["stacked-map","ring-yield"]},{id:"yield-by-site",kind:"chart",title:"Yield by site",cards:["card-site"],tab:"overview",about:"Yield of each test site (probe position): passing dies as a share of judged dies, over every wafer. Shown when the dies come from two sites or more.",see:["yield-by-wafer","reticle-cell-yield"]},{id:"re-probed-dies",kind:"chart",title:"Re-probed dies",cards:["card-reprobed"],tab:"overview",about:"The share of dies that were probed more than once, by ring on each wafer (or group), to show where the retests are. Drawn when the lot has re-probed dies.",guide:[e.heatmap],see:["yield-by-site","ring-yield-by-wafer","heatmap"]},{id:"tests-by-wafer",kind:"chart",title:"Tests by wafer",cards:["card-tests-wafer"],tab:"distributions",about:"The tests whose wafers (or groups) differ most, one row each, as a grid of z-scores: where a wafer is above or below that test\u2019s average.",guide:[e.heatmap],see:["heatmap","test-value-distribution","comparison-by-group"]},{id:"test-value-distribution",kind:"chart",title:"Test value distribution",cards:["card-box"],tab:"distributions",about:"How one test\u2019s values spread on each wafer or group: the box holds the middle half of the dies, the line inside it is the median, and the whiskers reach the lowest and highest values.",see:["box-plot","value-histogram"]},{id:"value-histogram",kind:"chart",title:"Value histogram",cards:["card-histogram"],tab:"distributions",about:"How one test\u2019s values are distributed: the number of dies in each value range, with the test\u2019s limits marked.",see:["histogram","probability-plot","test-value-map"]},{id:"histogram-of-the-dies-picked",kind:"chart",title:"Histogram of the dies picked",cards:["drill-histogram"],tab:"drilldown",about:"How one test\u2019s values are distributed over the dies picked: the number of dies in each value range, with the test\u2019s limits marked.",see:["value-histogram"]},{id:"wafer-to-wafer-trend",kind:"chart",title:"Wafer-to-wafer trend",cards:["card-trend"],tab:"distributions",about:"Each wafer\u2019s mean of one test in wafer order, with a band of one standard deviation either side, to show drift through the lot.",guide:[e.bands],see:["control-chart","line-chart"]},{id:"test-scatter",kind:"chart",title:"Test scatter",cards:["card-scatter"],tab:"correlation",about:"One test against another, a point per die, to show whether the two move together. r is the correlation coefficient and n the number of dies.",guide:[e.fit],see:["test-correlation-matrix","scatter-plot"]},{id:"test-correlation-matrix",kind:"chart",title:"Test correlation matrix",card:"correlation",tab:"correlation",about:"The correlation of every pair of tests. A strong colour means two tests move together; click a cell to show the pair in the scatter.",see:["test-scatter","heatmap"]},{id:"process-capability",kind:"chart",title:"Process capability",card:"capability",tab:"distributions",about:"Every test with limits on one scale, the low limit at 0 and the high limit at 1, sorted lowest Ppk first, so the tests closest to their limits lead.",guide:[e.goal],see:["capability-goal-plot","pass-rate-by-test"]},{id:"comparison-by-group",kind:"table",title:"Comparison by group",card:"comparison",tab:"distributions",about:"Yield and each test compared between groups, counting each wafer once, with how likely a difference this large is by chance.",guide:[e.groups],see:["what-divides-yield","difference-map","box-plot"]},{id:"what-divides-yield",kind:"table",title:"What divides yield",card:"commonality",tab:"overview",about:"The wafer and lot fields ranked by how strongly they divide yield, as places to look for a cause.",guide:[e.dividesYield],see:["comparison-by-group","yield-by-wafer"]},{id:"part-average-testing-pat",kind:"table",title:"Part average testing (PAT)",card:"pat",tab:"overview",about:"Dies outside part average testing limits, set from each wafer\u2019s own spread of each test (the AEC-Q001 method), by wafer and by test.",guide:[e.pat],see:["pat-verdict-map","process-capability","scatter-plot"]},{id:"scatter-plot",kind:"chart",title:"Scatter plot",chart:"scatter",tab:"plots",about:"One field against another, a point per die or per wafer, to show whether they move together.",guide:[e.fit],see:["test-scatter","heatmap"]},{id:"histogram",kind:"chart",title:"Histogram",chart:"histogram",tab:"plots",about:"How a value is distributed: the number of dies or wafers in each value range.",see:["value-histogram","probability-plot","box-plot"]},{id:"box-plot",kind:"chart",title:"Box plot",chart:"box",tab:"plots",about:"How a value spreads in each category: the box holds the middle half, the line inside it is the median, and the whiskers reach the lowest and highest values.",guide:[e.groups],see:["test-value-distribution","nested-categories","probability-plot"]},{id:"bar-chart",kind:"chart",title:"Bar chart",chart:"bar",tab:"plots",about:"A count, a share or a summary value for each category, side by side.",see:["pareto","stacked-bars-and-shares","yield-by-wafer"]},{id:"line-chart",kind:"chart",title:"Line chart",chart:"line",tab:"plots",about:"A summary value in order along the X axis (wafer order, a test, a condition), to show a trend.",guide:[e.bands],see:["control-chart","sweep","wafer-to-wafer-trend"]},{id:"sweep",kind:"chart",title:"Sweep",chart:"sweep",tab:"plots",about:"A measured value against a swept condition, a curve per series, to show how the part responds across the range.",see:["line-chart"]},{id:"probability-plot",kind:"chart",title:"Probability plot",chart:"probability",tab:"plots",about:"The share of values at or below each value, a curve per colour, so whole distributions compare, tails included.",guide:[e.probability],see:["histogram","box-plot"]},{id:"control-chart",kind:"chart",title:"Control chart",chart:"control",tab:"plots",about:"One value per wafer in order against its centre line and control limits, with the points that break a Western Electric rule marked.",guide:[e.control],see:["wafer-to-wafer-trend","line-chart","capability-goal-plot"]},{id:"capability-goal-plot",kind:"chart",title:"Capability goal plot",chart:"goal",tab:"plots",about:"Each test with both limits placed by how far its mean is off centre and how wide its spread is, as shares of its limit window. A test outside the solid triangle is short of Ppk 1.33.",guide:[e.goal],see:["process-capability","control-chart"]},{id:"heatmap",kind:"chart",title:"Heatmap",chart:"heatmap",tab:"plots",about:"A value for every pair of two categories, as a colour, to show where the two interact.",guide:[e.heatmap],see:["test-correlation-matrix","difference-map","bar-chart"]},{id:"pareto",kind:"chart",title:"Pareto",tab:"plots",about:"Categories largest first with a line for their running share, to show which few account for most of the total.",see:["bin-pareto","bar-chart"]},{id:"stacked-bars-and-shares",kind:"chart",title:"Stacked bars and shares",tab:"plots",about:"Each bar split into its colours, as counts or as each colour\u2019s share of its own total, to show what a category is made of.",see:["bar-chart"]},{id:"nested-categories",kind:"chart",title:"Nested categories",tab:"plots",about:"A box or bar with categories inside categories, such as lots with their wafers, to show whether variation sits between or within the groups.",guide:[e.ranges],see:["box-plot","bar-chart"]},{id:"panels-small-multiples",kind:"chart",title:"Panels (small multiples)",tab:"plots",about:"One small chart per value of a field, on shared axes, to compare the same view across groups side by side.",guide:[e.ranges],see:["box-plot","scatter-plot","histogram"]},{id:"statistics-table",kind:"table",title:"Statistics table",tab:"data",about:"One row per test and group: the count, mean, spread, extremes, limits and capability, to read the numbers behind the charts.",see:["dies-table","process-capability"]},{id:"dies-table",kind:"table",title:"Dies table",tab:"data",about:"One row per die with its position, bin and values, to see exactly which dies a chart counts; it exports to CSV.",see:["wafers-table","statistics-table"]},{id:"wafers-table",kind:"table",title:"Wafers table",tab:"data",about:"One row per wafer with its attributes and its yield, to check what each wafer is and to compare them.",see:["dies-table","yield-by-wafer"]}];export function catalogueEntry(t){return CHART_CATALOGUE.find(a=>a.id===t)}
@@ -0,0 +1,11 @@
1
+ import type { Die } from '../core/dies.js';
2
+ import { type TestDef } from '../renderer/buildWaferMap.js';
3
+ import type { CorrelationMatrix } from './correlation.js';
4
+ /** At most this many tests, the ones that fail on most dies, enter the matrix. */
5
+ export declare const CO_FAILURE_TESTS = 100;
6
+ /**
7
+ * The failing dies of every test with limits that fails on two dies or more, compared pair by pair. A pair's `r` is the share
8
+ * of dies failing either that fail both (null when neither fails anywhere) and its `n` is the dies failing either.
9
+ */
10
+ export declare function buildCoFailureMatrix(dies: readonly Die[], testDefs: readonly TestDef[]): CorrelationMatrix;
11
+ //# sourceMappingURL=coFailure.d.ts.map
@@ -0,0 +1 @@
1
+ import{isParametricTest as d}from"../renderer/buildWaferMap.js";import{markedTestLabel as x,derivedFields as b}from"../renderer/testLabel.js";import{dieFailsTest as F}from"./testPassRate.js";export const CO_FAILURE_TESTS=100;const I=r=>r.limitLow!==void 0||r.limitHigh!==void 0;export function buildCoFailureMatrix(r,g){const i=g.filter(t=>t.testNumber!==void 0&&d(t)&&I(t));if(i.length<2)return{tests:[],cells:[]};const o=new Map,h=[];for(const t of r){let e;for(let n=0;n<i.length;n++)F(t,i[n],"spec")===!0&&((e??=[]).push(n),o.set(n,(o.get(n)??0)+1));e&&h.push(e)}const s=[...o.entries()].filter(([,t])=>t>=2).sort((t,e)=>e[1]-t[1]).slice(0,CO_FAILURE_TESTS).map(([t])=>t).sort((t,e)=>t-e);if(s.length<2)return{tests:[],cells:[]};const u=new Map(s.map((t,e)=>[t,e])),a=new Float64Array(s.length*s.length);for(const t of h){const e=t.filter(n=>u.has(n)).map(n=>u.get(n));for(let n=0;n<e.length;n++)for(let l=n+1;l<e.length;l++)a[e[n]*s.length+e[l]]++}const p=s.map(t=>({testNumber:i[t].testNumber,label:x(i[t],i[t].testNumber),unit:i[t].unit,...b(i[t])})),f=[];for(let t=0;t<s.length;t++)for(let e=0;e<s.length;e++){if(e===t){f.push({xIndex:e,yIndex:t,r:1,n:o.get(s[e])??0});continue}const n=Math.min(e,t),l=Math.max(e,t),m=a[n*s.length+l],c=(o.get(s[e])??0)+(o.get(s[t])??0)-m;f.push({xIndex:e,yIndex:t,r:c>0?m/c:null,n:c})}return{tests:p,cells:f}}
@@ -110,6 +110,13 @@ export declare const CORRELATION_WORK_BUDGET = 250000000;
110
110
  export declare const CORRELATION_SCORE_BUDGET = 25000000;
111
111
  /** The sentence a panel puts next to a matrix built from a sample of the dies or the tests. */
112
112
  export declare function correlationSampleNote(m: Pick<CorrelationMatrix, 'sample' | 'testSample'>): string | undefined;
113
+ /**
114
+ * The dies of several groups with each group's mean taken off every test's values, as dies of test values only, for a
115
+ * correlation within groups: the correlation that is left when a difference between groups (a corner lot's slow and fast
116
+ * wafers moving every test together) is removed. A group with one value of a test contributes none of it. Above the die
117
+ * budget an even spread of the dies is kept, as the matrix itself would; the means are those of every die.
118
+ */
119
+ export declare function demeanWithinGroups(groups: ReadonlyArray<ReadonlyArray<Die>>, testDefs: TestDef[]): Die[];
113
120
  /**
114
121
  * Pearson correlation matrix for the parametric tests in `testDefs` across the
115
122
  * dies in `dies` — every test up to `CORRELATION_TEST_BUDGET` (above it, the
@@ -1 +1 @@
1
- import{dieHasValues as Y,testValue as E}from"../core/dieTable.js";import{isParametricTest as v}from"../renderer/buildWaferMap.js";import{markedTestLabel as P,derivedFields as k}from"../renderer/testLabel.js";export function pearsonFromSums(e,o,i,d,m,c){if(e<3)return null;const g=o/e,u=i/e,a=c/e-g*u,p=d/e-g*g,b=m/e-u*u,M=Math.sqrt(p*b);return M===0?null:Math.max(-1,Math.min(1,a/M))}export function pearsonOfPairs(e){let o=0,i=0,d=0,m=0,c=0,g=0;for(let u=0;u<e.length;u++){const{x:a,y:p}=e[u];!Number.isFinite(a)||!Number.isFinite(p)||(o++,i+=a,d+=p,m+=a*a,c+=p*p,g+=a*p)}return{r:pearsonFromSums(o,i,d,m,c,g),n:o}}export const CORRELATION_DIE_BUDGET=25e3;function O(e,o){const i=[],d=e/o;for(let m=0;m<o;m++)i.push(Math.floor(m*d));return i}export const CORRELATION_TEST_BUDGET=300,CORRELATION_WORK_BUDGET=25e7,CORRELATION_SCORE_BUDGET=25e6;export function correlationSampleNote(e){const o=[];return e.testSample&&o.push(`Among the ${e.testSample.used.toLocaleString()} of ${e.testSample.of.toLocaleString()} tests with the most dies outside their limits, then the widest spread`),e.sample&&o.push(`${o.length?"from":"From"} a ${e.sample.used.toLocaleString()}-die sample of ${e.sample.of.toLocaleString()}, spread evenly across the lot`),o.length?o.join(", "):void 0}function D(e,o,i,d){const m=e.length,c=new Float64Array(m),g=new Float64Array(m),u=new Float64Array(m),a=new Float64Array(m),p=e.map(r=>o.get(r.testNumber)?.limitLow),b=e.map(r=>o.get(r.testNumber)?.limitHigh);for(const r of i)for(let n=0;n<m;n++){const t=E(r,e[n].testNumber);t===void 0||!Number.isFinite(t)||(c[n]++,g[n]+=t,u[n]+=t*t,(p[n]!==void 0&&t<p[n]||b[n]!==void 0&&t>b[n])&&a[n]++)}const M=r=>{if(c[r]<3)return-1;const n=g[r]/c[r],t=Math.sqrt(Math.max(0,u[r]/c[r]-n*n)),f=p[r]!==void 0&&b[r]!==void 0?b[r]-p[r]:Math.abs(n);return f>0?t/f:0},h=e.map((r,n)=>({i:n,fails:c[n]<3?-1:a[n],spread:M(n)}));return h.sort((r,n)=>n.fails-r.fails||n.spread-r.spread||r.i-n.i),h.slice(0,d).map(r=>r.i).sort((r,n)=>r-n).map(r=>e[r])}function z(e){return e.filter(o=>o.testNumber!==void 0&&v(o)).map(o=>({testNumber:o.testNumber,label:P(o,o.testNumber),unit:o.unit,...k(o)}))}export function buildCorrelationMatrix(e,o){const i=z(o);if(i.length<2)return{tests:i,cells:[]};const d=e.filter(Y),c=d.length>CORRELATION_DIE_BUDGET?O(d.length,CORRELATION_DIE_BUDGET).map(s=>d[s]):d,g=i.length>CORRELATION_TEST_BUDGET,u=g?D(i,new Map(o.flatMap(s=>s.testNumber===void 0?[]:[[s.testNumber,s]])),c.length*i.length>CORRELATION_SCORE_BUDGET?O(c.length,Math.max(1,Math.floor(CORRELATION_SCORE_BUDGET/i.length))).map(s=>c[s]):c,CORRELATION_TEST_BUDGET):i,a=u.length*(u.length-1)/2,p=Math.max(1,Math.floor(CORRELATION_WORK_BUDGET/Math.max(1,a))),b=c.length>p?O(c.length,p).map(s=>c[s]):c,M=b.length<d.length,h=u.length,r=u.map(s=>s.testNumber),n=h*(h-1)/2,t=new Float64Array(n),f=new Float64Array(h),x=new Float64Array(n),N=new Float64Array(n),y=new Float64Array(n),w=new Float64Array(n),S=new Float64Array(n);function C(s,l){return s*h-(s*(s+1)>>1)+(l-s-1)}const _=new Float64Array(h),T=new Uint8Array(h);for(const s of b){T.fill(0);for(let l=0;l<h;l++){const I=E(s,r[l]);I!==void 0&&Number.isFinite(I)&&(_[l]=I,T[l]=1)}for(let l=0;l<h;l++){if(!T[l])continue;f[l]++;const I=_[l];for(let F=l+1;F<h;F++){if(!T[F])continue;const A=_[F],R=C(l,F);t[R]++,x[R]+=I,N[R]+=A,y[R]+=I*I,w[R]+=A*A,S[R]+=I*A}}}const X=s=>pearsonFromSums(t[s],x[s],N[s],y[s],w[s],S[s]),L=[];for(let s=0;s<h;s++)for(let l=0;l<h;l++){if(l===s){L.push({xIndex:l,yIndex:s,r:1,n:f[l]});continue}const I=Math.min(l,s),F=Math.max(l,s),A=C(I,F);L.push({xIndex:l,yIndex:s,r:X(A),n:t[A]})}return{tests:u,cells:L,...M?{sample:{of:d.length,used:b.length}}:{},...g?{testSample:{of:i.length,used:u.length}}:{}}}export function filterCorrelationMatrix(e,{threshold:o=.3,minTests:i=6,maxTests:d=20}={}){const m=[];let c=0,g=0,u=null;for(const t of e.cells){if(t.xIndex>=t.yIndex||t.r===null)continue;const f=Math.abs(t.r);m.push({xi:t.xIndex,yi:t.yIndex,absR:f}),(u===null||f>Math.abs(u.r))&&(u={xLabel:e.tests[t.xIndex].label,yLabel:e.tests[t.yIndex].label,r:t.r})}m.sort((t,f)=>f.absR-t.absR);const a=new Set;for(const{xi:t,yi:f,absR:x}of m){const N=x<o;a.size>=d||N&&a.size>=i||(a.add(t),a.size<d&&a.add(f))}if(a.size<Math.min(i,e.tests.length))for(let t=0;t<e.tests.length&&a.size<Math.min(d,i,e.tests.length);t++)a.add(t);const p=(()=>{const t=Array.from(a),f=new Map,x=new Map;for(const{xi:y,yi:w,absR:S}of m)!a.has(y)||!a.has(w)||(f.set(y,(f.get(y)??0)+S),f.set(w,(f.get(w)??0)+S),x.set(y,(x.get(y)??0)+1),x.set(w,(x.get(w)??0)+1));const N=y=>(x.get(y)??0)>0?f.get(y)/x.get(y):0;return t.sort((y,w)=>N(w)-N(y))})(),b=p.map(t=>e.tests[t]),M=new Map(p.map((t,f)=>[t,f])),h=new Set(b.map(t=>t.testNumber)),r=e.cells.filter(t=>h.has(e.tests[t.xIndex].testNumber)&&h.has(e.tests[t.yIndex].testNumber)).map(t=>({xIndex:M.get(t.xIndex),yIndex:M.get(t.yIndex),r:t.r,n:t.n}));let n=0;for(const{xi:t,yi:f,absR:x}of m)a.has(t)&&a.has(f)?x>=.7?c++:x>=.4&&g++:x<o&&n++;return{matrix:{tests:b,cells:r},strongPairs:c,moderatePairs:g,hiddenWeakPairs:n,strongestPair:u}}
1
+ import{dieHasValues as C,testValue as _}from"../core/dieTable.js";import{isParametricTest as k}from"../renderer/buildWaferMap.js";import{markedTestLabel as P,derivedFields as D}from"../renderer/testLabel.js";export function pearsonFromSums(e,o,u,h,l,d){if(e<3)return null;const c=o/e,i=u/e,n=d/e-c*i,f=h/e-c*c,g=l/e-i*i,x=Math.sqrt(f*g);return x===0?null:Math.max(-1,Math.min(1,n/x))}export function pearsonOfPairs(e){let o=0,u=0,h=0,l=0,d=0,c=0;for(let i=0;i<e.length;i++){const{x:n,y:f}=e[i];!Number.isFinite(n)||!Number.isFinite(f)||(o++,u+=n,h+=f,l+=n*n,d+=f*f,c+=n*f)}return{r:pearsonFromSums(o,u,h,l,d,c),n:o}}export const CORRELATION_DIE_BUDGET=25e3;function E(e,o){const u=[],h=e/o;for(let l=0;l<o;l++)u.push(Math.floor(l*h));return u}export const CORRELATION_TEST_BUDGET=300,CORRELATION_WORK_BUDGET=25e7,CORRELATION_SCORE_BUDGET=25e6;export function correlationSampleNote(e){const o=[];return e.testSample&&o.push(`Among the ${e.testSample.used.toLocaleString()} of ${e.testSample.of.toLocaleString()} tests with the most dies outside their limits, then the widest spread`),e.sample&&o.push(`${o.length?"from":"From"} a ${e.sample.used.toLocaleString()}-die sample of ${e.sample.of.toLocaleString()}, spread evenly across the lot`),o.length?o.join(", "):void 0}function z(e,o,u,h){const l=e.length,d=new Float64Array(l),c=new Float64Array(l),i=new Float64Array(l),n=new Float64Array(l),f=e.map(a=>o.get(a.testNumber)?.limitLow),g=e.map(a=>o.get(a.testNumber)?.limitHigh);for(const a of u)for(let s=0;s<l;s++){const t=_(a,e[s].testNumber);t===void 0||!Number.isFinite(t)||(d[s]++,c[s]+=t,i[s]+=t*t,(f[s]!==void 0&&t<f[s]||g[s]!==void 0&&t>g[s])&&n[s]++)}const x=a=>{if(d[a]<3)return-1;const s=c[a]/d[a],t=Math.sqrt(Math.max(0,i[a]/d[a]-s*s)),p=f[a]!==void 0&&g[a]!==void 0?g[a]-f[a]:Math.abs(s);return p>0?t/p:0},y=e.map((a,s)=>({i:s,fails:d[s]<3?-1:n[s],spread:x(s)}));return y.sort((a,s)=>s.fails-a.fails||s.spread-a.spread||a.i-s.i),y.slice(0,h).map(a=>a.i).sort((a,s)=>a-s).map(a=>e[a])}function X(e){return e.filter(o=>o.testNumber!==void 0&&k(o)).map(o=>({testNumber:o.testNumber,label:P(o,o.testNumber),unit:o.unit,...D(o)}))}export function demeanWithinGroups(e,o){const u=X(o).map(c=>c.testNumber),h=e.map(c=>u.map(i=>{let n=0,f=0;for(const g of c){const x=_(g,i);x!==void 0&&Number.isFinite(x)&&(n++,f+=x)}return n?f/n:0})),l=[];return e.forEach((c,i)=>{for(const n of c)C(n)&&l.push({die:n,group:i})}),(l.length>CORRELATION_DIE_BUDGET?E(l.length,CORRELATION_DIE_BUDGET).map(c=>l[c]):l).map(({die:c,group:i})=>{const n={};return u.forEach((f,g)=>{const x=_(c,f);x!==void 0&&Number.isFinite(x)&&(n[f]=x-h[i][g])}),{x:c.x,y:c.y,testValues:n}})}export function buildCorrelationMatrix(e,o){const u=X(o);if(u.length<2)return{tests:u,cells:[]};const h=e.filter(C),d=h.length>CORRELATION_DIE_BUDGET?E(h.length,CORRELATION_DIE_BUDGET).map(r=>h[r]):h,c=u.length>CORRELATION_TEST_BUDGET,i=c?z(u,new Map(o.flatMap(r=>r.testNumber===void 0?[]:[[r.testNumber,r]])),d.length*u.length>CORRELATION_SCORE_BUDGET?E(d.length,Math.max(1,Math.floor(CORRELATION_SCORE_BUDGET/u.length))).map(r=>d[r]):d,CORRELATION_TEST_BUDGET):u,n=i.length*(i.length-1)/2,f=Math.max(1,Math.floor(CORRELATION_WORK_BUDGET/Math.max(1,n))),g=d.length>f?E(d.length,f).map(r=>d[r]):d,x=g.length<h.length,y=i.length,a=i.map(r=>r.testNumber),s=y*(y-1)/2,t=new Float64Array(s),p=new Float64Array(y),b=new Float64Array(s),M=new Float64Array(s),w=new Float64Array(s),I=new Float64Array(s),S=new Float64Array(s);function v(r,m){return r*y-(r*(r+1)>>1)+(m-r-1)}const L=new Float64Array(y),T=new Uint8Array(y);for(const r of g){T.fill(0);for(let m=0;m<y;m++){const N=_(r,a[m]);N!==void 0&&Number.isFinite(N)&&(L[m]=N,T[m]=1)}for(let m=0;m<y;m++){if(!T[m])continue;p[m]++;const N=L[m];for(let F=m+1;F<y;F++){if(!T[F])continue;const A=L[F],R=v(m,F);t[R]++,b[R]+=N,M[R]+=A,w[R]+=N*N,I[R]+=A*A,S[R]+=N*A}}}const Y=r=>pearsonFromSums(t[r],b[r],M[r],w[r],I[r],S[r]),O=[];for(let r=0;r<y;r++)for(let m=0;m<y;m++){if(m===r){O.push({xIndex:m,yIndex:r,r:1,n:p[m]});continue}const N=Math.min(m,r),F=Math.max(m,r),A=v(N,F);O.push({xIndex:m,yIndex:r,r:Y(A),n:t[A]})}return{tests:i,cells:O,...x?{sample:{of:h.length,used:g.length}}:{},...c?{testSample:{of:u.length,used:i.length}}:{}}}export function filterCorrelationMatrix(e,{threshold:o=.3,minTests:u=6,maxTests:h=20}={}){const l=[];let d=0,c=0,i=null;for(const t of e.cells){if(t.xIndex>=t.yIndex||t.r===null)continue;const p=Math.abs(t.r);l.push({xi:t.xIndex,yi:t.yIndex,absR:p}),(i===null||p>Math.abs(i.r))&&(i={xLabel:e.tests[t.xIndex].label,yLabel:e.tests[t.yIndex].label,r:t.r})}l.sort((t,p)=>p.absR-t.absR);const n=new Set;for(const{xi:t,yi:p,absR:b}of l){const M=b<o;n.size>=h||M&&n.size>=u||(n.add(t),n.size<h&&n.add(p))}if(n.size<Math.min(u,e.tests.length))for(let t=0;t<e.tests.length&&n.size<Math.min(h,u,e.tests.length);t++)n.add(t);const f=(()=>{const t=Array.from(n),p=new Map,b=new Map;for(const{xi:w,yi:I,absR:S}of l)!n.has(w)||!n.has(I)||(p.set(w,(p.get(w)??0)+S),p.set(I,(p.get(I)??0)+S),b.set(w,(b.get(w)??0)+1),b.set(I,(b.get(I)??0)+1));const M=w=>(b.get(w)??0)>0?p.get(w)/b.get(w):0;return t.sort((w,I)=>M(I)-M(w))})(),g=f.map(t=>e.tests[t]),x=new Map(f.map((t,p)=>[t,p])),y=new Set(g.map(t=>t.testNumber)),a=e.cells.filter(t=>y.has(e.tests[t.xIndex].testNumber)&&y.has(e.tests[t.yIndex].testNumber)).map(t=>({xIndex:x.get(t.xIndex),yIndex:x.get(t.yIndex),r:t.r,n:t.n}));let s=0;for(const{xi:t,yi:p,absR:b}of l)n.has(t)&&n.has(p)?b>=.7?d++:b>=.4&&c++:b<o&&s++;return{matrix:{tests:g,cells:a},strongPairs:d,moderatePairs:c,hiddenWeakPairs:s,strongestPair:i}}
@@ -16,6 +16,8 @@ export interface DifferenceResult {
16
16
  /** Positions with a difference, and the largest difference either way (for a colour range centred on zero). */
17
17
  compared: number;
18
18
  maxAbs: number;
19
+ /** The mean of the positions' values in group A, the level the differences are judged against. */
20
+ level: number;
19
21
  }
20
22
  /** Group A's mean minus group B's at every position; see the module comment for the rule. */
21
23
  export declare function differenceMap(a: readonly DifferenceWafer[], b: readonly DifferenceWafer[], m: DifferenceMeasure): DifferenceResult;
@@ -1 +1 @@
1
- import{diePassStatus as v,hasPosition as x,isYieldEligibleDie as B,positionKey as d}from"../core/dies.js";import{copyDie as o,testValue as p}from"../core/dieTable.js";import{aggregateValues as h}from"../core/aggregates.js";function M(u,a){return u.map(s=>{const f=new Set(s.passBins);return s.dies.filter(x).map(n=>{let t;if("test"in a)t=p(n,a.test);else if(B(n)){const i=v(n,f);t=i===void 0?void 0:i?100:0}return o(n,{testValues:t===void 0||!Number.isFinite(t)?void 0:{0:t},testPass:void 0})})})}export function differenceMap(u,a,s){const f=h(M(u,s),"mean",0),n=h(M(a,s),"mean",0),t=new Map(n.map(e=>[d(e),p(e,0)]));let i=0,r=0;const c=new Set,m=f.map(e=>{const l=d(e);c.add(l);const V=p(e,0),b=t.get(l);if(V===void 0||b===void 0)return o(e,{testValues:void 0});const g=V-b;return i++,r=Math.max(r,Math.abs(g)),o(e,{testValues:{0:g}})});for(const e of n)c.has(d(e))||m.push(o(e,{testValues:void 0}));return{dies:m,compared:i,maxAbs:r}}
1
+ import{diePassStatus as S,hasPosition as x,isYieldEligibleDie as B,positionKey as l}from"../core/dies.js";import{copyDie as o,testValue as m}from"../core/dieTable.js";import{aggregateValues as v}from"../core/aggregates.js";function M(u,a){return u.map(i=>{const f=new Set(i.passBins);return i.dies.filter(x).map(t=>{let n;if("test"in a)n=m(t,a.test);else if(B(t)){const s=S(t,f);n=s===void 0?void 0:s?100:0}return o(t,{testValues:n===void 0||!Number.isFinite(n)?void 0:{0:n},testPass:void 0})})})}export function differenceMap(u,a,i){const f=v(M(u,i),"mean",0),t=v(M(a,i),"mean",0),n=new Map(t.map(e=>[l(e),m(e,0)]));let s=0,r=0,p=0;const c=new Set,V=f.map(e=>{const b=l(e);c.add(b);const d=m(e,0),h=n.get(b);if(d===void 0||h===void 0)return o(e,{testValues:void 0});const g=d-h;return s++,p+=Math.abs(d),r=Math.max(r,Math.abs(g)),o(e,{testValues:{0:g}})});for(const e of t)c.has(l(e))||V.push(o(e,{testValues:void 0}));return{dies:V,compared:s,maxAbs:r,level:s?p/s:0}}
@@ -91,6 +91,9 @@ export interface FieldColumn {
91
91
  failSide?: Int8Array;
92
92
  /** Why this field cannot be used on this population. */
93
93
  issue?: string;
94
+ /** For a field put in ranges: the middle of each row's range, in the measured field's own unit, so a line can run along them. */
95
+ mid?: Float64Array;
96
+ midUnit?: string;
94
97
  /** For a set of tests: the test each row's value belongs to, by name, so a missing value is reported against its test. */
95
98
  labelOf?: (row: number) => string;
96
99
  }
@@ -189,7 +192,8 @@ export type PlotMarks =
189
192
  values: number[];
190
193
  items: number[];
191
194
  limits: ControlLimits;
192
- violations: ControlViolation[];
195
+ violations: ControlViolation[]; /** The colour group of each point, when the chart is coloured by a wafer field. */
196
+ group?: number[];
193
197
  }
194
198
  /**
195
199
  * A heatmap: `values[r][c]` the combined value of the cell at row r and column c (NaN where it holds nothing),
@@ -261,8 +265,13 @@ export interface ResolvedPlot {
261
265
  label: string;
262
266
  unit?: string;
263
267
  lo: number;
264
- hi: number; /** Every value is a whole number (a count): shown without decimals. */
268
+ hi: number;
269
+ /** Every value is a whole number (a count): shown without decimals. */
265
270
  integer?: true;
271
+ /** The values are rescaled around zero (a z-score): `lo` and `hi` are equally far from it, and the key runs below average to above. */
272
+ diverging?: true;
273
+ /** The values are a rating (a yield, a pass rate): the key runs from bad to good, not from low to high. */
274
+ rating?: true;
266
275
  };
267
276
  colorLabel?: string;
268
277
  /** Set when the colour is a hard or soft bin: each group takes that bin's colour on the maps (`BinColors`). */