edfcore 0.6.72 → 0.6.74
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/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/io/read.d.ts +7 -3
- package/dist/io/read.d.ts.map +1 -1
- package/dist/io/read.js +7 -3
- package/dist/io/read.js.map +1 -1
- package/dist/sample-locate.d.ts +12 -6
- package/dist/sample-locate.d.ts.map +1 -1
- package/dist/sample-locate.js +12 -6
- package/dist/sample-locate.js.map +1 -1
- package/docs/CHANGELOG.md +29 -0
- package/package.json +1 -1
- package/src/constants.ts +1 -1
- package/src/io/read.ts +7 -3
- package/src/sample-locate.ts +12 -6
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.6.
|
|
112
|
+
export declare const VERSION = "0.6.74";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
package/dist/io/read.d.ts
CHANGED
|
@@ -9,9 +9,13 @@
|
|
|
9
9
|
* read of a size the file has not stated.
|
|
10
10
|
* 2. The unit of I/O is the RECORD RANGE, never the channel range. `readRecordBytes` issues one
|
|
11
11
|
* contiguous read covering every signal over the requested records, and de-interleaving
|
|
12
|
-
* happens in memory afterwards. There is no cheap single-channel read in EDF
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* happens in memory afterwards. There is no cheap single-channel read in EDF. Ten seconds of
|
|
13
|
+
* ONE channel out of thirty at 256 Hz is the same 153,600-byte read as all thirty, of which
|
|
14
|
+
* 5,120 bytes are the channel asked for: one request, 30x overread. The alternative collects
|
|
15
|
+
* the stripes a record at a time — ten requests of 512 bytes, no overread at all, and ten
|
|
16
|
+
* round trips instead of one. `large-files.md` works the same window through both. This said
|
|
17
|
+
* "a 27x overread spread over ten requests" until 0.6.73, which is neither strategy and
|
|
18
|
+
* neither number.
|
|
15
19
|
*
|
|
16
20
|
* The exact-length contract is re-verified here even though every bundled adapter already checks
|
|
17
21
|
* it, because a `ByteSource` may be the caller's own and a silently short read is
|
package/dist/io/read.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../src/io/read.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../src/io/read.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AASH,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAoBhG;;;;;;;GAOG;AACH,wBAAsB,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,CAwB9F;AAqED;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,UAAU,EAClB,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,WAAW,EACpB,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,UAAU,CAAC,CAYrB"}
|
package/dist/io/read.js
CHANGED
|
@@ -9,9 +9,13 @@
|
|
|
9
9
|
* read of a size the file has not stated.
|
|
10
10
|
* 2. The unit of I/O is the RECORD RANGE, never the channel range. `readRecordBytes` issues one
|
|
11
11
|
* contiguous read covering every signal over the requested records, and de-interleaving
|
|
12
|
-
* happens in memory afterwards. There is no cheap single-channel read in EDF
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* happens in memory afterwards. There is no cheap single-channel read in EDF. Ten seconds of
|
|
13
|
+
* ONE channel out of thirty at 256 Hz is the same 153,600-byte read as all thirty, of which
|
|
14
|
+
* 5,120 bytes are the channel asked for: one request, 30x overread. The alternative collects
|
|
15
|
+
* the stripes a record at a time — ten requests of 512 bytes, no overread at all, and ten
|
|
16
|
+
* round trips instead of one. `large-files.md` works the same window through both. This said
|
|
17
|
+
* "a 27x overread spread over ten requests" until 0.6.73, which is neither strategy and
|
|
18
|
+
* neither number.
|
|
15
19
|
*
|
|
16
20
|
* The exact-length contract is re-verified here even though every bundled adapter already checks
|
|
17
21
|
* it, because a `ByteSource` may be the caller's own and a silently short read is
|
package/dist/io/read.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.js","sourceRoot":"","sources":["../../src/io/read.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"read.js","sourceRoot":"","sources":["../../src/io/read.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC9F,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C;;;;;;;;GAQG;AACH,SAAS,eAAe,CAAC,WAAuB;IAC9C,IAAI,WAAW,CAAC,MAAM,GAAG,sBAAsB;QAAE,OAAO,SAAS,CAAC;IAClE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,aAAa,CAAC,WAAW,CAAC;IACrD,MAAM,KAAK,GAAG,eAAe,CAAC,cAAc,CAAC,WAAW,EAAE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
18
18
|
* is a gap here" with "nobody looked" is the confusion this whole area of the API avoids.
|
|
19
19
|
*
|
|
20
20
|
* ONE LIMIT, and it belongs to the file rather than to these functions. If two records cover the
|
|
21
|
-
* same instant — a timeline whose onsets repeat, which EDF+ does not forbid
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
21
|
+
* same instant — a timeline whose onsets repeat, which EDF+ does not forbid — then more than one
|
|
22
|
+
* sample exists at that time and no function can return both.
|
|
23
|
+
*
|
|
24
|
+
* Repeating onsets are not silent, which this said until 0.6.74. With any positive record
|
|
25
|
+
* duration they are an overlap, so the probes report `RECORD_ONSET_SPACING_VIOLATION` and a
|
|
26
|
+
* complete index reports one per overlapping pair. The one file where they pass unremarked is a
|
|
27
|
+
* `recordDuration` of 0, where every record legally starts at the same instant — and `sampleAt`
|
|
28
|
+
* refuses such a file outright, so it never reaches this limit.
|
|
29
|
+
*
|
|
30
|
+
* `sampleAt` returns the one whose segment `segmentAt` finds. The round-trip "the sample at a
|
|
31
|
+
* sample's start is that sample" therefore holds for files whose records do not overlap, which is
|
|
32
|
+
* every file anyone is likely to have; it is not a universal law and 0.2.60 claimed it as one.
|
|
27
33
|
*/
|
|
28
34
|
import type { EdfRecording, EdfSampleLocation } from './types.js';
|
|
29
35
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sample-locate.d.ts","sourceRoot":"","sources":["../src/sample-locate.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"sample-locate.d.ts","sourceRoot":"","sources":["../src/sample-locate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAyB,MAAM,YAAY,CAAC;AA2FzF;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CACtB,SAAS,EAAE,YAAY,EACvB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,MAAM,GACd,iBAAiB,GAAG,SAAS,CA+D/B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,YAAY,EACvB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,GAClB,MAAM,CAuCR;AAED,wFAAwF;AACxF,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,YAAY,EACvB,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,GAClB,MAAM,CAER"}
|
package/dist/sample-locate.js
CHANGED
|
@@ -18,12 +18,18 @@
|
|
|
18
18
|
* is a gap here" with "nobody looked" is the confusion this whole area of the API avoids.
|
|
19
19
|
*
|
|
20
20
|
* ONE LIMIT, and it belongs to the file rather than to these functions. If two records cover the
|
|
21
|
-
* same instant — a timeline whose onsets repeat, which EDF+ does not forbid
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
21
|
+
* same instant — a timeline whose onsets repeat, which EDF+ does not forbid — then more than one
|
|
22
|
+
* sample exists at that time and no function can return both.
|
|
23
|
+
*
|
|
24
|
+
* Repeating onsets are not silent, which this said until 0.6.74. With any positive record
|
|
25
|
+
* duration they are an overlap, so the probes report `RECORD_ONSET_SPACING_VIOLATION` and a
|
|
26
|
+
* complete index reports one per overlapping pair. The one file where they pass unremarked is a
|
|
27
|
+
* `recordDuration` of 0, where every record legally starts at the same instant — and `sampleAt`
|
|
28
|
+
* refuses such a file outright, so it never reaches this limit.
|
|
29
|
+
*
|
|
30
|
+
* `sampleAt` returns the one whose segment `segmentAt` finds. The round-trip "the sample at a
|
|
31
|
+
* sample's start is that sample" therefore holds for files whose records do not overlap, which is
|
|
32
|
+
* every file anyone is likely to have; it is not a universal law and 0.2.60 claimed it as one.
|
|
27
33
|
*/
|
|
28
34
|
import { EdfChannelNotFoundError } from './errors.js';
|
|
29
35
|
import { segmentAt } from './record-index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sample-locate.js","sourceRoot":"","sources":["../src/sample-locate.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"sample-locate.js","sourceRoot":"","sources":["../src/sample-locate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAG1E;;;;;GAKG;AACH,SAAS,aAAa,CAAC,SAAuB,EAAE,WAAmB;IACjE,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IACrD,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,MAAM,IAAI,uBAAuB,CAC/B,eAAe,WAAW,kBAAkB;YAC1C,GAAG,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,wDAAwD;YAC1F,yEAAyE,EAC3E;YACE,QAAQ,EAAE,WAAW;YACrB,eAAe,EAAE,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;SAC9D,CACF,CAAC;IACJ,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,KAAK,aAAa,EAAE,CAAC;QAClC,MAAM,IAAI,UAAU,CAClB,UAAU,WAAW,KAAK,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,sBAAsB;YAC1E,sFAAsF;YACtF,oEAAoE,CACvE,CAAC;IACJ,CAAC;IACD,IAAI,MAAM,CAAC,gBAAgB,IAAI,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,UAAU,CAClB,UAAU,WAAW,KAAK,IAAI,CAAC,SAAS,CA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C,KAAK,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;AAC/E,CAAC;AAED,wFAAwF;AACxF,MAAM,UAAU,oBAAoB,CAClC,SAAuB,EACvB,WAAmB,EACnB,WAAmB;IAEnB,OAAO,cAAc,CAAC,kBAAkB,CAAC,SAAS,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC;AACjF,CAAC"}
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,35 @@ 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.6.74
|
|
10
|
+
|
|
11
|
+
- **Fixed** `sample-locate.ts` describing a repeated record onset as something "edfcore reports
|
|
12
|
+
without a diagnostic". Wherever the limit that paragraph is about can be reached, it is
|
|
13
|
+
reported: a record duration above zero makes a repeat an overlap, so the two probes `openEdf`
|
|
14
|
+
issues raise `RECORD_ONSET_SPACING_VIOLATION`, and a complete index raises one per overlapping
|
|
15
|
+
pair.
|
|
16
|
+
- The one file where repeats really are silent is `recordDuration = 0`, where every record legally
|
|
17
|
+
starts at the same instant — and `sampleAt` refuses such a file outright, so it never reaches
|
|
18
|
+
the limit.
|
|
19
|
+
- A docblock saying a condition goes unreported is read as "check for it yourself". The paragraph
|
|
20
|
+
now names the code and the one case it does not fire on.
|
|
21
|
+
- The test's first doc assertion was vacuous on its first draft: the sentence being removed wrapped
|
|
22
|
+
across two comment lines, so matching the raw file for it would have passed on the defect. It
|
|
23
|
+
collapses the wrapping first, and the canary confirmed both halves fail without the fix.
|
|
24
|
+
|
|
25
|
+
## 0.6.73
|
|
26
|
+
|
|
27
|
+
- **Fixed** the cost figure in `io/read.ts`, which states the unit-of-I/O rule as one of "two
|
|
28
|
+
rules [that] are the whole file". It said "ten seconds of one channel out of thirty is a 27x
|
|
29
|
+
overread spread over ten requests, against a single 153,600-byte read for all thirty".
|
|
30
|
+
- That is neither strategy and neither number. The read edfcore issues is ONE request of 153,600
|
|
31
|
+
bytes, of which 5,120 are the channel asked for — a factor of 30. The ten-request alternative is
|
|
32
|
+
the one that does not overread at all: ten stripes of 512 bytes, 5,120 bytes in total, at the
|
|
33
|
+
cost of ten round trips. `large-files.md` works the same window through both and has said
|
|
34
|
+
"Overread factor: 30" throughout.
|
|
35
|
+
- The sentence is the one a caller planning HTTP range requests reads, which is what the module
|
|
36
|
+
exists for. The test measures all of it through a counting source rather than restating it.
|
|
37
|
+
|
|
9
38
|
## 0.6.72
|
|
10
39
|
|
|
11
40
|
- **Fixed** `header/scale.ts` calling itself sole owner of "the four conditions" under which a
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
package/src/io/read.ts
CHANGED
|
@@ -9,9 +9,13 @@
|
|
|
9
9
|
* read of a size the file has not stated.
|
|
10
10
|
* 2. The unit of I/O is the RECORD RANGE, never the channel range. `readRecordBytes` issues one
|
|
11
11
|
* contiguous read covering every signal over the requested records, and de-interleaving
|
|
12
|
-
* happens in memory afterwards. There is no cheap single-channel read in EDF
|
|
13
|
-
*
|
|
14
|
-
*
|
|
12
|
+
* happens in memory afterwards. There is no cheap single-channel read in EDF. Ten seconds of
|
|
13
|
+
* ONE channel out of thirty at 256 Hz is the same 153,600-byte read as all thirty, of which
|
|
14
|
+
* 5,120 bytes are the channel asked for: one request, 30x overread. The alternative collects
|
|
15
|
+
* the stripes a record at a time — ten requests of 512 bytes, no overread at all, and ten
|
|
16
|
+
* round trips instead of one. `large-files.md` works the same window through both. This said
|
|
17
|
+
* "a 27x overread spread over ten requests" until 0.6.73, which is neither strategy and
|
|
18
|
+
* neither number.
|
|
15
19
|
*
|
|
16
20
|
* The exact-length contract is re-verified here even though every bundled adapter already checks
|
|
17
21
|
* it, because a `ByteSource` may be the caller's own and a silently short read is
|
package/src/sample-locate.ts
CHANGED
|
@@ -18,12 +18,18 @@
|
|
|
18
18
|
* is a gap here" with "nobody looked" is the confusion this whole area of the API avoids.
|
|
19
19
|
*
|
|
20
20
|
* ONE LIMIT, and it belongs to the file rather than to these functions. If two records cover the
|
|
21
|
-
* same instant — a timeline whose onsets repeat, which EDF+ does not forbid
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
21
|
+
* same instant — a timeline whose onsets repeat, which EDF+ does not forbid — then more than one
|
|
22
|
+
* sample exists at that time and no function can return both.
|
|
23
|
+
*
|
|
24
|
+
* Repeating onsets are not silent, which this said until 0.6.74. With any positive record
|
|
25
|
+
* duration they are an overlap, so the probes report `RECORD_ONSET_SPACING_VIOLATION` and a
|
|
26
|
+
* complete index reports one per overlapping pair. The one file where they pass unremarked is a
|
|
27
|
+
* `recordDuration` of 0, where every record legally starts at the same instant — and `sampleAt`
|
|
28
|
+
* refuses such a file outright, so it never reaches this limit.
|
|
29
|
+
*
|
|
30
|
+
* `sampleAt` returns the one whose segment `segmentAt` finds. The round-trip "the sample at a
|
|
31
|
+
* sample's start is that sample" therefore holds for files whose records do not overlap, which is
|
|
32
|
+
* every file anyone is likely to have; it is not a universal law and 0.2.60 claimed it as one.
|
|
27
33
|
*/
|
|
28
34
|
|
|
29
35
|
import { EdfChannelNotFoundError } from './errors.js';
|