edf2csv 0.5.105 → 0.5.107
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 +42 -0
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/convert/run.js +11 -6
- package/dist/convert/run.js.map +1 -1
- package/dist/convert/timing.d.ts +14 -0
- package/dist/convert/timing.js +31 -3
- package/dist/convert/timing.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,48 @@
|
|
|
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.107
|
|
7
|
+
|
|
8
|
+
### Fixed: recipes.md said the signal CSVs are already sorted, and one kind of file is not
|
|
9
|
+
|
|
10
|
+
The `merge_asof` recipe for aligning two rate files closes with "Both frames must be sorted on
|
|
11
|
+
the join key, which they already are." True of an ordinary recording. An EDF+D file whose data
|
|
12
|
+
records are stored out of chronological order writes its rows in file order, so `time_s` comes
|
|
13
|
+
out `0, 0.5, 10, 10.5, 5, 5.5` — and pandas raises `ValueError: left keys must be sorted` on it.
|
|
14
|
+
|
|
15
|
+
output-files has always said this can happen, in the `time_s` section. The recipe that depends
|
|
16
|
+
on it did not, and a recipe is where the claim actually gets used.
|
|
17
|
+
|
|
18
|
+
Qualified, with the warning the conversion prints and the one-line fix (`sort_values` before the
|
|
19
|
+
join), linked to the section that sets out when it happens.
|
|
20
|
+
|
|
21
|
+
### Fixed: "1 data record start earlier than the record before it"
|
|
22
|
+
|
|
23
|
+
The two warnings that report records out of order or overlapping counted with hard-coded verbs
|
|
24
|
+
and pronouns. They read "starts ... before it" at one and "start ... before them" above it.
|
|
25
|
+
|
|
26
|
+
## 0.5.106
|
|
27
|
+
|
|
28
|
+
### Fixed: two warnings printed together, and the second denied the first
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
warning: This is a discontinuous (EDF+D) recording: its data records are not contiguous in time.
|
|
32
|
+
Each row carries its true recording time, so gaps stay visible instead of being closed.
|
|
33
|
+
warning: This file is marked discontinuous but has no annotation channel, so where its records
|
|
34
|
+
sit in time is not recorded anywhere.
|
|
35
|
+
Times are written as if the records were contiguous. Any gaps are lost.
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The column runs contiguously from zero. No row carries a true recording time, because none is
|
|
39
|
+
recorded — which the second warning says plainly, four lines under the first one promising the
|
|
40
|
+
opposite.
|
|
41
|
+
|
|
42
|
+
The header parser raises the first, and it cannot know: whether the record starts can be derived
|
|
43
|
+
is settled after the annotation channel has been read. So the promise is withdrawn where the
|
|
44
|
+
answer is, the way `withoutFileRateWarning` already drops a header diagnostic the plan has
|
|
45
|
+
superseded. A file that can keep it keeps it — `discontinuous.edf` still says gaps stay visible,
|
|
46
|
+
and its rows still carry the nine-second gap.
|
|
47
|
+
|
|
6
48
|
## 0.5.105
|
|
7
49
|
|
|
8
50
|
### Fixed: a BDF+ recording was told it is "marked continuous (EDF+C)"
|
package/dist/cli.js
CHANGED
|
@@ -23,7 +23,7 @@ import { ChannelSelectionError } from './convert/channels.js';
|
|
|
23
23
|
// Shared with the library so a bad option is the same error whichever way it arrived.
|
|
24
24
|
import { OptionError } from './convert/options.js';
|
|
25
25
|
import { TimeRangeError, parseTimeSpec } from './convert/time-range.js';
|
|
26
|
-
import { deriveRecordStarts } from './convert/timing.js';
|
|
26
|
+
import { deriveRecordStarts, withTimingPromiseKept } from './convert/timing.js';
|
|
27
27
|
import { formatDiagnostics, formatInfo, infoJson, formatSummary, printable, printableLines, summaryJson } from './cli/report.js';
|
|
28
28
|
import { counted, listed } from './format/list.js';
|
|
29
29
|
import { VERSION } from './version.js';
|
|
@@ -750,7 +750,7 @@ async function showInfo(input, shared, asJson, jsonIndent, batch = false, toStdo
|
|
|
750
750
|
audit?.verify();
|
|
751
751
|
// Under --json the warnings travel inside the document, exactly as they do for a
|
|
752
752
|
// conversion, so stderr stays empty and the whole result is one parseable thing.
|
|
753
|
-
const diagnostics = [...withoutFileRateWarning(file.diagnostics), ...plan.diagnostics];
|
|
753
|
+
const diagnostics = [...withTimingPromiseKept(withoutFileRateWarning(file.diagnostics), timing.starts !== null), ...plan.diagnostics];
|
|
754
754
|
if (!asJson && diagnostics.length > 0) {
|
|
755
755
|
/*
|
|
756
756
|
Named when there is more than one recording to confuse it with.
|