edf2csv 0.5.94 → 0.5.95

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,41 @@
3
3
  Notable changes to edf2csv. Versions follow [semantic versioning](https://semver.org); while the
4
4
  major version is 0, a minor bump may contain breaking changes.
5
5
 
6
+ ## 0.5.95
7
+
8
+ ### Fixed: api.md's cheap timing recipe mistimes every record after a gap, and says the conversion uses it
9
+
10
+ The page argues, correctly and at length, that `index * recordDuration` is not where a record
11
+ sits — a discontinuous file puts its records where its timekeeping annotations say, and a
12
+ continuous one need not start at zero. It then offers `readOrigin()` as "the cheap version",
13
+ shows
14
+
15
+ ```js
16
+ const origin = (await file.readOrigin()) ?? 0;
17
+ const recordStart = origin + (batch.firstRecordIndex + r) * recordDuration;
18
+ ```
19
+
20
+ and closes: "That is what the conversion itself does, which is why its `time_s` and its
21
+ `annotations.csv` agree."
22
+
23
+ The conversion does that for `EDF+C`. For `EDF+D` it reads every record's own start time. On
24
+ `discontinuous.edf`, whose records sit at 0, 1 and 10 seconds, the recipe puts the third at 2 —
25
+ nine seconds from where the file says it is and from where `convert()` writes it. A reader who
26
+ took the shortcut because the page said it was the same thing lines every record after a gap up
27
+ against the wrong samples, and the sentence promising agreement with `annotations.csv` is
28
+ exactly the promise it breaks.
29
+
30
+ Scoped to continuous recordings now, with the check to make first and the arithmetic's answer on
31
+ that fixture spelled out. The test runs both and requires them to differ, so the example cannot
32
+ quietly stop being a counterexample.
33
+
34
+ ### Fixed: the same page still described the gain-of-zero rule 0.5.83 replaced
35
+
36
+ "A gain of zero is different: the mapping is defined but flat, so `physicalMin` is returned and
37
+ written normally." That is now true of one of the two ways to get a gain of zero. The other —
38
+ a span too small to represent, which underflows — returns `NaN` and leaves the cells empty, and
39
+ raises `UNUSABLE_PHYSICAL_RANGE`, which the sentence beside it did not list either.
40
+
6
41
  ## 0.5.94
7
42
 
8
43
  ### Fixed: two conversions with identical output disagreed about whether they were whole
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edf2csv",
3
- "version": "0.5.94",
3
+ "version": "0.5.95",
4
4
  "description": "Convert EDF, EDF+ and BDF biosignal recordings (European Data Format) to CSV from the command line. Local, streaming, and never resamples or alters units.",
5
5
  "keywords": [
6
6
  "edf",