edf2csv 0.2.11 → 0.2.13
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 +41 -0
- package/dist/cli/report.d.ts.map +1 -1
- package/dist/cli/report.js +7 -1
- package/dist/cli/report.js.map +1 -1
- package/dist/cli.js +2 -2
- package/dist/edf/scale.d.ts +1 -1
- package/dist/edf/scale.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,47 @@
|
|
|
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.2.13
|
|
7
|
+
|
|
8
|
+
### Fixed: the precision ceiling collapsed distinct samples on the finest channels
|
|
9
|
+
|
|
10
|
+
Decimal places are derived per channel so that two adjacent digital codes never round to the same
|
|
11
|
+
text — that is the invariant the whole precision rule exists to hold. The ceiling was 15, which the
|
|
12
|
+
comment beside it justified by pointing at channels calibrated in volts and tesla.
|
|
13
|
+
|
|
14
|
+
Tesla was in fact fine. Femtotesla was not, which is the unit MEG is actually recorded in: a channel
|
|
15
|
+
spanning ±1e-12 T over a 16-bit converter has a step near 3e-17 and needs 19 places, so at 15 it
|
|
16
|
+
printed **96 of every 100 adjacent codes identically**. Distinct measurements became the same string,
|
|
17
|
+
silently — exactly the outcome the rule is meant to prevent.
|
|
18
|
+
|
|
19
|
+
The ceiling is now 20, and `--decimals` accepts 0–20 to match. Adjacent codes stay distinct from
|
|
20
|
+
microvolts down to attotesla. Ordinary channels are untouched: a µV EEG channel still derives 3
|
|
21
|
+
places and a volt-scale channel still derives 9.
|
|
22
|
+
|
|
23
|
+
## 0.2.12
|
|
24
|
+
|
|
25
|
+
### Fixed: annotation channels were never pluralised
|
|
26
|
+
|
|
27
|
+
A file carrying more than one `EDF Annotations` channel — which EDF+ permits — reported
|
|
28
|
+
`2 annotation channel` in `--info`. The signal count beside it had been pluralised all along.
|
|
29
|
+
|
|
30
|
+
### Docs: five claims that no longer matched the tool
|
|
31
|
+
|
|
32
|
+
Corrected against the actual output rather than reworded:
|
|
33
|
+
|
|
34
|
+
- Four `--info` examples showed `Recorded 2019-11-04 22:15:00 UTC`. The tool prints no ` UTC`, and
|
|
35
|
+
it should not: EDF stores a zone-less local wall clock, so labelling it UTC shifts it by the
|
|
36
|
+
reader's own offset. That is the same bug fixed in `metadata.json` when the field was renamed to
|
|
37
|
+
`start_datetime_local`; the `--info` examples and one paragraph of `edf-format.md` still carried
|
|
38
|
+
the old claim.
|
|
39
|
+
- `--info ignores --annotations-only` was wrong in the other direction — it reflects the flag, so
|
|
40
|
+
the estimate describes the command you actually typed. The docs now say so.
|
|
41
|
+
- The "reads the header only, returns in milliseconds" claims are now qualified: true for plain EDF
|
|
42
|
+
and continuous EDF+, with EDF+D named as the exception where the annotation channel must be
|
|
43
|
+
scanned to get the span right.
|
|
44
|
+
- `INPUT_OUTPUT_COLLISION` is a live `ConversionError` code and was missing from the API reference's
|
|
45
|
+
enumeration.
|
|
46
|
+
|
|
6
47
|
## 0.2.11
|
|
7
48
|
|
|
8
49
|
### Fixed: `--info` read the annotation channel of every record
|
package/dist/cli/report.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/cli/report.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAGhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAuBvD,0FAA0F;AAC1F,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/cli/report.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAGhD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAuBvD,0FAA0F;AAC1F,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,GAAG,MAAM,CAmEtE;AAED,mEAAmE;AACnE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,SAAS,UAAU,EAAE,GAAG,MAAM,CAO5E;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAU3D;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAczD"}
|
package/dist/cli/report.js
CHANGED
|
@@ -45,7 +45,13 @@ export function formatInfo(file, plan) {
|
|
|
45
45
|
lines.push(`Recording ${header.recordingId}`);
|
|
46
46
|
const signals = file.dataSignals;
|
|
47
47
|
lines.push('');
|
|
48
|
-
|
|
48
|
+
// The signal count was pluralised but the annotation-channel count was not, so a file
|
|
49
|
+
// carrying two of them read "2 annotation channel". EDF+ permits more than one.
|
|
50
|
+
const annotationCount = file.annotationSignals.length;
|
|
51
|
+
const annotationPart = annotationCount > 0
|
|
52
|
+
? ` + ${annotationCount} annotation channel${annotationCount === 1 ? '' : 's'}`
|
|
53
|
+
: '';
|
|
54
|
+
lines.push(`Channels ${signals.length} signal${signals.length === 1 ? '' : 's'}${annotationPart}`);
|
|
49
55
|
lines.push('');
|
|
50
56
|
const rows = [['#', 'COLUMN', 'LABEL', 'UNIT', 'RATE', 'RANGE', 'OUTPUT']];
|
|
51
57
|
const fileFor = new Map();
|
package/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EAAE,CAAC,CAAC;KACtG,EACD,IAAI,EACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
|
package/dist/cli.js
CHANGED
|
@@ -289,8 +289,8 @@ function optionalDecimals(raw) {
|
|
|
289
289
|
throw new OptionError('--decimals needs a number, for example --decimals 3.');
|
|
290
290
|
}
|
|
291
291
|
const value = Number(text);
|
|
292
|
-
if (!Number.isInteger(value) || value < 0 || value >
|
|
293
|
-
throw new OptionError(`--decimals must be a whole number between 0 and
|
|
292
|
+
if (!Number.isInteger(value) || value < 0 || value > 20) {
|
|
293
|
+
throw new OptionError(`--decimals must be a whole number between 0 and 20, got "${String(raw)}".`);
|
|
294
294
|
}
|
|
295
295
|
return value;
|
|
296
296
|
}
|
package/dist/edf/scale.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export declare function quantizationStep(signal: EdfSignal): number;
|
|
|
37
37
|
* resolution the hardware actually recorded, without padding the file with digits
|
|
38
38
|
* that carry no information.
|
|
39
39
|
*
|
|
40
|
-
* The ceiling is
|
|
40
|
+
* The ceiling is 20 rather than a tidier number because a channel calibrated in
|
|
41
41
|
* volts rather than microvolts has a step near 1e-7, and one in tesla smaller
|
|
42
42
|
* still. A lower cap would round genuinely different samples to the same text. It
|
|
43
43
|
* costs nothing for ordinary channels, whose step lands them at three or four.
|
package/dist/edf/scale.js
CHANGED
|
@@ -67,12 +67,12 @@ export function quantizationStep(signal) {
|
|
|
67
67
|
* resolution the hardware actually recorded, without padding the file with digits
|
|
68
68
|
* that carry no information.
|
|
69
69
|
*
|
|
70
|
-
* The ceiling is
|
|
70
|
+
* The ceiling is 20 rather than a tidier number because a channel calibrated in
|
|
71
71
|
* volts rather than microvolts has a step near 1e-7, and one in tesla smaller
|
|
72
72
|
* still. A lower cap would round genuinely different samples to the same text. It
|
|
73
73
|
* costs nothing for ordinary channels, whose step lands them at three or four.
|
|
74
74
|
*/
|
|
75
|
-
export function decimalsForSignal(signal, max =
|
|
75
|
+
export function decimalsForSignal(signal, max = 20) {
|
|
76
76
|
const step = quantizationStep(signal);
|
|
77
77
|
if (!(step > 0) || !Number.isFinite(step))
|
|
78
78
|
return 3;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "edf2csv",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.13",
|
|
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",
|