edfcore 0.2.32 → 0.2.34

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,41 @@ 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.34
10
+
11
+ - **Added** the golden-value harness this README has withheld a numerical-interop claim for since
12
+ 0.1.0. edfcore now **reproduces pyEDFlib's float64 physical values bit for bit** on EDF and
13
+ 24-bit BDF, across symmetric and asymmetric declared ranges. `scripts/golden/generate.py` writes
14
+ the fixtures with pyEDFlib's own writer, reads them back with pyEDFlib, and records every sample
15
+ as its exact IEEE-754 bit pattern; the test compares with `Object.is`, so one ULP is a failure.
16
+ Nothing under `tests/corpus/golden/` was produced by edfcore, and the goldens are committed so
17
+ CI never needs Python.
18
+
19
+ Every previous test of the pinned scaling expression re-derived that same expression inside the
20
+ test, which proved edfcore agrees with itself and nothing more. This is the first evidence that
21
+ the choice to keep EDFlib's numerically worse form was worth making: substituting the textbook
22
+ `physicalMinimum + (digital - digitalMinimum) * gain` fails on 140 of 256 samples of the
23
+ symmetric fixture — `-492.15686274509807` where pyEDFlib says `-492.156862745098` — and a test
24
+ asserts that the goldens can tell the two apart, so the parity is a real constraint rather than
25
+ a coincidence of the fixtures.
26
+
27
+ Still not claimed, because no test produces it yet: parity with MNE, and validation across the
28
+ public corpora.
29
+
30
+ ## 0.2.33
31
+
32
+ - **Fixed** annotations being dropped with no diagnostic naming them. `TIMEKEEPING_TAL_NONCONFORMANT`
33
+ covers several unrelated defects behind one once-per-call flag. Most lose nothing — the onset is
34
+ unambiguous either way — but a timekeeping TAL that carries TEXT has swallowed an annotation: the
35
+ writer merged an event into it, and the text appears in no field of the result. Because the flag
36
+ was shared, a file whose FIRST record used the widespread `+t 0x14 0x00` shorthand — which is most
37
+ of the real corpus — reported that shorthand and then suppressed every dropped event after it. On
38
+ a six-record fixture: two annotations gone, `annotations` empty, and one warning naming record 0
39
+ and a different, harmless cause. `strict: true` did not help either; it threw on record 0's
40
+ benign shorthand and never reached the real problem. The text-carrying kind is now reported for
41
+ every affected record, with the text and the byte offset where it still is; the harmless kinds
42
+ are still capped at one per call, and each message now says which of the two it is.
43
+
9
44
  ## 0.2.32
10
45
 
11
46
  - **Documented, not fixed**, and the distinction is the point: `sampleIndexAt`, `sampleStartTicks`
package/README.md CHANGED
@@ -291,10 +291,17 @@ the reason to trust the reader.
291
291
  **0.1 — reads everything, lies about nothing.** All six variants, the primitive/I/O/convenience
292
292
  layers, `inspectEdf`, `edfcore/validate`, six source adapters, the full diagnostic vocabulary.
293
293
 
294
- **Before 1.0.** Validation against public corpora (sleep-edfx, CHB-MIT, the BioSemi and
295
- edfplus.info test files) and a golden-value harness cross-checking physical values against
296
- pyEDFlib and MNE. Until that harness exists this README makes no numerical-interop claim, and it
297
- will not make one that a test did not produce.
294
+ **Numerical interop, as of 0.2.34.** edfcore reproduces **pyEDFlib's float64 physical values bit
295
+ for bit** on EDF and 24-bit BDF, across symmetric and asymmetric ranges. That is a test, not a
296
+ belief: `scripts/golden/generate.py` writes the fixtures with pyEDFlib's own writer, reads them
297
+ back with pyEDFlib, and records every sample as its exact IEEE-754 bit pattern;
298
+ `tests/corpus/golden-values.test.ts` compares with `Object.is`, so one ULP is a failure. Nothing in
299
+ `tests/corpus/golden/` was produced by edfcore. Substituting the numerically better textbook
300
+ expression fails it on 140 of 256 samples — which is why the EDFlib form is pinned.
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.
298
305
 
299
306
  **Shipped since 0.1.6.** Min/max envelope decimation (`readEnvelope`,
300
307
  `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.32";
112
+ export declare const VERSION = "0.2.34";
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.32';
82
+ export const VERSION = '0.2.34';
83
83
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"annotations.d.ts","sourceRoot":"","sources":["../../src/tal/annotations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAMH,OAAO,KAAK,EACV,wBAAwB,EAExB,oBAAoB,EACpB,SAAS,EAET,WAAW,EACZ,MAAM,aAAa,CAAC;AAqSrB,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,UAAU,EACvB,OAAO,EAAE,WAAW,EACpB,OAAO,CAAC,EAAE,wBAAwB,GACjC,oBAAoB,CAiJtB"}
1
+ {"version":3,"file":"annotations.d.ts","sourceRoot":"","sources":["../../src/tal/annotations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAMH,OAAO,KAAK,EACV,wBAAwB,EAExB,oBAAoB,EACpB,SAAS,EAET,WAAW,EACZ,MAAM,aAAa,CAAC;AAyUrB,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,UAAU,EACvB,OAAO,EAAE,WAAW,EACpB,OAAO,CAAC,EAAE,wBAAwB,GACjC,oBAAoB,CAoJtB"}
@@ -156,29 +156,33 @@ function reportTimekeepingMissing(sink, context) {
156
156
  specReference: TIMEKEEPING_SPEC,
157
157
  });
158
158
  }
159
- /**
160
- * What is non-conformant about a timekeeping TAL, or `undefined` when it is exactly
161
- * `+onset 0x14 0x14 0x00`.
162
- *
163
- * Zero texts is the widespread `+t 0x14 0x00` shorthand. EDFlib rejects that file outright; we
164
- * treat "zero texts" and "one empty text" as the same thing and keep going, because the onset is
165
- * unambiguous either way and refusing the file would refuse a large part of the real corpus.
166
- */
167
159
  function timekeepingDefect(tal) {
168
160
  if (tal.durationRaw !== undefined) {
169
- return `carries the duration "${tal.durationRaw}", which a timekeeping TAL never has`;
161
+ return {
162
+ reason: `carries the duration "${tal.durationRaw}", which a timekeeping TAL never has`,
163
+ destructive: false,
164
+ };
170
165
  }
171
166
  if (tal.texts.length === 0) {
172
- return ('omits the mandatory empty text and is written "+onset 0x14 0x00" — the widespread ' +
173
- 'shorthand, which EDFlib rejects outright');
167
+ return {
168
+ reason: 'omits the mandatory empty text and is written "+onset 0x14 0x00" — the widespread ' +
169
+ 'shorthand, which EDFlib rejects outright',
170
+ destructive: false,
171
+ };
174
172
  }
175
173
  const texts = tal.texts.map((run) => run.text).filter((text) => text.length > 0);
176
174
  if (texts.length > 0) {
177
- return (`carries the text ${texts.map((text) => `"${text}"`).join(', ')}, which is dropped: the ` +
178
- 'timekeeping TAL is not an annotation');
175
+ return {
176
+ reason: `carries the text ${texts.map((text) => `"${text}"`).join(', ')}, which is dropped: the ` +
177
+ 'timekeeping TAL is not an annotation',
178
+ destructive: true,
179
+ };
179
180
  }
180
181
  if (tal.texts.length > 1) {
181
- return `carries ${tal.texts.length} empty texts, where the grammar allows exactly one`;
182
+ return {
183
+ reason: `carries ${tal.texts.length} empty texts, where the grammar allows exactly one`,
184
+ destructive: false,
185
+ };
182
186
  }
183
187
  return undefined;
184
188
  }
@@ -186,11 +190,17 @@ function reportTimekeepingDefect(sink, context, tal, defect) {
186
190
  sink.report({
187
191
  code: 'TIMEKEEPING_TAL_NONCONFORMANT',
188
192
  message: `the timekeeping TAL of record ${context.recordIndex} (annotation signal ` +
189
- `${context.signal.index}, onset "${tal.onsetRaw}") ${defect}. ` +
193
+ `${context.signal.index}, onset "${tal.onsetRaw}") ${defect.reason}. ` +
190
194
  'Rule: a timekeeping TAL is written "+onset 0x14 0x14 0x00" — one signed onset, no ' +
191
195
  'duration, one empty text. ' +
192
- "Next: the onset was used as this record's start and the file was kept; this is " +
193
- 'reported once per decodeAnnotations() call, so later records are not re-reported.',
196
+ (defect.destructive
197
+ ? "Next: the onset was used as this record's start, but the text above is an " +
198
+ 'annotation the writer merged into the timekeeping TAL and it is in no other field of ' +
199
+ 'the result — read it from the raw bytes at the offset above if you need it. Reported ' +
200
+ 'for EVERY affected record, because each one names a different event that was lost.'
201
+ : "Next: the onset was used as this record's start and the file was kept; nothing was " +
202
+ 'lost. This kind is reported once per decodeAnnotations() call, so later records are ' +
203
+ 'not re-reported.'),
194
204
  field: 'timekeeping TAL',
195
205
  byteOffset: context.fileOffset + tal.byteOffsetInRegion,
196
206
  byteLength: tal.byteLength,
@@ -280,8 +290,12 @@ export function decodeAnnotations(header, recordBytes, records, options) {
280
290
  raw: timekeeping.onsetRaw,
281
291
  };
282
292
  const defect = timekeepingDefect(timekeeping);
283
- if (defect !== undefined && !timekeepingDefectReported) {
284
- timekeepingDefectReported = true;
293
+ // The once-per-call cap applies ONLY to the defects that lose nothing. A dropped text is
294
+ // a distinct annotation per record, available nowhere else in the result, so capping it
295
+ // deletes evidence — and worse, a benign first record used to consume the one slot.
296
+ if (defect !== undefined && (defect.destructive || !timekeepingDefectReported)) {
297
+ if (!defect.destructive)
298
+ timekeepingDefectReported = true;
285
299
  reportTimekeepingDefect(sink, context, timekeeping, defect);
286
300
  }
287
301
  }
@@ -1 +1 @@
1
- {"version":3,"file":"annotations.js","sourceRoot":"","sources":["../../src/tal/annotations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iB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AAI,EAAE,2BAA2B;YACjC,OAAO,EACL,sCAAsC,OAAO,CAAC,KAAK,mCAAmC;gBACtF,kBAAkB,MAAM,wBAAwB,cAAc,CAAC,SAAS,CAAC,gBAAgB;gBACzF,iFAAiF;gBACjF,8CAA8C;gBAC9C,oFAAoF;gBACpF,sDAAsD;gBACtD,sFAAsF;gBACtF,sFAAsF;gBACtF,oCAAoC;YACtC,KAAK,EAAE,iBAAiB;YACxB,GAAG,EAAE,aAAa,EAAE,GAAG,IAAI,EAAE;YAC7B,WAAW,EAAE,OAAO,CAAC,KAAK;YAC1B,aAAa,EAAE,gBAAgB;SAChC,CAAC,CAAC;IACL,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.2.32",
3
+ "version": "0.2.34",
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.32';
96
+ export const VERSION = '0.2.34';
@@ -252,25 +252,55 @@ function reportTimekeepingMissing(sink: DiagnosticSink, context: RegionContext):
252
252
  * treat "zero texts" and "one empty text" as the same thing and keep going, because the onset is
253
253
  * unambiguous either way and refusing the file would refuse a large part of the real corpus.
254
254
  */
255
- function timekeepingDefect(tal: ParsedTal): string | undefined {
255
+ /**
256
+ * What is wrong with a timekeeping TAL, and whether saying so once is enough.
257
+ *
258
+ * `destructive` is the distinction that matters. Most of these defects lose nothing — the onset is
259
+ * unambiguous and lands in `recordOnsetTicks` either way — so one report per call is the right
260
+ * volume and a per-record flood would bury it. But a timekeeping TAL that carries TEXT is
261
+ * different: that text is an annotation the writer merged into the wrong TAL, it appears nowhere
262
+ * in the result, and each occurrence names a DIFFERENT event that is now gone.
263
+ *
264
+ * Sharing one once-per-call flag between the two meant that a file whose first record used the
265
+ * widespread `+t 0x14 0x00` shorthand — which is most of the real corpus — reported that shorthand
266
+ * and then silently swallowed every dropped event after it. Six records in, two annotations gone,
267
+ * one warning about a benign spelling in record 0 (fixed in 0.2.33).
268
+ */
269
+ interface TimekeepingDefect {
270
+ readonly reason: string;
271
+ /** True when the TAL carried text that exists nowhere in the returned annotations. */
272
+ readonly destructive: boolean;
273
+ }
274
+
275
+ function timekeepingDefect(tal: ParsedTal): TimekeepingDefect | undefined {
256
276
  if (tal.durationRaw !== undefined) {
257
- return `carries the duration "${tal.durationRaw}", which a timekeeping TAL never has`;
277
+ return {
278
+ reason: `carries the duration "${tal.durationRaw}", which a timekeeping TAL never has`,
279
+ destructive: false,
280
+ };
258
281
  }
259
282
  if (tal.texts.length === 0) {
260
- return (
261
- 'omits the mandatory empty text and is written "+onset 0x14 0x00" — the widespread ' +
262
- 'shorthand, which EDFlib rejects outright'
263
- );
283
+ return {
284
+ reason:
285
+ 'omits the mandatory empty text and is written "+onset 0x14 0x00" — the widespread ' +
286
+ 'shorthand, which EDFlib rejects outright',
287
+ destructive: false,
288
+ };
264
289
  }
265
290
  const texts = tal.texts.map((run) => run.text).filter((text) => text.length > 0);
266
291
  if (texts.length > 0) {
267
- return (
268
- `carries the text ${texts.map((text) => `"${text}"`).join(', ')}, which is dropped: the ` +
269
- 'timekeeping TAL is not an annotation'
270
- );
292
+ return {
293
+ reason:
294
+ `carries the text ${texts.map((text) => `"${text}"`).join(', ')}, which is dropped: the ` +
295
+ 'timekeeping TAL is not an annotation',
296
+ destructive: true,
297
+ };
271
298
  }
272
299
  if (tal.texts.length > 1) {
273
- return `carries ${tal.texts.length} empty texts, where the grammar allows exactly one`;
300
+ return {
301
+ reason: `carries ${tal.texts.length} empty texts, where the grammar allows exactly one`,
302
+ destructive: false,
303
+ };
274
304
  }
275
305
  return undefined;
276
306
  }
@@ -279,17 +309,23 @@ function reportTimekeepingDefect(
279
309
  sink: DiagnosticSink,
280
310
  context: RegionContext,
281
311
  tal: ParsedTal,
282
- defect: string,
312
+ defect: TimekeepingDefect,
283
313
  ): void {
284
314
  sink.report({
285
315
  code: 'TIMEKEEPING_TAL_NONCONFORMANT',
286
316
  message:
287
317
  `the timekeeping TAL of record ${context.recordIndex} (annotation signal ` +
288
- `${context.signal.index}, onset "${tal.onsetRaw}") ${defect}. ` +
318
+ `${context.signal.index}, onset "${tal.onsetRaw}") ${defect.reason}. ` +
289
319
  'Rule: a timekeeping TAL is written "+onset 0x14 0x14 0x00" — one signed onset, no ' +
290
320
  'duration, one empty text. ' +
291
- "Next: the onset was used as this record's start and the file was kept; this is " +
292
- 'reported once per decodeAnnotations() call, so later records are not re-reported.',
321
+ (defect.destructive
322
+ ? "Next: the onset was used as this record's start, but the text above is an " +
323
+ 'annotation the writer merged into the timekeeping TAL and it is in no other field of ' +
324
+ 'the result — read it from the raw bytes at the offset above if you need it. Reported ' +
325
+ 'for EVERY affected record, because each one names a different event that was lost.'
326
+ : "Next: the onset was used as this record's start and the file was kept; nothing was " +
327
+ 'lost. This kind is reported once per decodeAnnotations() call, so later records are ' +
328
+ 'not re-reported.'),
293
329
  field: 'timekeeping TAL',
294
330
  byteOffset: context.fileOffset + tal.byteOffsetInRegion,
295
331
  byteLength: tal.byteLength,
@@ -392,8 +428,11 @@ export function decodeAnnotations(
392
428
  raw: timekeeping.onsetRaw,
393
429
  };
394
430
  const defect = timekeepingDefect(timekeeping);
395
- if (defect !== undefined && !timekeepingDefectReported) {
396
- timekeepingDefectReported = true;
431
+ // The once-per-call cap applies ONLY to the defects that lose nothing. A dropped text is
432
+ // a distinct annotation per record, available nowhere else in the result, so capping it
433
+ // deletes evidence — and worse, a benign first record used to consume the one slot.
434
+ if (defect !== undefined && (defect.destructive || !timekeepingDefectReported)) {
435
+ if (!defect.destructive) timekeepingDefectReported = true;
397
436
  reportTimekeepingDefect(sink, context, timekeeping, defect);
398
437
  }
399
438
  }