edfcore 0.4.362 → 0.4.364

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/README.md CHANGED
@@ -151,8 +151,12 @@ for (const d of recording.header.diagnostics) {
151
151
  }
152
152
  ```
153
153
 
154
- Every diagnostic carries the field, the byte offset, the raw bytes as written, the spec clause it
155
- violates, and what to do next. Pass `{ strict: true }` and the first one throws instead.
154
+ Every diagnostic names the field at fault, the spec clause it violates, and what to do next. One
155
+ anchored to a header field carries that field's byte offset and its raw bytes as written too. The
156
+ two about the spacing of record onsets carry neither, because the defect is a relationship between
157
+ records rather than a value sitting at an offset — they name the record instead where one record is
158
+ at fault, and the whole file where the shape is. Pass `{ strict: true }` and the first one throws
159
+ instead.
156
160
 
157
161
  **Digital and physical are two functions.** `chunk.signals[i].digital` is an `Int32Array` of
158
162
  the values as stored. `toPhysical(signal, digital)` returns a `Float64Array` in the signal's own
@@ -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.4.362";
112
+ export declare const VERSION = "0.4.364";
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.4.362';
82
+ export const VERSION = '0.4.364';
83
83
  //# sourceMappingURL=constants.js.map
package/docs/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.4.364
10
+
11
+ - **Added** checks for three claims in the README's "Design in one page", each of which is an
12
+ absence and therefore hard to notice. There is no recording-wide rate — a header field holding
13
+ one would be the obvious convenience and can only ever be right for one channel, so its
14
+ non-existence is asserted alongside the three per-signal rates the README names.
15
+ - `sampleRateHz` is `undefined` when the record duration is zero, which is legal EDF and which
16
+ PhysioNet's hypnograms really declare. `Infinity` is what an unguarded division gives, would pass
17
+ every `typeof` check, and would make `NaN` of every time converted through it — so the check is
18
+ that it is neither a number nor that number.
19
+ - And there is no gap-filling option, checked as an absence across every option name the public
20
+ types declare. An option to fill a gap is an option to fabricate samples the amplifier never
21
+ recorded, and once it exists somebody's config turns it on.
22
+ - Also pinned: that a window is measured on `onsetTicksFromFirstRecord` rather than `onsetTicks`.
23
+ The fixture puts the two axes in different records on purpose — a half-second offset leaves both
24
+ inside the same record-aligned chunk, which is how this advice would look correct while being
25
+ untestable.
26
+
27
+ ## 0.4.363
28
+
29
+ - **Corrected** the README's promise about diagnostics and widened 0.4.325's check to cover it. It
30
+ said every diagnostic carries "the field, the byte offset, the raw bytes as written, the spec
31
+ clause it violates, and what to do next". Two of them carry neither the offset nor the raw bytes:
32
+ `DISCONTINUITY_IN_CONTINUOUS_FILE` and `RECORD_ONSET_SPACING_VIOLATION` are about the spacing of
33
+ record onsets, so there is no one offset the defect sits at and no field text to quote.
34
+ - That is the right answer rather than a gap — an offset invented for them would point at a record
35
+ that is individually fine — so the sentence now says which diagnostics carry which. It also
36
+ distinguishes the two ways the first of them is raised: against the last probed record when one
37
+ record is at fault, and as a whole-file summary when the shape is, which is why not even a record
38
+ index is always available.
39
+ - The sweep now checks all five properties instead of the spec clause alone: every diagnostic names
40
+ its field and says what to do next, everything anchored to a header field carries an offset and
41
+ its raw bytes, and the two relational codes carry neither and are asserted to be reached, so the
42
+ exemption is examined rather than assumed.
43
+
9
44
  ## 0.4.362
10
45
 
11
46
  - **Added** a check over the edfcore column of the capabilities table on `comparison.md`. Seven
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edfcore",
3
- "version": "0.4.362",
3
+ "version": "0.4.364",
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.4.362';
96
+ export const VERSION = '0.4.364';