edfcore 0.3.77 → 0.3.78
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 +17 -0
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/sample-grid.d.ts.map +1 -1
- package/dist/sample-grid.js +7 -1
- package/dist/sample-grid.js.map +1 -1
- package/package.json +1 -1
- package/src/constants.ts +1 -1
- package/src/sample-grid.ts +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,23 @@ alone does not tell you whether you were affected.
|
|
|
6
6
|
edfcore is pre-1.0. Patch releases have carried behaviour changes where the old behaviour was a
|
|
7
7
|
defect; those are called out below.
|
|
8
8
|
|
|
9
|
+
## 0.3.78
|
|
10
|
+
|
|
11
|
+
- **Fixed** `sample-grid.ts` sending a reader to `onsetTicks` where `sample-locate.ts` sends them to
|
|
12
|
+
`onsetTicksFromFirstRecord`, for the identical refusal.
|
|
13
|
+
- Both modules refuse an annotations channel with the same sentence — it holds TAL text, so it has
|
|
14
|
+
no sample grid — and then name different fields to use instead. The grid puts sample 0 at
|
|
15
|
+
`t = 0`, which is the start of record 0: the **rebased** axis. `onsetTicks` is on the header's
|
|
16
|
+
timebase, and the two differ by the sub-second offset record 0's timekeeping TAL may declare.
|
|
17
|
+
- On a file with a 0.25 s offset, `gridSampleStartTicks(signal, 4, d)` is 10000000 and the event
|
|
18
|
+
written at that instant reports `onsetTicks` 12500000. The reader was sent to the field that
|
|
19
|
+
does not line up with the numbers the module they had just called returns. `sample-locate.ts`
|
|
20
|
+
had it right.
|
|
21
|
+
- The guard reads both refusals out of the source and requires them to name the same field. Its
|
|
22
|
+
first version passed with the bug reinstated, because the explanatory comment above the message
|
|
23
|
+
names both fields and the slice picked it up — it now strips comment lines before matching, and
|
|
24
|
+
says so, since that is the only reason it works.
|
|
25
|
+
|
|
9
26
|
## 0.3.77
|
|
10
27
|
|
|
11
28
|
- **Fixed** `validateRecording`'s scan-budget refusal offering advice that does not work on the
|
package/dist/constants.d.ts
CHANGED
|
@@ -109,5 +109,5 @@ export declare const SIGNAL_FIELD_BLOCK_OFFSETS: {
|
|
|
109
109
|
readonly reserved: 224;
|
|
110
110
|
};
|
|
111
111
|
/** Published package version. Kept in sync with package.json by a test. */
|
|
112
|
-
export declare const VERSION = "0.3.
|
|
112
|
+
export declare const VERSION = "0.3.78";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sample-grid.d.ts","sourceRoot":"","sources":["../src/sample-grid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"sample-grid.d.ts","sourceRoot":"","sources":["../src/sample-grid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAIH,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAgC/D;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,MAAM,EACf,mBAAmB,EAAE,MAAM,GAC1B,iBAAiB,CAoBnB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,MAAM,EACnB,mBAAmB,EAAE,MAAM,GAC1B,MAAM,CAcR;AAED,+EAA+E;AAC/E,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,SAAS,EACjB,WAAW,EAAE,MAAM,EACnB,mBAAmB,EAAE,MAAM,GAC1B,MAAM,CAKR"}
|
package/dist/sample-grid.js
CHANGED
|
@@ -46,7 +46,13 @@ function assertGrid(signal, recordDurationTicks) {
|
|
|
46
46
|
if (signal.kind === 'annotations') {
|
|
47
47
|
throw new RangeError(`signal ${signal.index} (${JSON.stringify(signal.label)}) is an annotations channel, ` +
|
|
48
48
|
'whose region holds TAL text rather than samples, so it has no sample grid. Next: use ' +
|
|
49
|
-
|
|
49
|
+
// `onsetTicksFromFirstRecord`, not `onsetTicks`. This grid puts sample 0 at t = 0, which
|
|
50
|
+
// is the start of record 0 — the rebased axis — and `onsetTicks` is on the HEADER's
|
|
51
|
+
// timebase. They differ by the sub-second offset record 0's timekeeping TAL may declare:
|
|
52
|
+
// on a file with a 0.25 s offset, `gridSampleStartTicks(signal, 4, d)` is 10000000 and the
|
|
53
|
+
// event at that instant reports `onsetTicks` 12500000. `sample-locate.ts` names the right
|
|
54
|
+
// one for the identical refusal (fixed in 0.3.78).
|
|
55
|
+
'onsetTicksFromFirstRecord on the annotations themselves.');
|
|
50
56
|
}
|
|
51
57
|
if (signal.samplesPerRecord <= 0) {
|
|
52
58
|
throw new RangeError(`signal ${signal.index} (${JSON.stringify(signal.label)}) declares ` +
|
package/dist/sample-grid.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sample-grid.js","sourceRoot":"","sources":["../src/sample-grid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,SAAS,UAAU,CAAC,MAAiB,EAAE,mBAA2B;IAChE,IAAI,MAAM,CAAC,IAAI,KAAK,aAAa,EAAE,CAAC;QAClC,MAAM,IAAI,UAAU,CAClB,UAAU,MAAM,CAAC,KAAK,KAAK,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,+BAA+B;YACpF,uFAAuF;YACvF,
|
|
1
|
+
{"version":3,"file":"sample-grid.js","sourceRo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AAC,QAAQ,GAAG,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC;AACnD,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,sBAAsB,CACpC,MAAiB,EACjB,WAAmB,EACnB,mBAA2B;IAE3B,MAAM,KAAK,GAAG,oBAAoB,CAAC,MAAM,EAAE,WAAW,EAAE,mBAAmB,CAAC,CAAC;IAC7E,MAAM,KAAK,GAAG,KAAK,GAAG,gBAAgB,CAAC;IACvC,MAAM,SAAS,GAAG,KAAK,GAAG,gBAAgB,CAAC;IAC3C,OAAO,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;AACtE,CAAC"}
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
package/src/sample-grid.ts
CHANGED
|
@@ -50,7 +50,13 @@ function assertGrid(signal: EdfSignal, recordDurationTicks: bigint): void {
|
|
|
50
50
|
throw new RangeError(
|
|
51
51
|
`signal ${signal.index} (${JSON.stringify(signal.label)}) is an annotations channel, ` +
|
|
52
52
|
'whose region holds TAL text rather than samples, so it has no sample grid. Next: use ' +
|
|
53
|
-
|
|
53
|
+
// `onsetTicksFromFirstRecord`, not `onsetTicks`. This grid puts sample 0 at t = 0, which
|
|
54
|
+
// is the start of record 0 — the rebased axis — and `onsetTicks` is on the HEADER's
|
|
55
|
+
// timebase. They differ by the sub-second offset record 0's timekeeping TAL may declare:
|
|
56
|
+
// on a file with a 0.25 s offset, `gridSampleStartTicks(signal, 4, d)` is 10000000 and the
|
|
57
|
+
// event at that instant reports `onsetTicks` 12500000. `sample-locate.ts` names the right
|
|
58
|
+
// one for the identical refusal (fixed in 0.3.78).
|
|
59
|
+
'onsetTicksFromFirstRecord on the annotations themselves.',
|
|
54
60
|
);
|
|
55
61
|
}
|
|
56
62
|
if (signal.samplesPerRecord <= 0) {
|