edfcore 0.2.57 → 0.2.60
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/CHANGELOG.md +38 -0
- package/README.md +18 -2
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/package.json +1 -1
- package/src/constants.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,44 @@ 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.2.59
|
|
10
|
+
|
|
11
|
+
- **Added** `calib.rec` from edfplus.info — the last corpus the README named. It was written by
|
|
12
|
+
**Bob Kemp, who wrote the EDF specification**, expressly to check that a reader gets amplitude
|
|
13
|
+
and POLARITY right, which makes it the closest thing this format has to a conformance test.
|
|
14
|
+
- It is the only fixture in the suite whose expected values come from neither edfcore nor another
|
|
15
|
+
library, but from the file's own design. Its declared range is ±100 µV over ±4096 digital units,
|
|
16
|
+
so the gain is 25/1024 — a small integer over a power of two, exactly representable in float64 —
|
|
17
|
+
and the offset is exactly zero. Digital `-2048` is therefore exactly `-50 µV`, checkable from the
|
|
18
|
+
header by hand, and every level in the file is asserted with no tolerance.
|
|
19
|
+
- The polarity assertions are the point. A reader that swapped the physical bounds returns the
|
|
20
|
+
right magnitudes with the wrong sign — plausible microvolts that invert the clinical reading of
|
|
21
|
+
the trace — so the extremes are asserted as signed values tied to the digital codes that produced
|
|
22
|
+
them, not as an amplitude.
|
|
23
|
+
- I first wrote the gain up as "a power of two". It is not; log2 of it is -5.356. The corrected
|
|
24
|
+
claim and a test pinning the distinction are both in the file, so nobody simplifies it back.
|
|
25
|
+
- The coverage guard added in 0.2.50 earned its place on the way: it failed this release because
|
|
26
|
+
the new corpus file had no parity golden yet. That is exactly the drift it exists to catch, and
|
|
27
|
+
it caught it before the release rather than after.
|
|
28
|
+
|
|
29
|
+
## 0.2.58
|
|
30
|
+
|
|
31
|
+
- **Added** CHB-MIT to the corpus, closing a gap the README has named since 0.1. It is chosen to be
|
|
32
|
+
UNLIKE sleep-edfx rather than to add volume: 23 channels at a uniform 256 Hz in one-second
|
|
33
|
+
records, recorded in 2010 at another institution on other equipment, against 7 channels at mixed
|
|
34
|
+
rates in 30-second records from 1989. Every real file in this suite came from one dataset until
|
|
35
|
+
now. Same bit-for-bit parity with pyEDFlib across all 23 channels.
|
|
36
|
+
- It also supplies something no fixture in this project had: **a montage that names one derivation
|
|
37
|
+
twice.** `T8-P8` appears at index 14 and index 22, and the two carry identical samples — verified
|
|
38
|
+
against pyEDFlib over the whole hour rather than assumed; I had written the test expecting them
|
|
39
|
+
to differ. `EdfAmbiguousChannelError` had until now only ever been raised against a fixture
|
|
40
|
+
written to raise it.
|
|
41
|
+
- That identity makes the refusal matter more, not less. If `getSignal` picked one arbitrarily, no
|
|
42
|
+
comparison of the returned numbers could reveal which it picked, so a caller would never learn
|
|
43
|
+
the question had two answers. The error is the only signal there is.
|
|
44
|
+
- Downloaded on demand under the Open Data Commons Attribution License v1.0, hash-verified, never
|
|
45
|
+
redistributed — the same terms as every other corpus entry.
|
|
46
|
+
|
|
9
47
|
## 0.2.57
|
|
10
48
|
|
|
11
49
|
- **Documented** what the corpus work of 0.2.49-0.2.55 actually established. The README's
|
package/README.md
CHANGED
|
@@ -334,8 +334,24 @@ state you are in, because a skipped test and a passing one look identical in a s
|
|
|
334
334
|
npm run corpus:fetch
|
|
335
335
|
```
|
|
336
336
|
|
|
337
|
-
**
|
|
338
|
-
|
|
337
|
+
**CHB-MIT, as of 0.2.58.** A second real clinical recording, deliberately unlike the first: 23
|
|
338
|
+
channels at a uniform 256 Hz in one-second records, recorded in 2010 at another institution, where
|
|
339
|
+
sleep-edfx is 7 channels at mixed rates in 30-second records from 1989. Same bit-for-bit parity. It
|
|
340
|
+
also supplies something no synthetic fixture here had — a montage that names one derivation twice,
|
|
341
|
+
which is what `EdfAmbiguousChannelError` exists for and had until now only ever been raised against
|
|
342
|
+
a fixture written to raise it.
|
|
343
|
+
|
|
344
|
+
**The format author's own calibration file, as of 0.2.59.** `calib.rec` was written by Bob Kemp —
|
|
345
|
+
who wrote the EDF specification — expressly to check that a reader gets amplitude *and polarity*
|
|
346
|
+
right. It is the only fixture here whose expected values come from neither edfcore nor another
|
|
347
|
+
library but from the file's own design: its gain is 25/1024, exactly representable in binary, so
|
|
348
|
+
digital `-2048` is exactly `-50 µV` and a human can check it from the header by hand. edfcore
|
|
349
|
+
returns the exact levels, and the negative extreme comes from the negative code — which is the
|
|
350
|
+
whole point, since a reader that swapped the bounds would return plausible microvolts of the wrong
|
|
351
|
+
sign and invert the clinical reading of the trace.
|
|
352
|
+
|
|
353
|
+
**Still open before 1.0.** Nothing named. The remaining work is API, not verification — see the
|
|
354
|
+
0.3 note in [CHANGELOG.md](https://github.com/tayal-sarthak/edfcore/blob/main/CHANGELOG.md).
|
|
339
355
|
|
|
340
356
|
**Shipped since 0.1.6.** Min/max envelope decimation (`readEnvelope`,
|
|
341
357
|
`readEnvelopeAtResolution`). BioSemi Status-byte helpers (`readTriggers`). Streaming iteration
|
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.2.
|
|
112
|
+
export declare const VERSION = "0.2.60";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
package/package.json
CHANGED
package/src/constants.ts
CHANGED