@simtest-js/funnel 1.0.0-beta.17 → 1.0.0-beta.19
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/README.md +15 -0
- package/dist/index.d.ts +28 -5
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/wasm/simtest_funnel_wasm_bg.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -75,6 +75,21 @@ acceptable; a range-relative `rtolx` grows with the length of the record.
|
|
|
75
75
|
compares `x >= 0.5`. Results report ranges as `ResolvedXRange` with both
|
|
76
76
|
bounds present (`-Infinity` / `Infinity` when unbounded).
|
|
77
77
|
|
|
78
|
+
Only test points inside the window are judged, but the tube is built from
|
|
79
|
+
the reference extended beyond the window as far as needed for it to equal
|
|
80
|
+
the full-range tube there (two x half-widths plus three samples per side
|
|
81
|
+
to start with, and past the end of any collinear or constant run of
|
|
82
|
+
reference samples the window edge falls in), so a test point near a
|
|
83
|
+
window edge that is shifted by less than the x tolerance passes exactly
|
|
84
|
+
as in a comparison over the full range (without `rtolx` / `rtoly`, every
|
|
85
|
+
point in the window gets the same deviation and verdict as in the
|
|
86
|
+
full-range comparison; see the core crate's README for the precise
|
|
87
|
+
guarantee). At the first and last reference sample there is nothing to
|
|
88
|
+
extend with.
|
|
89
|
+
`rtolx` / `rtoly` are relative to the reference inside the window.
|
|
90
|
+
`lowerX` / `upperX` reach beyond the window by the extension;
|
|
91
|
+
`errorsY` is `0` for test points outside `xRange`.
|
|
92
|
+
|
|
78
93
|
`defaultOptions()` returns the six default values explicitly (passing
|
|
79
94
|
them is identical to omitting `options`), and `summarize()` echoes the
|
|
80
95
|
six resolved values (`ResolvedTolerances`).
|
package/dist/index.d.ts
CHANGED
|
@@ -33,9 +33,20 @@ export type ResolvedTolerances = {
|
|
|
33
33
|
[K in keyof Tolerances]-?: number;
|
|
34
34
|
};
|
|
35
35
|
/**
|
|
36
|
-
* X-range
|
|
37
|
-
* `
|
|
38
|
-
* `[0.5, Infinity]` (same as
|
|
36
|
+
* X-range window passed in {@link Options}: only test points with x in
|
|
37
|
+
* `[lo, hi]` are judged. A bound that is omitted, `undefined` or `null` is
|
|
38
|
+
* unbounded on that side, so `{ lo: 0.5 }` means `[0.5, Infinity]` (same as
|
|
39
|
+
* the Python `Range`).
|
|
40
|
+
*
|
|
41
|
+
* The tube for the window is built from the reference extended beyond it
|
|
42
|
+
* by the x tolerance (two x half-widths plus three samples per side), so a
|
|
43
|
+
* test point near a window edge that is shifted by less than the x
|
|
44
|
+
* tolerance is judged as in a full-range comparison; without `rtolx` /
|
|
45
|
+
* `rtoly` every point in the window gets the same verdict as in the
|
|
46
|
+
* full-range comparison. At the first and last reference sample there is
|
|
47
|
+
* nothing to extend with. `rtolx` / `rtoly` are relative to the reference
|
|
48
|
+
* inside the window, and coverage (`MissingReference` / `MissingTest`) is
|
|
49
|
+
* judged inside the window.
|
|
39
50
|
*/
|
|
40
51
|
export interface XRange {
|
|
41
52
|
lo?: number | null;
|
|
@@ -76,7 +87,13 @@ export declare const Status: {
|
|
|
76
87
|
readonly InsufficientData: 14;
|
|
77
88
|
};
|
|
78
89
|
export type StatusCode = (typeof Status)[keyof typeof Status];
|
|
79
|
-
/**
|
|
90
|
+
/**
|
|
91
|
+
* Result of {@link compare}. `errorsX` is the test x-grid and `errorsY` the
|
|
92
|
+
* signed deviation there (positive above the upper bound, negative below the
|
|
93
|
+
* lower bound, `0` inside the tube and for test points outside `xRange`).
|
|
94
|
+
* With an `xRange`, `lowerX` / `upperX` reach beyond the window by the
|
|
95
|
+
* extension the tube is built from.
|
|
96
|
+
*/
|
|
80
97
|
export interface CompareResult {
|
|
81
98
|
status: StatusCode;
|
|
82
99
|
lowerX: Float64Array;
|
|
@@ -211,5 +228,11 @@ export interface CreateFunnelPlotInputs {
|
|
|
211
228
|
};
|
|
212
229
|
result: CompareResult;
|
|
213
230
|
}
|
|
214
|
-
/**
|
|
231
|
+
/**
|
|
232
|
+
* Render a funnel plot into `el`: reference, test, both tube bounds and the
|
|
233
|
+
* absolute deviations. For a comparison with an `xRange` the bounds cover
|
|
234
|
+
* the window plus the extension the tube was built from and the deviations
|
|
235
|
+
* are `0` outside the window; pass e.g. `{ xaxis: { range: [lo, hi] } }` as
|
|
236
|
+
* `layout` to show only the window.
|
|
237
|
+
*/
|
|
215
238
|
export declare function createFunnelPlot(plotly: PlotlyLike, el: HTMLElement, inputs: CreateFunnelPlotInputs, layout?: Record<string, unknown>): Promise<unknown>;
|
package/dist/index.js
CHANGED
|
@@ -88,7 +88,13 @@ export function defaultOptions() {
|
|
|
88
88
|
export function version() {
|
|
89
89
|
return wasm.version();
|
|
90
90
|
}
|
|
91
|
-
/**
|
|
91
|
+
/**
|
|
92
|
+
* Render a funnel plot into `el`: reference, test, both tube bounds and the
|
|
93
|
+
* absolute deviations. For a comparison with an `xRange` the bounds cover
|
|
94
|
+
* the window plus the extension the tube was built from and the deviations
|
|
95
|
+
* are `0` outside the window; pass e.g. `{ xaxis: { range: [lo, hi] } }` as
|
|
96
|
+
* `layout` to show only the window.
|
|
97
|
+
*/
|
|
92
98
|
export async function createFunnelPlot(plotly, el, inputs, layout) {
|
|
93
99
|
const traces = [
|
|
94
100
|
{
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,+BAA+B,CAAC;AAkFtD,2DAA2D;AAC3D,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI,EAAE,CAAC;IACP,IAAI,EAAE,CAAC,CAAC;IACR,gBAAgB,EAAE,CAAC;IACnB,WAAW,EAAE,CAAC;IACd,YAAY,EAAE,EAAE;IAChB,cAA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