edfcore 0.5.44 → 0.5.46
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 +43 -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.46";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
package/docs/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,49 @@ 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.46
|
|
10
|
+
|
|
11
|
+
- **Added** the same recording cut into records four different ways. "The record is the unit of I/O,
|
|
12
|
+
never the channel" is a heading in `design-decisions.md` and the premise of `concepts.md`. The
|
|
13
|
+
corollary is what a caller has to believe and nothing checked: the record geometry is a property
|
|
14
|
+
of how the file was written, and it decides the cost and the shape of a read while deciding
|
|
15
|
+
nothing about the signal.
|
|
16
|
+
- A writer with 128 samples at 16 Hz may store them as 8 records of 16 at one second each, or 16 of
|
|
17
|
+
8 at half a second, or 2 of 64 at four seconds. Those are four different files — different record
|
|
18
|
+
size, different count, `recordByteLength` from 96 to 208 bytes — and one recording. All four are
|
|
19
|
+
built and compared: the sample stream over the whole file is identical, and so are `sampleRateHz`,
|
|
20
|
+
`signal.sampleCount` and `timeline.spanSeconds`, none of which is stored and all of which are
|
|
21
|
+
derived from the geometry that differs.
|
|
22
|
+
- The window is what makes this a test rather than a paragraph. Asking for `[1.25, 3.75)` — inside a
|
|
23
|
+
record in all four — returns four **different** chunks: record 1 plus 3 in one file, record 0 plus
|
|
24
|
+
1 in another, because a read is record-aligned and the records are not the same size.
|
|
25
|
+
`trimToWindow` then gives the same 40 samples starting at 1.25 s in every one of them. That is the
|
|
26
|
+
architecture in one comparison: the chunk is the I/O and the trim is the answer.
|
|
27
|
+
|
|
28
|
+
## 0.5.45
|
|
29
|
+
|
|
30
|
+
- **Added** the relationship between `inspectEdf` and the call it is triage for. `diagnostics.md`
|
|
31
|
+
calls it "the first call" for an unfamiliar file: at most 128 KiB, never throws about content,
|
|
32
|
+
returns `ok`, `variant`, `header`, `bytesRead` and a diagnostics list. Every one of those is
|
|
33
|
+
tested — `inspect-safety.test.ts` over bytes nobody chose, `inspect-validate.test.ts` on the
|
|
34
|
+
ceiling — and the relationship to `openEdf` was not.
|
|
35
|
+
- That relationship is the whole point. Running `inspectEdf` over a directory decides which files
|
|
36
|
+
are worth opening, and the decision is worthless if the header it shows you is not the header you
|
|
37
|
+
will get. Over the eight `AWKWARD` shapes, wherever it returns a header it is now compared field
|
|
38
|
+
for field against `openEdf`'s — diagnostics and variant included.
|
|
39
|
+
- `ok` is checked as the rule the page states rather than as a value: "true only when the header
|
|
40
|
+
parsed **and** carried no error-severity diagnostic", verified against `summarizeDiagnostics` over
|
|
41
|
+
the same header, with both branches reached in the matrix. A signal with no usable scale gives
|
|
42
|
+
`ok: false` on a header that is perfectly readable and a file that opens — the distinction the
|
|
43
|
+
callout on the same page draws.
|
|
44
|
+
- `variant` is checked as the "separate best effort" the page says it is. The version block and the
|
|
45
|
+
reserved field are the first 8 and 44 bytes and "stay readable long after everything else has
|
|
46
|
+
stopped making sense": a file whose signal count is garbage has no header at all and is still
|
|
47
|
+
reported as `BDF+C`, or `EDF+D`, rather than as nothing. That is the sentence the section ends
|
|
48
|
+
with, and nothing had run it.
|
|
49
|
+
- The cost is bounded from both sides: never above the 128 KiB ceiling, and never above what opening
|
|
50
|
+
the same file costs, in bytes and in reads — because it skips the record probes.
|
|
51
|
+
|
|
9
52
|
## 0.5.44
|
|
10
53
|
|
|
11
54
|
- **Added** reading one recording from several places at once. Everything in the suite reads
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED