edfcore 0.4.426 → 0.4.427

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.
@@ -109,5 +109,5 @@ export declare const SIGNAL_FIELD_BLOCK_OFFSETS: {
109
109
  readonly reserved: 224;
110
110
  };
111
111
  /** Published package version. Kept in sync with package.json by a test. */
112
- export declare const VERSION = "0.4.426";
112
+ export declare const VERSION = "0.4.427";
113
113
  //# sourceMappingURL=constants.d.ts.map
package/dist/constants.js CHANGED
@@ -79,5 +79,5 @@ export const SIGNAL_FIELD_BLOCK_OFFSETS = {
79
79
  reserved: 224,
80
80
  };
81
81
  /** Published package version. Kept in sync with package.json by a test. */
82
- export const VERSION = '0.4.426';
82
+ export const VERSION = '0.4.427';
83
83
  //# sourceMappingURL=constants.js.map
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,27 @@ alone does not tell you whether you were affected.
6
6
  edfcore is pre-1.0. Patch releases have carried behaviour changes where the old behaviour was a
7
7
  defect; those are called out below.
8
8
 
9
+ ## 0.4.427
10
+
11
+ - **Added** a property test for `trimToWindow` against the rule it states rather than the examples
12
+ it was written from. The source says which samples belong in a window in one line — "Sample j is
13
+ in the window when `ceil(j * D / S)` is in `[R, Rend)`" — and what the code does is a closed form
14
+ derived from it: two `floorDiv`s over bigint products, with the derivation written above them. A
15
+ closed form is exactly where an off-by-one lives, and the derivation is the part a reader takes
16
+ on trust.
17
+ - So the rule is implemented the obvious way, asking every sample, and the two must select the same
18
+ set for arbitrary geometries and windows. The naive version is too slow for a library and is
19
+ obviously right, which is the only pairing worth testing a closed form against.
20
+ - The rounding it turns on is not incidental. 256 samples in a one-second record puts sample 1 at
21
+ 39,062.5 ticks, published as 39,063, and selecting on the exact start rather than the published
22
+ one excluded that sample from a window beginning at its own published start — half of all indices
23
+ at that rate, and at 128 samples per 0.29 s a one-sample window came back empty (0.3.56).
24
+ Geometries whose boundaries miss whole ticks are generated deliberately, because the ones that
25
+ land on them cannot tell the two rules apart.
26
+ - Three obligations from the docblock come with it, none previously checked in general: adjacent
27
+ windows partition a chunk exactly, a window covering the chunk is the identity, and the result is
28
+ a view rather than a copy.
29
+
9
30
  ## 0.4.426
10
31
 
11
32
  - **Added** a property test that the cache is invisible at every size it can be configured to.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.4.426",
3
+ "version": "0.4.427",
4
4
  "description": "Modern, typed, zero-dependency reader for EDF, EDF+, BDF and BDF+ biosignal files. Works in browsers and Node with true random access.",
5
5
  "keywords": [
6
6
  "edf",
package/src/constants.ts CHANGED
@@ -93,4 +93,4 @@ export const SIGNAL_FIELD_BLOCK_OFFSETS = {
93
93
  } as const;
94
94
 
95
95
  /** Published package version. Kept in sync with package.json by a test. */
96
- export const VERSION = '0.4.426';
96
+ export const VERSION = '0.4.427';