@photivra/engine 0.5.1 → 0.6.0
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 +32 -0
- package/CITATION.cff +1 -1
- package/README.md +37 -3
- package/dist/index.d.ts +15 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -2
- package/dist/index.js.map +1 -1
- package/dist/motion/camera-rotation.d.ts +60 -0
- package/dist/motion/camera-rotation.d.ts.map +1 -1
- package/dist/motion/camera-rotation.js +95 -0
- package/dist/motion/camera-rotation.js.map +1 -1
- package/dist/motion/capture-rotation-inverse-mapping.d.ts +100 -0
- package/dist/motion/capture-rotation-inverse-mapping.d.ts.map +1 -0
- package/dist/motion/capture-rotation-inverse-mapping.js +171 -0
- package/dist/motion/capture-rotation-inverse-mapping.js.map +1 -0
- package/dist/motion/capture-rotation-temporal-quadrature.d.ts +89 -0
- package/dist/motion/capture-rotation-temporal-quadrature.d.ts.map +1 -0
- package/dist/motion/capture-rotation-temporal-quadrature.js +116 -0
- package/dist/motion/capture-rotation-temporal-quadrature.js.map +1 -0
- package/dist/motion/capture-rotation-trajectory.d.ts +98 -0
- package/dist/motion/capture-rotation-trajectory.d.ts.map +1 -0
- package/dist/motion/capture-rotation-trajectory.js +153 -0
- package/dist/motion/capture-rotation-trajectory.js.map +1 -0
- package/dist/optics/lateral-chromatic-aberration.d.ts.map +1 -1
- package/dist/optics/lateral-chromatic-aberration.js +12 -4
- package/dist/optics/lateral-chromatic-aberration.js.map +1 -1
- package/dist/optics/radial-distortion.d.ts +4 -2
- package/dist/optics/radial-distortion.d.ts.map +1 -1
- package/dist/optics/radial-distortion.js +83 -23
- package/dist/optics/radial-distortion.js.map +1 -1
- package/dist/output/capture-geometry.d.ts.map +1 -1
- package/dist/output/capture-geometry.js +24 -11
- package/dist/output/capture-geometry.js.map +1 -1
- package/dist/sensor/capture-color-sampling-binding.d.ts +211 -0
- package/dist/sensor/capture-color-sampling-binding.d.ts.map +1 -0
- package/dist/sensor/capture-color-sampling-binding.js +423 -0
- package/dist/sensor/capture-color-sampling-binding.js.map +1 -0
- package/dist/sensor/capture-mode.d.ts +157 -0
- package/dist/sensor/capture-mode.d.ts.map +1 -0
- package/dist/sensor/capture-mode.js +434 -0
- package/dist/sensor/capture-mode.js.map +1 -0
- package/dist/sensor/color-sampling.d.ts +133 -0
- package/dist/sensor/color-sampling.d.ts.map +1 -0
- package/dist/sensor/color-sampling.js +226 -0
- package/dist/sensor/color-sampling.js.map +1 -0
- package/dist/sensor/exposure-window.d.ts +103 -0
- package/dist/sensor/exposure-window.d.ts.map +1 -0
- package/dist/sensor/exposure-window.js +291 -0
- package/dist/sensor/exposure-window.js.map +1 -0
- package/dist/sensor/optical-stack.d.ts +132 -0
- package/dist/sensor/optical-stack.d.ts.map +1 -0
- package/dist/sensor/optical-stack.js +286 -0
- package/dist/sensor/optical-stack.js.map +1 -0
- package/dist/sensor/readout-exposure-linkage.d.ts +111 -0
- package/dist/sensor/readout-exposure-linkage.d.ts.map +1 -0
- package/dist/sensor/readout-exposure-linkage.js +210 -0
- package/dist/sensor/readout-exposure-linkage.js.map +1 -0
- package/dist/sensor/readout-timing.d.ts +124 -0
- package/dist/sensor/readout-timing.d.ts.map +1 -0
- package/dist/sensor/readout-timing.js +230 -0
- package/dist/sensor/readout-timing.js.map +1 -0
- package/dist/sensor/sampling-aperture.d.ts +154 -0
- package/dist/sensor/sampling-aperture.d.ts.map +1 -0
- package/dist/sensor/sampling-aperture.js +374 -0
- package/dist/sensor/sampling-aperture.js.map +1 -0
- package/dist/sensor/spatial-sample-reduction.d.ts +128 -0
- package/dist/sensor/spatial-sample-reduction.d.ts.map +1 -0
- package/dist/sensor/spatial-sample-reduction.js +299 -0
- package/dist/sensor/spatial-sample-reduction.js.map +1 -0
- package/dist/sensor/spatial-sampling-quadrature.d.ts +155 -0
- package/dist/sensor/spatial-sampling-quadrature.d.ts.map +1 -0
- package/dist/sensor/spatial-sampling-quadrature.js +197 -0
- package/dist/sensor/spatial-sampling-quadrature.js.map +1 -0
- package/docs/ARCHITECTURE.md +17 -0
- package/docs/AUTOMATION_COORDINATION.md +188 -0
- package/docs/IMAGE_FORMATION.md +26 -0
- package/docs/MOTION_AND_SIGNAL.md +142 -0
- package/docs/USAGE.md +1273 -3
- package/package.json +5 -3
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
import { approximationResult } from "../core/calculation-result.js";
|
|
3
|
+
import { InvalidScientificInputError } from "../core/validation.js";
|
|
4
|
+
const SQUARE_MICROMETERS_TO_SQUARE_METERS = 1e-12;
|
|
5
|
+
const WEIGHT_TOLERANCE = 1e-10;
|
|
6
|
+
const AREA_TOLERANCE = 1e-10;
|
|
7
|
+
function requireSafeNonNegativeInteger(value, path) {
|
|
8
|
+
if (typeof value !== "number" ||
|
|
9
|
+
!Number.isSafeInteger(value) ||
|
|
10
|
+
value < 0) {
|
|
11
|
+
throw new InvalidScientificInputError(path +
|
|
12
|
+
" must be a non-negative safe integer.");
|
|
13
|
+
}
|
|
14
|
+
return value;
|
|
15
|
+
}
|
|
16
|
+
function requireNonNegativeFinite(value, path) {
|
|
17
|
+
if (typeof value !== "number" ||
|
|
18
|
+
!Number.isFinite(value) ||
|
|
19
|
+
value < 0) {
|
|
20
|
+
throw new InvalidScientificInputError(path +
|
|
21
|
+
" must be a finite number greater than or equal to zero.");
|
|
22
|
+
}
|
|
23
|
+
return value;
|
|
24
|
+
}
|
|
25
|
+
function requirePositiveFinite(value, path) {
|
|
26
|
+
if (typeof value !== "number" ||
|
|
27
|
+
!Number.isFinite(value) ||
|
|
28
|
+
value <= 0) {
|
|
29
|
+
throw new InvalidScientificInputError(path +
|
|
30
|
+
" must be a finite number greater than zero.");
|
|
31
|
+
}
|
|
32
|
+
return value;
|
|
33
|
+
}
|
|
34
|
+
function parseValueDomain(value) {
|
|
35
|
+
if (typeof value !== "object" ||
|
|
36
|
+
value === null ||
|
|
37
|
+
Array.isArray(value)) {
|
|
38
|
+
throw new InvalidScientificInputError("valueDomain must be an object.");
|
|
39
|
+
}
|
|
40
|
+
const record = value;
|
|
41
|
+
if (record.kind === "relative-linear") {
|
|
42
|
+
if (record.unit !== "relative" ||
|
|
43
|
+
record.semantic !==
|
|
44
|
+
"nonnegative-sensor-plane-irradiance-proxy") {
|
|
45
|
+
throw new InvalidScientificInputError("relative-linear valueDomain must use unit \"relative\" and the canonical nonnegative sensor-plane irradiance-proxy semantic.");
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
kind: "relative-linear",
|
|
49
|
+
unit: "relative",
|
|
50
|
+
semantic: "nonnegative-sensor-plane-irradiance-proxy"
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
if (record.kind === "radiometric-irradiance") {
|
|
54
|
+
if (record.unit !== "W/m^2" ||
|
|
55
|
+
record.semantic !==
|
|
56
|
+
"sensor-plane-irradiance") {
|
|
57
|
+
throw new InvalidScientificInputError("radiometric-irradiance valueDomain must use unit \"W/m^2\" and semantic \"sensor-plane-irradiance\".");
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
kind: "radiometric-irradiance",
|
|
61
|
+
unit: "W/m^2",
|
|
62
|
+
semantic: "sensor-plane-irradiance"
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
throw new InvalidScientificInputError("valueDomain.kind is invalid.");
|
|
66
|
+
}
|
|
67
|
+
function nodeIdentityKey(identity) {
|
|
68
|
+
return (identity.antiAliasingComponentIndex +
|
|
69
|
+
":" +
|
|
70
|
+
identity.apertureSampleXIndex +
|
|
71
|
+
":" +
|
|
72
|
+
identity.apertureSampleYIndex);
|
|
73
|
+
}
|
|
74
|
+
function validateQuadratureNode(node, index) {
|
|
75
|
+
const identity = {
|
|
76
|
+
antiAliasingComponentIndex: requireSafeNonNegativeInteger(node.antiAliasingComponentIndex, "quadrature.nodes[" +
|
|
77
|
+
index +
|
|
78
|
+
"].antiAliasingComponentIndex"),
|
|
79
|
+
apertureSampleXIndex: requireSafeNonNegativeInteger(node.apertureSampleXIndex, "quadrature.nodes[" +
|
|
80
|
+
index +
|
|
81
|
+
"].apertureSampleXIndex"),
|
|
82
|
+
apertureSampleYIndex: requireSafeNonNegativeInteger(node.apertureSampleYIndex, "quadrature.nodes[" +
|
|
83
|
+
index +
|
|
84
|
+
"].apertureSampleYIndex")
|
|
85
|
+
};
|
|
86
|
+
requireNonNegativeFinite(node.combinedNormalizedSpatialWeight, "quadrature.nodes[" +
|
|
87
|
+
index +
|
|
88
|
+
"].combinedNormalizedSpatialWeight");
|
|
89
|
+
requireNonNegativeFinite(node.combinedAreaMeasureSquareMicrometers, "quadrature.nodes[" +
|
|
90
|
+
index +
|
|
91
|
+
"].combinedAreaMeasureSquareMicrometers");
|
|
92
|
+
return identity;
|
|
93
|
+
}
|
|
94
|
+
function approximatelyEqual(actual, expected, tolerance) {
|
|
95
|
+
const scale = Math.max(1, Math.abs(actual), Math.abs(expected));
|
|
96
|
+
return (Math.abs(actual - expected) <=
|
|
97
|
+
tolerance * scale);
|
|
98
|
+
}
|
|
99
|
+
function validateQuadrature(quadrature) {
|
|
100
|
+
if (typeof quadrature !== "object" ||
|
|
101
|
+
quadrature === null ||
|
|
102
|
+
!Array.isArray(quadrature.nodes)) {
|
|
103
|
+
throw new InvalidScientificInputError("quadrature must contain a nodes array.");
|
|
104
|
+
}
|
|
105
|
+
const totalNodeCount = requireSafeNonNegativeInteger(quadrature.totalNodeCount, "quadrature.totalNodeCount");
|
|
106
|
+
if (totalNodeCount === 0 ||
|
|
107
|
+
quadrature.nodes.length !==
|
|
108
|
+
totalNodeCount) {
|
|
109
|
+
throw new InvalidScientificInputError("quadrature.totalNodeCount must be positive and exactly match quadrature.nodes.length.");
|
|
110
|
+
}
|
|
111
|
+
if (typeof quadrature.channelId !== "string" ||
|
|
112
|
+
quadrature.channelId.trim().length === 0) {
|
|
113
|
+
throw new InvalidScientificInputError("quadrature.channelId must be a non-empty string.");
|
|
114
|
+
}
|
|
115
|
+
requireSafeNonNegativeInteger(quadrature.site.x, "quadrature.site.x");
|
|
116
|
+
requireSafeNonNegativeInteger(quadrature.site.y, "quadrature.site.y");
|
|
117
|
+
const geometricArea = requirePositiveFinite(quadrature.geometricApertureAreaSquareMicrometers, "quadrature.geometricApertureAreaSquareMicrometers");
|
|
118
|
+
const nodesByKey = new Map();
|
|
119
|
+
let weightSum = 0;
|
|
120
|
+
let areaSum = 0;
|
|
121
|
+
quadrature.nodes.forEach((node, index) => {
|
|
122
|
+
const identity = validateQuadratureNode(node, index);
|
|
123
|
+
const key = nodeIdentityKey(identity);
|
|
124
|
+
if (nodesByKey.has(key)) {
|
|
125
|
+
throw new InvalidScientificInputError("quadrature contains duplicate node identities.");
|
|
126
|
+
}
|
|
127
|
+
nodesByKey.set(key, node);
|
|
128
|
+
weightSum +=
|
|
129
|
+
node.combinedNormalizedSpatialWeight;
|
|
130
|
+
areaSum +=
|
|
131
|
+
node.combinedAreaMeasureSquareMicrometers;
|
|
132
|
+
if (!Number.isFinite(weightSum) ||
|
|
133
|
+
!Number.isFinite(areaSum)) {
|
|
134
|
+
throw new InvalidScientificInputError("quadrature aggregate weights/measures must remain finite.");
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
if (!approximatelyEqual(weightSum, 1, WEIGHT_TOLERANCE)) {
|
|
138
|
+
throw new InvalidScientificInputError("quadrature combined normalized spatial weights must sum to 1.");
|
|
139
|
+
}
|
|
140
|
+
if (!approximatelyEqual(areaSum, geometricArea, AREA_TOLERANCE)) {
|
|
141
|
+
throw new InvalidScientificInputError("quadrature combined geometric area measures must sum to the geometric aperture area.");
|
|
142
|
+
}
|
|
143
|
+
if (!approximatelyEqual(quadrature.normalizedSpatialWeightSum, weightSum, WEIGHT_TOLERANCE)) {
|
|
144
|
+
throw new InvalidScientificInputError("quadrature.normalizedSpatialWeightSum does not match node weights.");
|
|
145
|
+
}
|
|
146
|
+
if (!approximatelyEqual(quadrature.combinedAreaMeasureSumSquareMicrometers, areaSum, AREA_TOLERANCE)) {
|
|
147
|
+
throw new InvalidScientificInputError("quadrature.combinedAreaMeasureSumSquareMicrometers does not match node measures.");
|
|
148
|
+
}
|
|
149
|
+
return nodesByKey;
|
|
150
|
+
}
|
|
151
|
+
function parseNodeValues(nodeValues, nodesByKey) {
|
|
152
|
+
if (!Array.isArray(nodeValues)) {
|
|
153
|
+
throw new InvalidScientificInputError("nodeValues must be an array.");
|
|
154
|
+
}
|
|
155
|
+
if (nodeValues.length !==
|
|
156
|
+
nodesByKey.size) {
|
|
157
|
+
throw new InvalidScientificInputError("nodeValues must contain exactly one value for every quadrature node.");
|
|
158
|
+
}
|
|
159
|
+
const valuesByKey = new Map();
|
|
160
|
+
nodeValues.forEach((entry, index) => {
|
|
161
|
+
if (typeof entry !== "object" ||
|
|
162
|
+
entry === null ||
|
|
163
|
+
typeof entry.node !== "object" ||
|
|
164
|
+
entry.node === null) {
|
|
165
|
+
throw new InvalidScientificInputError("nodeValues[" +
|
|
166
|
+
index +
|
|
167
|
+
"] must contain a node identity object.");
|
|
168
|
+
}
|
|
169
|
+
const identity = {
|
|
170
|
+
antiAliasingComponentIndex: requireSafeNonNegativeInteger(entry.node
|
|
171
|
+
.antiAliasingComponentIndex, "nodeValues[" +
|
|
172
|
+
index +
|
|
173
|
+
"].node.antiAliasingComponentIndex"),
|
|
174
|
+
apertureSampleXIndex: requireSafeNonNegativeInteger(entry.node.apertureSampleXIndex, "nodeValues[" +
|
|
175
|
+
index +
|
|
176
|
+
"].node.apertureSampleXIndex"),
|
|
177
|
+
apertureSampleYIndex: requireSafeNonNegativeInteger(entry.node.apertureSampleYIndex, "nodeValues[" +
|
|
178
|
+
index +
|
|
179
|
+
"].node.apertureSampleYIndex")
|
|
180
|
+
};
|
|
181
|
+
const key = nodeIdentityKey(identity);
|
|
182
|
+
if (!nodesByKey.has(key)) {
|
|
183
|
+
throw new InvalidScientificInputError("nodeValues[" +
|
|
184
|
+
index +
|
|
185
|
+
"] identifies a node that is not present in quadrature.");
|
|
186
|
+
}
|
|
187
|
+
if (valuesByKey.has(key)) {
|
|
188
|
+
throw new InvalidScientificInputError("nodeValues contains duplicate node identities.");
|
|
189
|
+
}
|
|
190
|
+
valuesByKey.set(key, requireNonNegativeFinite(entry.value, "nodeValues[" +
|
|
191
|
+
index +
|
|
192
|
+
"].value"));
|
|
193
|
+
});
|
|
194
|
+
return valuesByKey;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Reduces explicitly identified nonnegative linear scalar values over a
|
|
198
|
+
* validated sensor spatial quadrature.
|
|
199
|
+
*
|
|
200
|
+
* This function does not sample a renderer or optical model itself. Callers
|
|
201
|
+
* evaluate one value at every quadrature node's preAntiAliasingSourcePointMm
|
|
202
|
+
* and provide those values with exact node identity. Ordering is deliberately
|
|
203
|
+
* irrelevant.
|
|
204
|
+
*
|
|
205
|
+
* Two domains are supported:
|
|
206
|
+
*
|
|
207
|
+
* - relative-linear: dimensionless nonnegative irradiance-like proxy for
|
|
208
|
+
* deterministic renderer/science regression;
|
|
209
|
+
* - radiometric-irradiance: physical sensor-plane irradiance in W/m^2.
|
|
210
|
+
*
|
|
211
|
+
* The destination site's channelId is metadata only. No CFA spectral
|
|
212
|
+
* transmittance/sensitivity is applied, so the output must not be called a
|
|
213
|
+
* physically color-filtered mosaic sample or RAW value.
|
|
214
|
+
*/
|
|
215
|
+
export function reduceSensorSpatialSamplingQuadrature(input) {
|
|
216
|
+
const domain = parseValueDomain(input.valueDomain);
|
|
217
|
+
const nodesByKey = validateQuadrature(input.quadrature);
|
|
218
|
+
const valuesByKey = parseNodeValues(input.nodeValues, nodesByKey);
|
|
219
|
+
let weightedAverage = 0;
|
|
220
|
+
let areaWeightedIntegral = 0;
|
|
221
|
+
nodesByKey.forEach((node, key) => {
|
|
222
|
+
const value = valuesByKey.get(key);
|
|
223
|
+
if (value === undefined) {
|
|
224
|
+
throw new InvalidScientificInputError("A quadrature node is missing its explicit source value.");
|
|
225
|
+
}
|
|
226
|
+
weightedAverage +=
|
|
227
|
+
value *
|
|
228
|
+
node.combinedNormalizedSpatialWeight;
|
|
229
|
+
areaWeightedIntegral +=
|
|
230
|
+
value *
|
|
231
|
+
node.combinedAreaMeasureSquareMicrometers;
|
|
232
|
+
if (!Number.isFinite(weightedAverage) ||
|
|
233
|
+
!Number.isFinite(areaWeightedIntegral)) {
|
|
234
|
+
throw new InvalidScientificInputError("Reduced spatial sample must remain finite.");
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
const reducedValue = domain.kind === "relative-linear"
|
|
238
|
+
? {
|
|
239
|
+
kind: "relative-linear",
|
|
240
|
+
unit: "relative",
|
|
241
|
+
semantic: "nonnegative-sensor-plane-irradiance-proxy",
|
|
242
|
+
normalizedSpatialAverageRelative: weightedAverage,
|
|
243
|
+
geometricAreaIntegralRelativeSquareMicrometers: areaWeightedIntegral
|
|
244
|
+
}
|
|
245
|
+
: {
|
|
246
|
+
kind: "radiometric-irradiance",
|
|
247
|
+
unit: "W/m^2",
|
|
248
|
+
semantic: "sensor-plane-irradiance",
|
|
249
|
+
normalizedSpatialAverageIrradianceWattsPerSquareMeter: weightedAverage,
|
|
250
|
+
geometricApertureIncidentFluxWatts: areaWeightedIntegral *
|
|
251
|
+
SQUARE_MICROMETERS_TO_SQUARE_METERS
|
|
252
|
+
};
|
|
253
|
+
return approximationResult({
|
|
254
|
+
site: {
|
|
255
|
+
...input.quadrature.site
|
|
256
|
+
},
|
|
257
|
+
channelId: input.quadrature.channelId,
|
|
258
|
+
outputMeaning: "channel-tagged-pre-response-spatial-sample",
|
|
259
|
+
valueDomain: domain,
|
|
260
|
+
nodeCount: input.quadrature.totalNodeCount,
|
|
261
|
+
sourceValuesMatchedBy: "quadrature-node-identity",
|
|
262
|
+
sourceValuesSuppliedForAllNodes: true,
|
|
263
|
+
outsideImagingAreaSourceValuesRequired: input.quadrature
|
|
264
|
+
.preAntiAliasingSourceOutsideImagingAreaNodeCount >
|
|
265
|
+
0,
|
|
266
|
+
normalizedSpatialWeightSum: input.quadrature
|
|
267
|
+
.normalizedSpatialWeightSum,
|
|
268
|
+
geometricApertureAreaSquareMicrometers: input.quadrature
|
|
269
|
+
.geometricApertureAreaSquareMicrometers,
|
|
270
|
+
reducedValue,
|
|
271
|
+
cfaSpectralFilteringApplied: false,
|
|
272
|
+
channelIdIsSpectralResponse: false,
|
|
273
|
+
temporalIntegrationApplied: false,
|
|
274
|
+
exposureDurationApplied: false,
|
|
275
|
+
quantumEfficiencyApplied: false,
|
|
276
|
+
microlensResponseApplied: false,
|
|
277
|
+
opticalThroughputAppliedByReducer: false,
|
|
278
|
+
photonsCalculated: false,
|
|
279
|
+
electronsCalculated: false,
|
|
280
|
+
shotNoiseApplied: false,
|
|
281
|
+
readNoiseApplied: false,
|
|
282
|
+
adcQuantizationApplied: false,
|
|
283
|
+
blackLevelApplied: false,
|
|
284
|
+
saturationApplied: false,
|
|
285
|
+
rawCodeValueProduced: false,
|
|
286
|
+
demosaicOrReconstructionApplied: false
|
|
287
|
+
}, "sensor-spatial-sample-reduction", "1.0.0", [
|
|
288
|
+
"Input values are nonnegative linear scalars evaluated at each quadrature node's pre-AA source coordinate.",
|
|
289
|
+
"Node values are matched by explicit quadrature-node identity rather than positional array order.",
|
|
290
|
+
"The destination CFA/color channel is metadata only; no spectral transmittance, sensor spectral responsivity or quantum efficiency is applied.",
|
|
291
|
+
"Relative-linear values are dimensionless irradiance-like proxies for deterministic testing and do not become physical radiometry.",
|
|
292
|
+
"Radiometric-irradiance values use W/m^2; geometric aperture integration converts square micrometres to square metres to report incident radiant flux in watts.",
|
|
293
|
+
"The physical irradiance branch reports geometric-aperture incident flux under the caller-supplied irradiance field and normalized AA spatial redistribution; it does not add omitted optical-stack throughput, microlens response, CFA response or sensor conversion.",
|
|
294
|
+
"Every quadrature node requires an explicit source value, including pre-AA source points outside the active imaging area; no automatic clamping, zero-fill, extrapolation or renormalization occurs.",
|
|
295
|
+
"Negative, NaN and infinite source values are rejected; signed intermediate color-transform values are outside this pre-response sensor-plane contract.",
|
|
296
|
+
"Temporal exposure integration, wavelength integration, photons/electrons, noise, saturation, black level, ADC quantization, RAW code values and reconstruction remain separate future work."
|
|
297
|
+
]);
|
|
298
|
+
}
|
|
299
|
+
//# sourceMappingURL=spatial-sample-reduction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spatial-sample-reduction.js","sourceRoot":"","sources":["../../src/sensor/spatial-sample-reduction.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC,OAAO,EACL,mBAAmB,EAEpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAMpE,MAAM,mCAAmC,GAAG,KAAK,CAAC;AAClD,MAAM,gBAAgB,GAAG,KAAK,CAAC;AAC/B,MAAM,cAAc,GAAG,KAAK,CAAC;AAyH7B,SAAS,6BAA6B,CACpC,KAAc,EACd,IAAY;IAEZ,IACE,OAAO,KAAK,KAAK,QAAQ;QACzB,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC;QAC5B,KAAK,GAAG,CAAC,EACT,CAAC;QACD,MAAM,IAAI,2BAA2B,CACnC,IAAI;YACF,uCAAuC,CAC1C,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,wBAAwB,CAC/B,KAAc,EACd,IAAY;IAEZ,IACE,OAAO,KAAK,KAAK,QAAQ;QACzB,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;QACvB,KAAK,GAAG,CAAC,EACT,CAAC;QACD,MAAM,IAAI,2BAA2B,CACnC,IAAI;YACF,yDAAyD,CAC5D,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,qBAAqB,CAC5B,KAAc,EACd,IAAY;IAEZ,IACE,OAAO,KAAK,KAAK,QAAQ;QACzB,CAAC,MAAM,CAAC,QA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oB;gBACpB,mCAAmC;SACtC,CAAC;IAER,OAAO,mBAAmB,CACxB;QACE,IAAI,EAAE;YACJ,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI;SACzB;QACD,SAAS,EACP,KAAK,CAAC,UAAU,CAAC,SAAS;QAC5B,aAAa,EACX,4CAA4C;QAC9C,WAAW,EAAE,MAAM;QACnB,SAAS,EACP,KAAK,CAAC,UAAU,CAAC,cAAc;QACjC,qBAAqB,EACnB,0BAA0B;QAC5B,+BAA+B,EAAE,IAAI;QACrC,sCAAsC,EACpC,KAAK,CAAC,UAAU;aACb,gDAAgD;YACnD,CAAC;QACH,0BAA0B,EACxB,KAAK,CAAC,UAAU;aACb,0BAA0B;QAC/B,sCAAsC,EACpC,KAAK,CAAC,UAAU;aACb,sCAAsC;QAC3C,YAAY;QACZ,2BAA2B,EAAE,KAAK;QAClC,2BAA2B,EAAE,KAAK;QAClC,0BAA0B,EAAE,KAAK;QACjC,uBAAuB,EAAE,KAAK;QAC9B,wBAAwB,EAAE,KAAK;QAC/B,wBAAwB,EAAE,KAAK;QAC/B,iCAAiC,EAC/B,KAAK;QACP,iBAAiB,EAAE,KAAK;QACxB,mBAAmB,EAAE,KAAK;QAC1B,gBAAgB,EAAE,KAAK;QACvB,gBAAgB,EAAE,KAAK;QACvB,sBAAsB,EAAE,KAAK;QAC7B,iBAAiB,EAAE,KAAK;QACxB,iBAAiB,EAAE,KAAK;QACxB,oBAAoB,EAAE,KAAK;QAC3B,+BAA+B,EAAE,KAAK;KACvC,EACD,iCAAiC,EACjC,OAAO,EACP;QACE,2GAA2G;QAC3G,kGAAkG;QAClG,+IAA+I;QAC/I,mIAAmI;QACnI,gKAAgK;QAChK,uQAAuQ;QACvQ,qMAAqM;QACrM,wJAAwJ;QACxJ,6LAA6L;KAC9L,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { type CalculationResult } from "../core/calculation-result.js";
|
|
2
|
+
import type { NativeEffectiveRasterColorSamplingBindingProfile } from "./capture-color-sampling-binding.js";
|
|
3
|
+
import type { NativeColorSamplingSiteIndex, SensorColorSamplingProfile } from "./color-sampling.js";
|
|
4
|
+
import { type SensorOpticalStackProfile } from "./optical-stack.js";
|
|
5
|
+
import { type SensorSamplingApertureProfile } from "./sampling-aperture.js";
|
|
6
|
+
import type { NativeImageRaster, SensorImagingArea } from "./sensor-geometry.js";
|
|
7
|
+
export interface CalculateSensorSpatialSamplingQuadratureInput {
|
|
8
|
+
imagingArea: SensorImagingArea;
|
|
9
|
+
nativeRaster: NativeImageRaster;
|
|
10
|
+
colorSamplingProfile: SensorColorSamplingProfile;
|
|
11
|
+
colorSamplingBindingProfile: NativeEffectiveRasterColorSamplingBindingProfile;
|
|
12
|
+
samplingApertureProfile: SensorSamplingApertureProfile;
|
|
13
|
+
opticalStackProfile: SensorOpticalStackProfile;
|
|
14
|
+
site: NativeColorSamplingSiteIndex;
|
|
15
|
+
/** Number of midpoint cells across the geometric aperture width. */
|
|
16
|
+
spatialSampleCountX: number;
|
|
17
|
+
/** Number of midpoint cells across the geometric aperture height. */
|
|
18
|
+
spatialSampleCountY: number;
|
|
19
|
+
}
|
|
20
|
+
export interface SensorSpatialSamplingQuadratureNode {
|
|
21
|
+
antiAliasingComponentIndex: number;
|
|
22
|
+
apertureSampleXIndex: number;
|
|
23
|
+
apertureSampleYIndex: number;
|
|
24
|
+
/**
|
|
25
|
+
* Destination point inside the geometric sensitive aperture after the
|
|
26
|
+
* declared AA point-splitting response.
|
|
27
|
+
*
|
|
28
|
+
* Native sensor physical coordinates, millimetres from the optical axis.
|
|
29
|
+
*/
|
|
30
|
+
destinationAperturePointMm: {
|
|
31
|
+
x: number;
|
|
32
|
+
y: number;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Declared AA displacement of optical energy on the sensor plane.
|
|
36
|
+
*
|
|
37
|
+
* +X right, +Y down; micrometres.
|
|
38
|
+
*/
|
|
39
|
+
antiAliasingOffsetMicrometers: {
|
|
40
|
+
x: number;
|
|
41
|
+
y: number;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Pre-AA source point that maps to destinationAperturePointMm under the
|
|
45
|
+
* declared split component:
|
|
46
|
+
*
|
|
47
|
+
* source = destination - AA offset
|
|
48
|
+
*/
|
|
49
|
+
preAntiAliasingSourcePointMm: {
|
|
50
|
+
x: number;
|
|
51
|
+
y: number;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Whether the pre-AA source point lies inside the active physical imaging
|
|
55
|
+
* area. False is not an error; downstream source-coverage policy decides how
|
|
56
|
+
* to handle valid optical support outside the active sampling area.
|
|
57
|
+
*/
|
|
58
|
+
preAntiAliasingSourceInsideImagingArea: boolean;
|
|
59
|
+
/** Dimensionless midpoint weight for the aperture-area average. */
|
|
60
|
+
normalizedApertureWeight: number;
|
|
61
|
+
/** Dimensionless normalized weight from the AA split component. */
|
|
62
|
+
normalizedAntiAliasingWeight: number;
|
|
63
|
+
/**
|
|
64
|
+
* Dimensionless product used for a spatial average of a downstream optical
|
|
65
|
+
* field under this quadrature approximation.
|
|
66
|
+
*/
|
|
67
|
+
combinedNormalizedSpatialWeight: number;
|
|
68
|
+
/**
|
|
69
|
+
* Geometric area measure represented by this aperture midpoint before the
|
|
70
|
+
* AA component weight is applied. Units: square micrometres.
|
|
71
|
+
*/
|
|
72
|
+
apertureAreaMeasureSquareMicrometers: number;
|
|
73
|
+
/**
|
|
74
|
+
* Geometric area measure multiplied by the dimensionless AA component
|
|
75
|
+
* weight. Units remain square micrometres.
|
|
76
|
+
*
|
|
77
|
+
* This is not an effective radiometric collection area.
|
|
78
|
+
*/
|
|
79
|
+
combinedAreaMeasureSquareMicrometers: number;
|
|
80
|
+
}
|
|
81
|
+
export interface SensorSpatialSamplingQuadrature {
|
|
82
|
+
coordinateSystem: "native-sensor-physical";
|
|
83
|
+
site: NativeColorSamplingSiteIndex;
|
|
84
|
+
channelId: string;
|
|
85
|
+
quadratureScheme: "tensor-product-uniform-midpoint";
|
|
86
|
+
outputMeaning: "pre-aa-optical-field-spatial-quadrature-nodes";
|
|
87
|
+
spatialSampleCountX: number;
|
|
88
|
+
spatialSampleCountY: number;
|
|
89
|
+
antiAliasingComponentCount: number;
|
|
90
|
+
totalNodeCount: number;
|
|
91
|
+
geometricApertureAreaSquareMicrometers: number;
|
|
92
|
+
normalizedSpatialWeightSum: number;
|
|
93
|
+
combinedAreaMeasureSumSquareMicrometers: number;
|
|
94
|
+
preAntiAliasingSourceOutsideImagingAreaNodeCount: number;
|
|
95
|
+
sourcePointRule: "pre-aa-source-equals-destination-minus-aa-offset";
|
|
96
|
+
destinationCfaChannelAppliesToAllNodes: true;
|
|
97
|
+
cfaReassignmentBySourceCoordinate: false;
|
|
98
|
+
sourceCoveragePolicy: "not-applied";
|
|
99
|
+
nodes: readonly SensorSpatialSamplingQuadratureNode[];
|
|
100
|
+
/**
|
|
101
|
+
* Hard scientific boundaries.
|
|
102
|
+
*/
|
|
103
|
+
opticalFieldValuesIncluded: false;
|
|
104
|
+
radianceIncluded: false;
|
|
105
|
+
photonsIncluded: false;
|
|
106
|
+
electronsIncluded: false;
|
|
107
|
+
spectralResponseIncluded: false;
|
|
108
|
+
quantumEfficiencyIncluded: false;
|
|
109
|
+
opticalThroughputIncluded: false;
|
|
110
|
+
microlensResponseIncluded: false;
|
|
111
|
+
chargeDiffusionIncluded: false;
|
|
112
|
+
electricalCrosstalkIncluded: false;
|
|
113
|
+
temporalIntegrationIncluded: false;
|
|
114
|
+
rawSampleValueIncluded: false;
|
|
115
|
+
reconstructedPixelValueIncluded: false;
|
|
116
|
+
geometricAreaMeasureIsRadiometricCollectionArea: false;
|
|
117
|
+
componentEvidence: {
|
|
118
|
+
samplingApertureProfile: readonly import("../core/evidence-provenance.js").EvidenceProvenance[];
|
|
119
|
+
samplingApertureLattice: readonly import("../core/evidence-provenance.js").EvidenceProvenance[];
|
|
120
|
+
geometricSensitiveAperture: readonly import("../core/evidence-provenance.js").EvidenceProvenance[];
|
|
121
|
+
opticalStackProfile: readonly import("../core/evidence-provenance.js").EvidenceProvenance[];
|
|
122
|
+
antiAliasingResponse: readonly import("../core/evidence-provenance.js").EvidenceProvenance[];
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Builds deterministic spatial quadrature nodes for one CFA/color-sampling site.
|
|
127
|
+
*
|
|
128
|
+
* The quadrature composes:
|
|
129
|
+
*
|
|
130
|
+
* 1. the resolved geometric sensitive aperture from the sampling-aperture
|
|
131
|
+
* foundation; and
|
|
132
|
+
* 2. the resolved effective AA point-splitting kernel from the optical-stack
|
|
133
|
+
* foundation.
|
|
134
|
+
*
|
|
135
|
+
* The first aperture integration uses a tensor-product uniform midpoint rule.
|
|
136
|
+
* For an AA component that moves optical energy by +delta on the sensor plane,
|
|
137
|
+
* a destination aperture point samples the pre-AA optical field at
|
|
138
|
+
* destination - delta. This inverse-source convention prevents applying the AA
|
|
139
|
+
* shift twice.
|
|
140
|
+
*
|
|
141
|
+
* The destination sensor site's CFA channel applies to every node. The
|
|
142
|
+
* pre-AA source coordinate is an optical-field location, not another CFA site;
|
|
143
|
+
* therefore shifted source coordinates never reassign the destination channel.
|
|
144
|
+
*
|
|
145
|
+
* Nodes whose pre-AA source coordinates fall outside the active imaging area
|
|
146
|
+
* are retained. They are neither clamped nor dropped/renormalized. A renderer
|
|
147
|
+
* or optical-field provider owns source-coverage policy.
|
|
148
|
+
*
|
|
149
|
+
* normalized weights approximate a spatial average. Square-micrometre measures
|
|
150
|
+
* approximate a geometric area integral. Neither includes radiometric
|
|
151
|
+
* throughput, QE, photon conversion, microlenses, diffusion/crosstalk, or
|
|
152
|
+
* temporal integration.
|
|
153
|
+
*/
|
|
154
|
+
export declare function calculateSensorSpatialSamplingQuadrature(input: CalculateSensorSpatialSamplingQuadratureInput): CalculationResult<SensorSpatialSamplingQuadrature>;
|
|
155
|
+
//# sourceMappingURL=spatial-sampling-quadrature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spatial-sampling-quadrature.d.ts","sourceRoot":"","sources":["../../src/sensor/spatial-sampling-quadrature.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,+BAA+B,CAAC;AAKvC,OAAO,KAAK,EACV,gDAAgD,EACjD,MAAM,qCAAqC,CAAC;AAC7C,OAAO,KAAK,EACV,4BAA4B,EAC5B,0BAA0B,EAC3B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,KAAK,yBAAyB,EAC/B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAEL,KAAK,6BAA6B,EACnC,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,sBAAsB,CAAC;AAI9B,MAAM,WAAW,6CAA6C;IAC5D,WAAW,EAAE,iBAAiB,CAAC;IAC/B,YAAY,EAAE,iBAAiB,CAAC;IAChC,oBAAoB,EAAE,0BAA0B,CAAC;IACjD,2BAA2B,EAAE,gDAAgD,CAAC;IAC9E,uBAAuB,EAAE,6BAA6B,CAAC;IACvD,mBAAmB,EAAE,yBAAyB,CAAC;IAC/C,IAAI,EAAE,4BAA4B,CAAC;IACnC,oEAAoE;IACpE,mBAAmB,EAAE,MAAM,CAAC;IAC5B,qEAAqE;IACrE,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,mCAAmC;IAClD,0BAA0B,EAAE,MAAM,CAAC;IACnC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oBAAoB,EAAE,MAAM,CAAC;IAC7B;;;;;OAKG;IACH,0BAA0B,EAAE;QAC1B,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;KACX,CAAC;IACF;;;;OAIG;IACH,6BAA6B,EAAE;QAC7B,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;KACX,CAAC;IACF;;;;;O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