edfcore 0.5.54 → 0.5.55

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.5.54";
112
+ export declare const VERSION = "0.5.55";
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.5.54';
82
+ export const VERSION = '0.5.55';
83
83
  //# sourceMappingURL=constants.js.map
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,25 @@ 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.5.55
10
+
11
+ - **Added** the window that begins before the recording does. "A window that starts before record 0
12
+ is how a pre-stimulus epoch is spelled" is the sentence `tal/ticks.ts` uses to justify `floorDiv`
13
+ and `ceilDiv` existing at all, and `annotations.md` builds a section on negative onsets around the
14
+ same idea. 0.5.15 tested the two divisions; what a caller actually writes —
15
+ `readWindow(recording, { startSeconds: -2, durationSeconds: 4 })` — was tested for its bounds and
16
+ not for the negative side of them.
17
+ - There are three outcomes and only one is an error, and it is not the one a reader expects. A
18
+ window straddling t = 0 is read, clamped to the samples that exist. A window entirely before the
19
+ recording comes back as `[]` — the same empty array a window past the end gives, which
20
+ `api-reading.md` says in as many words. Nothing throws for either: a negative bound is a
21
+ legitimate question with a possibly empty answer, and only a non-finite one is a mistake.
22
+ - The trimmed result is where it matters, and it is asserted sample for sample.
23
+ `trimToWindow(header, series, -2, 4)` starts at 0 rather than at -2 and holds exactly the samples
24
+ in `[0, 2)` — the arithmetic that needs a floor rather than a truncation, on operands that are
25
+ negative for the whole first half of the window. A bound that is not a whole second is checked
26
+ with it, and `sampleAt` is checked either side of the boundary.
27
+
9
28
  ## 0.5.54
10
29
 
11
30
  - **Added** the claim the `index` option on `validateRecording` is only worth having if it holds: a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.5.54",
3
+ "version": "0.5.55",
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.5.54';
96
+ export const VERSION = '0.5.55';