edf2csv 0.5.94 → 0.5.96

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 +52 -0
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,58 @@
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.96
7
+
8
+ ### Fixed: api.md said `readAnnotations` returns three counts, then named four
9
+
10
+ 0.5.58 added `negativeDurations` to the list and left the number in front of it. That is the
11
+ mistake 0.5.62 fixed one page over — "This code covers three conditions" against a list of five
12
+ — on a sentence a reader checks against the list in the same breath.
13
+
14
+ The pronoun after it had slipped the same way: "That last one is why `duration` being `null` is
15
+ not by itself the same as the file giving no duration" was written when `unreadableDurations`
16
+ was last in the sentence, and by then it named `negativeDurations`, which is not what the
17
+ paragraph goes on to describe. It names the count now rather than pointing at a position.
18
+
19
+ The number is counted from `readAnnotations`'s own return type, so the page has to agree with
20
+ the function rather than with itself, and every count it returns has to be named — a number is
21
+ only useful with the list.
22
+
23
+ ## 0.5.95
24
+
25
+ ### Fixed: api.md's cheap timing recipe mistimes every record after a gap, and says the conversion uses it
26
+
27
+ The page argues, correctly and at length, that `index * recordDuration` is not where a record
28
+ sits — a discontinuous file puts its records where its timekeeping annotations say, and a
29
+ continuous one need not start at zero. It then offers `readOrigin()` as "the cheap version",
30
+ shows
31
+
32
+ ```js
33
+ const origin = (await file.readOrigin()) ?? 0;
34
+ const recordStart = origin + (batch.firstRecordIndex + r) * recordDuration;
35
+ ```
36
+
37
+ and closes: "That is what the conversion itself does, which is why its `time_s` and its
38
+ `annotations.csv` agree."
39
+
40
+ The conversion does that for `EDF+C`. For `EDF+D` it reads every record's own start time. On
41
+ `discontinuous.edf`, whose records sit at 0, 1 and 10 seconds, the recipe puts the third at 2 —
42
+ nine seconds from where the file says it is and from where `convert()` writes it. A reader who
43
+ took the shortcut because the page said it was the same thing lines every record after a gap up
44
+ against the wrong samples, and the sentence promising agreement with `annotations.csv` is
45
+ exactly the promise it breaks.
46
+
47
+ Scoped to continuous recordings now, with the check to make first and the arithmetic's answer on
48
+ that fixture spelled out. The test runs both and requires them to differ, so the example cannot
49
+ quietly stop being a counterexample.
50
+
51
+ ### Fixed: the same page still described the gain-of-zero rule 0.5.83 replaced
52
+
53
+ "A gain of zero is different: the mapping is defined but flat, so `physicalMin` is returned and
54
+ written normally." That is now true of one of the two ways to get a gain of zero. The other —
55
+ a span too small to represent, which underflows — returns `NaN` and leaves the cells empty, and
56
+ raises `UNUSABLE_PHYSICAL_RANGE`, which the sentence beside it did not list either.
57
+
6
58
  ## 0.5.94
7
59
 
8
60
  ### 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.96",
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",