edf2csv 0.5.30 → 0.5.31

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 +21 -0
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,27 @@
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.31
7
+
8
+ ### Fixed: the API reference's sample-time recipe disagreed with the tool by half a second
9
+
10
+ api.md's streaming example computes each record's start as `index * recordDuration`, and the
11
+ caveat under it named EDF+D as the only case needing the record starts from
12
+ `readAnnotations()`. It assumes two things, and EDF+ guarantees neither.
13
+
14
+ The second is that the first record sits at zero, which a *continuous* file is free not to do.
15
+ `fractional-start.edf` is EDF+C with records at 0.5, 1.5 and 2.5 seconds — contiguous, and
16
+ half a second later than the arithmetic says. The recipe times its first sample at 0.000;
17
+ `convert()` writes 0.500 for that sample. The annotation onsets in the same file keep their
18
+ true values, so an analysis built on the recipe puts every event half a second away from the
19
+ samples it describes.
20
+
21
+ The tool has recovered that offset since 0.4.9 and `src/convert/timing.ts` describes the
22
+ failure at length; the recipe was the one place still doing it the old way. It now reads
23
+ `readOrigin()` — the cheap version, at most sixteen records rather than the whole annotation
24
+ channel — and a test runs the recipe against `convert()` on that fixture and requires every
25
+ timestamp to match.
26
+
6
27
  ## 0.5.30
7
28
 
8
29
  ### Fixed: `npm pack` on a clean checkout produced a package with no code in it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "edf2csv",
3
- "version": "0.5.30",
3
+ "version": "0.5.31",
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",