edfcore 0.5.3 → 0.5.5

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.3";
112
+ export declare const VERSION = "0.5.5";
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.3';
82
+ export const VERSION = '0.5.5';
83
83
  //# sourceMappingURL=constants.js.map
package/docs/CHANGELOG.md CHANGED
@@ -6,6 +6,45 @@ 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.5
10
+
11
+ - **Added** the table under "Files with several sample rates" on `reading-signals.md`, and the
12
+ sentence after it. Nine numbers — three channels' `samplesPerRecord`, `sampleCount` and
13
+ `firstSampleIndex` over `[10, 14)`, then three more counts after trimming the same chunk to
14
+ `[10.5, 12.5)` — and none had been run. `multi-signal-cost.test.ts` covers a different table on
15
+ the same page and `reading-signals-arithmetic.test.ts` the section above it.
16
+ - The last sentence is the one worth having under test: "The temperature channel's trimmed window
17
+ starts at 11 s rather than 10.5 s. At 1 Hz there's no sample at 10.5, and the first one inside the
18
+ window is the one at 11." That is `startSeconds` becoming genuinely per-signal — before the trim
19
+ all three share a value, because a record-aligned read starts every channel at the same record,
20
+ and the run asserts that too so the change is visible as a change.
21
+ - It is the difference between a boundary computed on each channel's own grid and one computed from
22
+ a rate. A viewer that reused the requested 10.5 for all three would draw the temperature trace
23
+ half a sample to the left, on the one channel where half a sample is half a second. The boundary
24
+ is checked in ticks as well as seconds.
25
+ - Every figure is read out of the page's own table and prose, so neither side can drift, and the
26
+ row arithmetic is checked against itself: a sample count is the rate times the window, a first
27
+ index is the rate times the start.
28
+
29
+ ## 0.5.4
30
+
31
+ - **Added** the rest of the block `discontinuous.md` prints for `index.segments` and `index.gaps`.
32
+ The page prints three objects in full — fifteen fields between them — and the tests checked four:
33
+ the two record ranges and the two `startSeconds`. Each segment's own `index`, its `startTicks`,
34
+ its `endSeconds`, and the gap's `beforeSegmentIndex`/`afterSegmentIndex` were printed and never
35
+ run.
36
+ - Those are the fields most worth running. `startTicks` is the exact value the whole time model
37
+ rests on and the only one a reader cannot check by eye against the diagram above it;
38
+ `endSeconds` is derived from two other printed numbers, so a page printing all three can
39
+ contradict itself while every individual number matches something; and the gap's two segment
40
+ indices are what make it a gap between a specific pair rather than a free-floating interval.
41
+ - The fields are enumerated from the page rather than listed in the test — the block is parsed into
42
+ objects and each `name: value` compared against the object the scan produced — so a field added to
43
+ the block is checked by having been printed. Adding `1n` to a segment's `startTicks` fails it.
44
+ - The derived fields are also checked against each other rather than only against the page:
45
+ `endSeconds` is `startSeconds + durationSeconds` on every segment and gap, and the gap runs from
46
+ where the earlier segment ends to where the later one starts, in ticks.
47
+
9
48
  ## 0.5.3
10
49
 
11
50
  - **Added** the claim `api-reading.md` makes in one clause: "that makes `startSeconds` trustworthy
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.5.3",
3
+ "version": "0.5.5",
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.3';
96
+ export const VERSION = '0.5.5';