edfcore 0.5.49 → 0.5.51
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/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/docs/CHANGELOG.md +45 -0
- package/package.json +1 -1
- package/src/constants.ts +1 -1
package/dist/constants.d.ts
CHANGED
|
@@ -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.
|
|
112
|
+
export declare const VERSION = "0.5.51";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
package/docs/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,51 @@ 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.51
|
|
10
|
+
|
|
11
|
+
- **Added** the promise `annotations.md` makes about partial reads, and the thing it costs.
|
|
12
|
+
`readAnnotations` "supplies the rebasing origin from the timeline, so a partial range answers the
|
|
13
|
+
same as a whole-file one" — and could not derive that origin on its own, because "a range that
|
|
14
|
+
does not contain record 0 has to infer it from an observed onset, which only works while the
|
|
15
|
+
records in between are contiguous". Before 0.2.28 the pairing the page recommends,
|
|
16
|
+
`readAnnotations(recording, chunk.records)`, reported the same event a quarter of a second later
|
|
17
|
+
than a whole-file decode did.
|
|
18
|
+
- Three behaviours, one of them a defect that shipped, and none under test: `readAnnotations` was
|
|
19
|
+
checked on whole files and on single ranges, and nothing partitioned a file and compared.
|
|
20
|
+
- The property runs first. For any partition of the record range into contiguous pieces, the reads
|
|
21
|
+
concatenate to the whole-file read — every field of every event, both axes, both exact tick counts
|
|
22
|
+
and `recordOnsetTicks` — over a contiguous file, one with a quarter-second start offset, and an
|
|
23
|
+
EDF+D file with a twenty-second hole.
|
|
24
|
+
- Then the three-way comparison that shows the origin doing the work, on the post-gap range of that
|
|
25
|
+
EDF+D file. `readAnnotations` puts the event at 26.5 s on the record axis. `decodeAnnotations`
|
|
26
|
+
called directly on the same bytes puts it at 26.75 — its inferred origin lands outside `[0, 1)`,
|
|
27
|
+
so rebasing switches off and the two axes come back equal, exactly as documented. Passing
|
|
28
|
+
`startOffsetTicks` by hand restores 26.5. And on the same shape without the hole the inference
|
|
29
|
+
works unaided, which is what makes the failure about EDF+D rather than about partial ranges.
|
|
30
|
+
|
|
31
|
+
## 0.5.50
|
|
32
|
+
|
|
33
|
+
- **Added** three ways a header can be written and mean the same thing. Each is documented, each is
|
|
34
|
+
reached by real writers, and each was tested for the thing it produces rather than for the
|
|
35
|
+
equivalence it implies.
|
|
36
|
+
- **A record count of `-1`.** `types.ts` says of the field: "Verbatim. `-1` means the writer never
|
|
37
|
+
closed the file." `parseHeader` recovers the count from the source's length and says so with
|
|
38
|
+
`RECORD_COUNT_RECOVERED` and `recordCountSource: 'sourceByteLength'`. `parse.test.ts` checks the
|
|
39
|
+
recovery; nothing checked that the recovered file is the same recording as one that declares its
|
|
40
|
+
count — which is the only reason recovering beats refusing.
|
|
41
|
+
- **Either family's annotation label.** `annotations.md`: "edfcore accepts either label in either
|
|
42
|
+
family, because the label names the channel's *role*." `isAnnotationLabel` is tested on the
|
|
43
|
+
strings; whether a BDF+ file whose channel says `EDF Annotations` reads its events was not. Both
|
|
44
|
+
crossings now do, with the same events, the same record onsets and the same data indices — and the
|
|
45
|
+
label reported verbatim, which is the one thing that differs.
|
|
46
|
+
- **NUL padding.** EDF pads with spaces; real writers pad with NUL, which is why `trimEdfField`
|
|
47
|
+
exists and why five docblocks in `src/` warn that `String.prototype.trim` does not strip it. The
|
|
48
|
+
function is tested. That the two paddings give the same header, with no diagnostic between them,
|
|
49
|
+
was not — and the test asserts that `.trim()` on the raw field really would have got it wrong, so
|
|
50
|
+
the equivalence is not a coincidence of the fixture.
|
|
51
|
+
- Each is asserted as a whole-recording equivalence — every sample, every event, every derived
|
|
52
|
+
number — with the one legitimately differing field named beside it.
|
|
53
|
+
|
|
9
54
|
## 0.5.49
|
|
10
55
|
|
|
11
56
|
- **Added** the two things about an EDF+ annotations channel that are decisions of the writer rather
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED