edfcore 0.2.42 → 0.2.44

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 CHANGED
@@ -6,6 +6,34 @@ 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.43
10
+
11
+ - **Added** parity against MNE — a second, independent reader. pyEDFlib and edfcore both descend
12
+ from EDFlib's arithmetic, so agreement between them shows edfcore copied it correctly rather than
13
+ that the answer is right; MNE is a different implementation.
14
+ - The claim is deliberately WEAKER than the pyEDFlib one and says so. MNE returns SI units, so a
15
+ microvolt channel arrives divided by 1e6 and that division is lossy — the two cannot be
16
+ bit-identical, and asserting otherwise would be asserting something false. The bound is 1e-12
17
+ relative, about a hundred times the worst observed and ten orders of magnitude below the
18
+ quantisation step of any real recording. Bit-parity remains claimed for pyEDFlib alone.
19
+ - The bound is RELATIVE rather than an ULP count, which was the first instinct and is the wrong
20
+ measure: near 1e-6 the same relative rounding spans far more representable floats than it does
21
+ near 100, so an ULP bound tight enough to be meaningful at one magnitude is meaningless at the
22
+ other. Channels MNE does not rescale — it leaves `degC` alone — are excluded rather than pushed
23
+ through a factor that would make the comparison an artefact of the test.
24
+
25
+ ## 0.2.42
26
+
27
+ - **Added** three cases to the pyEDFlib parity harness, chosen for where the two scaling
28
+ expressions diverge most or where a mistake would be least visible:
29
+ - **negative gain** (`physicalMinimum > physicalMaximum`, a legal EDF FAQ Q6 declaration). Parity
30
+ alone would not catch a field swap that pyEDFlib also made, so the POLARITY is asserted against
31
+ the file's own declaration too: physical values must fall as digital values rise, in both
32
+ libraries. A silent polarity flip is a clinically wrong result that looks completely normal.
33
+ - **a 16-step digital range** mapped to a 2000-unit physical one — the coarsest `bitValue` of the
34
+ set.
35
+ - **a full 16-bit range** mapped to one millivolt — the finest.
36
+
9
37
  ## 0.2.41
10
38
 
11
39
  - **Added** a `samplesPerRecord` column to `edfcore signals`, and **fixed** the documentation,
package/README.md CHANGED
@@ -299,9 +299,15 @@ back with pyEDFlib, and records every sample as its exact IEEE-754 bit pattern;
299
299
  `tests/corpus/golden/` was produced by edfcore. Substituting the numerically better textbook
300
300
  expression fails it on 140 of 256 samples — which is why the EDFlib form is pinned.
301
301
 
302
- **Still open before 1.0.** The same harness against MNE, and validation across public corpora
303
- (sleep-edfx, CHB-MIT, the BioSemi and edfplus.info test files). Those claims are not made here
304
- until a test produces them.
302
+ **MNE, as of 0.2.43.** edfcore agrees with MNE to within 1e-12 relative — a weaker claim than the
303
+ one above, and deliberately so. MNE returns SI units, so a microvolt channel arrives divided by
304
+ 1e6, and that division is lossy; the residue is MNE's unit conversion rather than a disagreement
305
+ about the sample. Bit-parity is claimed for pyEDFlib alone. Both readers also agree with the file's
306
+ own declaration about POLARITY on a negative-gain channel, which a value comparison alone could not
307
+ establish.
308
+
309
+ **Still open before 1.0.** Validation across public corpora (sleep-edfx, CHB-MIT, the BioSemi and
310
+ edfplus.info test files). That claim is not made here until a test produces it.
305
311
 
306
312
  **Shipped since 0.1.6.** Min/max envelope decimation (`readEnvelope`,
307
313
  `readEnvelopeAtResolution`). BioSemi Status-byte helpers (`readTriggers`). Streaming iteration
@@ -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.42";
112
+ export declare const VERSION = "0.2.44";
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.2.42';
82
+ export const VERSION = '0.2.44';
83
83
  //# sourceMappingURL=constants.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.2.42",
3
+ "version": "0.2.44",
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.2.42';
96
+ export const VERSION = '0.2.44';