edfcore 0.6.71 → 0.6.73
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/header/scale.d.ts +5 -2
- package/dist/header/scale.d.ts.map +1 -1
- package/dist/header/scale.js +5 -2
- package/dist/header/scale.js.map +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/docs/CHANGELOG.md +27 -0
- package/package.json +1 -1
- package/src/constants.ts +1 -1
- package/src/header/scale.ts +5 -2
- package/src/io/read.ts +7 -3
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.73";
|
|
113
113
|
//# sourceMappingURL=constants.d.ts.map
|
package/dist/constants.js
CHANGED
package/dist/header/scale.d.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Digital-to-physical scale, and the decision to refuse one.
|
|
3
3
|
*
|
|
4
|
-
* Layer 2. Sole owner of `EdfScale` construction and of the
|
|
5
|
-
* signal gets `scale: undefined` instead of a fabricated gain
|
|
4
|
+
* Layer 2. Sole owner of `EdfScale` construction and of the five conditions under which a
|
|
5
|
+
* signal gets `scale: undefined` instead of a fabricated gain: the three degenerate or inverted
|
|
6
|
+
* ranges, a log-transformed channel, and a derived gain that is not a usable float64. The last
|
|
7
|
+
* arrived in 0.4.509 and `design-decisions.md`, `physical-values.md` and `api-errors.md` have
|
|
8
|
+
* called it the fifth ever since; this said "the four conditions" until 0.6.72.
|
|
6
9
|
*
|
|
7
10
|
* The expression is EDFlib's, verbatim:
|
|
8
11
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scale.d.ts","sourceRoot":"","sources":["../../src/header/scale.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"scale.d.ts","sourceRoot":"","sources":["../../src/header/scale.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,KAAK,EAAkB,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAClF,OAAO,KAAK,EAAE,kBAAkB,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAYhE,4EAA4E;AAC5E,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,sCAAsC;IACtC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,qFAAqF;IACrF,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,kFAAkF;IAClF,QAAQ,CAAC,GAAG,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAC7C,6CAA6C;IAC7C,QAAQ,CAAC,WAAW,EAAE,iBAAiB,GAAG,SAAS,CAAC;CACrD;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,iBAAiB,EAAE,MAAM,GAAG,MAAM,CAE/D;AA6CD;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,cAAc,GAAG,QAAQ,GAAG,SAAS,CA4IxF"}
|
package/dist/header/scale.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Digital-to-physical scale, and the decision to refuse one.
|
|
3
3
|
*
|
|
4
|
-
* Layer 2. Sole owner of `EdfScale` construction and of the
|
|
5
|
-
* signal gets `scale: undefined` instead of a fabricated gain
|
|
4
|
+
* Layer 2. Sole owner of `EdfScale` construction and of the five conditions under which a
|
|
5
|
+
* signal gets `scale: undefined` instead of a fabricated gain: the three degenerate or inverted
|
|
6
|
+
* ranges, a log-transformed channel, and a derived gain that is not a usable float64. The last
|
|
7
|
+
* arrived in 0.4.509 and `design-decisions.md`, `physical-values.md` and `api-errors.md` have
|
|
8
|
+
* called it the fifth ever since; this said "the four conditions" until 0.6.72.
|
|
6
9
|
*
|
|
7
10
|
* The expression is EDFlib's, verbatim:
|
|
8
11
|
*
|
package/dist/header/scale.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scale.js","sourceRoot":"","sources":["../../src/header/scale.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"scale.js","sourceRoot":"","sources":["../../src/header/scale.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAIlD,8FAA8F;AAC9F,MAAM,yBAAyB,GAAG,UAAU,CAAC;AAE7C;0EAC0E;AAC1E,MAAM,WAAW,GAAG,OAAO,CAAC;AAC5B,MAAM,iBAAiB,GAAG,GAAG,CAAC;AAE9B,MAAM,oBAAoB,GAAG,iCAAiC,CAAC;AAgC/D;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,iBAAyB;IACrD,OAAO,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jB,uDAAuD,EACvD,YAAY,QAAQ,YAAY,MAAM,EAAE,EACxC,oBAAoB,CACrB,CACF,CAAC;QACF,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC;AAC9B,CAAC"}
|
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,EAA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,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,MAAkB,EAClB,MAAiB,EACjB,OAAoB,EACpB,OAAqB;IAErB,iBAAiB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,MAAM,UAAU,GAAG,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC;IAC3D,IAAI,UAAU,KAAK,CAAC;QAAE,OAAO,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;IAE/C,kBAAkB,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACjD,MAAM,UAAU,GAAG,MAAM,CAAC,gBAAgB,GAAG,OAAO,CAAC,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC;IACrF,OAAO,eAAe,CACpB,MAAM,MAAM,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC,EAClD,UAAU,EACV,UAAU,CACX,CAAC;AACJ,CAAC"}
|
package/docs/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,33 @@ 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.73
|
|
10
|
+
|
|
11
|
+
- **Fixed** the cost figure in `io/read.ts`, which states the unit-of-I/O rule as one of "two
|
|
12
|
+
rules [that] are the whole file". It said "ten seconds of one channel out of thirty is a 27x
|
|
13
|
+
overread spread over ten requests, against a single 153,600-byte read for all thirty".
|
|
14
|
+
- That is neither strategy and neither number. The read edfcore issues is ONE request of 153,600
|
|
15
|
+
bytes, of which 5,120 are the channel asked for — a factor of 30. The ten-request alternative is
|
|
16
|
+
the one that does not overread at all: ten stripes of 512 bytes, 5,120 bytes in total, at the
|
|
17
|
+
cost of ten round trips. `large-files.md` works the same window through both and has said
|
|
18
|
+
"Overread factor: 30" throughout.
|
|
19
|
+
- The sentence is the one a caller planning HTTP range requests reads, which is what the module
|
|
20
|
+
exists for. The test measures all of it through a counting source rather than restating it.
|
|
21
|
+
|
|
22
|
+
## 0.6.72
|
|
23
|
+
|
|
24
|
+
- **Fixed** `header/scale.ts` calling itself sole owner of "the four conditions" under which a
|
|
25
|
+
signal gets `scale: undefined`. There are five. The fifth — a physical range whose derived gain
|
|
26
|
+
is not a usable float64 — arrived in 0.4.509, and `design-decisions.md`, `physical-values.md`
|
|
27
|
+
and `api-errors.md` have each called it the fifth ever since. The module that owns them kept
|
|
28
|
+
the old count.
|
|
29
|
+
- It is the docblock a reader opens to find out when `signal.scale` can be `undefined`, which is
|
|
30
|
+
the whole reason that field is optional. A count one short there is a caller who handles four
|
|
31
|
+
cases and is surprised by a file.
|
|
32
|
+
- The test builds and drives each of the five rather than counting them out of the source, and
|
|
33
|
+
separates the fifth from the second — they share `DEGENERATE_PHYSICAL_RANGE` and the message
|
|
34
|
+
says which one fired. A sixth has to be exercised there before the count may grow again.
|
|
35
|
+
|
|
9
36
|
## 0.6.71
|
|
10
37
|
|
|
11
38
|
- **Fixed** `chunks.ts` opening with a call that throws on the index a reader holds. It said
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
package/src/header/scale.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Digital-to-physical scale, and the decision to refuse one.
|
|
3
3
|
*
|
|
4
|
-
* Layer 2. Sole owner of `EdfScale` construction and of the
|
|
5
|
-
* signal gets `scale: undefined` instead of a fabricated gain
|
|
4
|
+
* Layer 2. Sole owner of `EdfScale` construction and of the five conditions under which a
|
|
5
|
+
* signal gets `scale: undefined` instead of a fabricated gain: the three degenerate or inverted
|
|
6
|
+
* ranges, a log-transformed channel, and a derived gain that is not a usable float64. The last
|
|
7
|
+
* arrived in 0.4.509 and `design-decisions.md`, `physical-values.md` and `api-errors.md` have
|
|
8
|
+
* called it the fifth ever since; this said "the four conditions" until 0.6.72.
|
|
6
9
|
*
|
|
7
10
|
* The expression is EDFlib's, verbatim:
|
|
8
11
|
*
|
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
|