@simtest-js/funnel 1.0.0-beta.15 → 1.0.0-beta.17
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 +16 -7
- package/dist/index.d.ts +11 -6
- package/dist/index.js +1 -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
|
@@ -49,17 +49,26 @@ core — the same rule as the Rust, Python and CLI front ends, so
|
|
|
49
49
|
identical inputs give identical verdicts everywhere:
|
|
50
50
|
|
|
51
51
|
- x axis: `atolx`, `ltolx`, `rtolx`; y axis: `atoly`, `ltoly`, `rtoly`.
|
|
52
|
-
- An axis with **no** coefficient given gets
|
|
53
|
-
(
|
|
52
|
+
- An axis with **no** coefficient given gets its default: the x axis
|
|
53
|
+
all `0` (no time tolerance), the y axis `rtoly = 2e-3` (other
|
|
54
|
+
coefficients `0`).
|
|
54
55
|
- An axis with **at least one** coefficient given uses the given values
|
|
55
56
|
and `0` for the rest of that axis.
|
|
56
57
|
- An explicit `0` counts as given.
|
|
57
58
|
|
|
58
|
-
| You pass
|
|
59
|
-
|
|
|
60
|
-
| no `options`, `{}`, `{ tolerances: {} }`
|
|
61
|
-
| `{ tolerances: { atoly: 0.05 } }`
|
|
62
|
-
| `{ tolerances: { atolx: 0
|
|
59
|
+
| You pass | Effective tolerances |
|
|
60
|
+
| --------------------------------------------- | --------------------------------------- |
|
|
61
|
+
| no `options`, `{}`, `{ tolerances: {} }` | `rtoly = 2e-3`, rest `0` |
|
|
62
|
+
| `{ tolerances: { atoly: 0.05 } }` | `atoly = 0.05`, rest `0` |
|
|
63
|
+
| `{ tolerances: { atolx: 0.5 } }` | `atolx = 0.5`, `rtoly = 2e-3`, rest `0` |
|
|
64
|
+
| `{ tolerances: { atolx: 0.5, atoly: 0.05 } }` | `atolx = 0.5`, `atoly = 0.05`, rest `0` |
|
|
65
|
+
|
|
66
|
+
There is **no tolerance in x (time) unless you give one**. With zero x
|
|
67
|
+
tolerance the x half-width is the `1e-10` floor: each test point is
|
|
68
|
+
checked only against the y band around the reference at the same x, so a
|
|
69
|
+
test curve that is shifted or delayed in time fails at steep edges even
|
|
70
|
+
when the shift is tiny. Give `atolx` (time units) when such shifts are
|
|
71
|
+
acceptable; a range-relative `rtolx` grows with the length of the record.
|
|
63
72
|
|
|
64
73
|
`xRange` restricts the comparison to an x-window; each bound is optional
|
|
65
74
|
(omitted, `undefined` or `null` = unbounded), so `{ xRange: { lo: 0.5 } }`
|
package/dist/index.d.ts
CHANGED
|
@@ -7,14 +7,18 @@
|
|
|
7
7
|
* simtest-funnel API (x axis: `atolx`/`ltolx`/`rtolx`; y axis:
|
|
8
8
|
* `atoly`/`ltoly`/`rtoly`):
|
|
9
9
|
*
|
|
10
|
-
* - an axis with no coefficient given gets
|
|
11
|
-
* (other coefficients `0`);
|
|
10
|
+
* - an axis with no coefficient given gets its default: the x axis all `0`
|
|
11
|
+
* (no time tolerance), the y axis `rtoly = 2e-3` (other coefficients `0`);
|
|
12
12
|
* - an axis with at least one coefficient given uses the given values and
|
|
13
13
|
* `0` for its other coefficients;
|
|
14
14
|
* - an explicit `0` counts as given.
|
|
15
15
|
*
|
|
16
|
-
* So `{ atoly: 0.05 }` means `atoly = 0.05
|
|
17
|
-
* `
|
|
16
|
+
* So `{ atoly: 0.05 }` means `atoly = 0.05` and every other coefficient
|
|
17
|
+
* `0`. Give an x coefficient, e.g. `{ atolx: 0.5, atoly: 0.05 }`, to allow
|
|
18
|
+
* the test to be shifted in time: with zero x tolerance the x half-width is
|
|
19
|
+
* the `1e-10` floor, so each test point is checked only against the y band
|
|
20
|
+
* around the reference at the same x and a slightly delayed steep edge
|
|
21
|
+
* fails.
|
|
18
22
|
*/
|
|
19
23
|
export interface Tolerances {
|
|
20
24
|
atolx?: number | null;
|
|
@@ -47,7 +51,8 @@ export interface ResolvedXRange {
|
|
|
47
51
|
}
|
|
48
52
|
/**
|
|
49
53
|
* Options for {@link compare}. Omitting `options`, or omitting
|
|
50
|
-
* `tolerances`, means the default tolerances (`
|
|
54
|
+
* `tolerances`, means the default tolerances (`rtoly = 2e-3`, no tolerance
|
|
55
|
+
* in x).
|
|
51
56
|
*/
|
|
52
57
|
export interface Options {
|
|
53
58
|
tolerances?: Tolerances;
|
|
@@ -178,7 +183,7 @@ export interface Downsampled {
|
|
|
178
183
|
export declare function downsampleMinMax(x: ArrayLike<number> | Float64Array, y: ArrayLike<number> | Float64Array, buckets: number, pinnedX?: ArrayLike<number> | Float64Array): Downsampled;
|
|
179
184
|
/**
|
|
180
185
|
* Returns the default options with all six tolerances explicit
|
|
181
|
-
* (`
|
|
186
|
+
* (`rtoly = 2e-3`, others `0`: no tolerance in x). Passing them to {@link compare}
|
|
182
187
|
* is identical to omitting `options`.
|
|
183
188
|
*/
|
|
184
189
|
export declare function defaultOptions(): ResolvedOptions;
|
package/dist/index.js
CHANGED
|
@@ -78,7 +78,7 @@ export function downsampleMinMax(x, y, buckets, pinnedX) {
|
|
|
78
78
|
}
|
|
79
79
|
/**
|
|
80
80
|
* Returns the default options with all six tolerances explicit
|
|
81
|
-
* (`
|
|
81
|
+
* (`rtoly = 2e-3`, others `0`: no tolerance in x). Passing them to {@link compare}
|
|
82
82
|
* is identical to omitting `options`.
|
|
83
83
|
*/
|
|
84
84
|
export function defaultOptions() {
|
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;AAuEtD,2DAA2D;AAC3D,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,IAAI,EAAE,CAAC;IACP,IAAI,EAAE,CAAC,CAAC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