@photivra/engine 1.5.0 → 2.1.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 +414 -6
- package/CITATION.cff +1 -1
- package/NODE_SUPPORT.md +64 -12
- package/README.md +301 -182
- package/SECURITY.md +37 -28
- package/THIRD_PARTY.md +148 -4
- package/dist/camera/equivalent-focal-length.d.ts +13 -14
- package/dist/camera/equivalent-focal-length.js +15 -13
- package/dist/camera/equivalent-focal-length.js.map +1 -1
- package/dist/camera/field-of-view.d.ts +30 -19
- package/dist/camera/field-of-view.js +67 -18
- package/dist/camera/field-of-view.js.map +1 -1
- package/dist/camera/lens-projection.d.ts +170 -0
- package/dist/camera/lens-projection.js +444 -0
- package/dist/camera/lens-projection.js.map +1 -0
- package/dist/camera/projected-object-size.d.ts +10 -11
- package/dist/camera/projected-object-size.js +12 -10
- package/dist/camera/projected-object-size.js.map +1 -1
- package/dist/capture/capture-export-metadata.d.ts +9 -10
- package/dist/capture/capture-export-metadata.js +8 -5
- package/dist/capture/capture-export-metadata.js.map +1 -1
- package/dist/capture/dng-import.d.ts +91 -0
- package/dist/capture/dng-import.js +343 -0
- package/dist/capture/dng-import.js.map +1 -0
- package/dist/capture/environment-raw-producer.d.ts +37 -17
- package/dist/capture/environment-raw-producer.js +43 -19
- package/dist/capture/environment-raw-producer.js.map +1 -1
- package/dist/capture/export-jpeg.d.ts +35 -4
- package/dist/capture/export-jpeg.js +133 -47
- package/dist/capture/export-jpeg.js.map +1 -1
- package/dist/capture/export-tiff.d.ts +48 -24
- package/dist/capture/export-tiff.js +91 -31
- package/dist/capture/export-tiff.js.map +1 -1
- package/dist/capture/focus-control.d.ts +42 -65
- package/dist/capture/focus-control.js +56 -75
- package/dist/capture/focus-control.js.map +1 -1
- package/dist/capture/host-yield-cadence.d.ts +25 -0
- package/dist/capture/host-yield-cadence.js +25 -0
- package/dist/capture/host-yield-cadence.js.map +1 -0
- package/dist/capture/linear-encoding.d.ts +14 -12
- package/dist/capture/linear-encoding.js +14 -13
- package/dist/capture/linear-encoding.js.map +1 -1
- package/dist/capture/lossless-jpeg.d.ts +27 -0
- package/dist/capture/lossless-jpeg.js +237 -0
- package/dist/capture/lossless-jpeg.js.map +1 -0
- package/dist/capture/native-environment-lean.d.ts +227 -0
- package/dist/capture/native-environment-lean.js +974 -0
- package/dist/capture/native-environment-lean.js.map +1 -0
- package/dist/capture/native-environment-optical-stage.d.ts +97 -0
- package/dist/capture/native-environment-optical-stage.js +340 -0
- package/dist/capture/native-environment-optical-stage.js.map +1 -0
- package/dist/capture/native-environment-raw.d.ts +140 -6
- package/dist/capture/native-environment-raw.js +435 -34
- package/dist/capture/native-environment-raw.js.map +1 -1
- package/dist/capture/native-raw-development.d.ts +116 -9
- package/dist/capture/native-raw-development.js +221 -62
- package/dist/capture/native-raw-development.js.map +1 -1
- package/dist/capture/native-raw-dng.d.ts +60 -0
- package/dist/capture/native-raw-dng.js +167 -0
- package/dist/capture/native-raw-dng.js.map +1 -0
- package/dist/capture/native-raw.d.ts +65 -12
- package/dist/capture/native-raw.js +81 -19
- package/dist/capture/native-raw.js.map +1 -1
- package/dist/capture/packed-sensor-raw.d.ts +160 -0
- package/dist/capture/packed-sensor-raw.js +221 -0
- package/dist/capture/packed-sensor-raw.js.map +1 -0
- package/dist/capture/photographic-export.d.ts +58 -35
- package/dist/capture/photographic-export.js +177 -70
- package/dist/capture/photographic-export.js.map +1 -1
- package/dist/capture/raw-development-kernel.d.ts +52 -0
- package/dist/capture/raw-development-kernel.js +88 -0
- package/dist/capture/raw-development-kernel.js.map +1 -0
- package/dist/capture/raw-frame-limits.d.ts +7 -7
- package/dist/capture/raw-frame-limits.js +7 -6
- package/dist/capture/raw-frame-limits.js.map +1 -1
- package/dist/capture/raw-frame-reconstruction.d.ts +8 -9
- package/dist/capture/raw-frame-reconstruction.js +9 -8
- package/dist/capture/raw-frame-reconstruction.js.map +1 -1
- package/dist/capture/raw-white-level.d.ts +55 -0
- package/dist/capture/raw-white-level.js +165 -0
- package/dist/capture/raw-white-level.js.map +1 -0
- package/dist/capture/release-sequence.d.ts +5 -7
- package/dist/capture/release-sequence.js +15 -13
- package/dist/capture/release-sequence.js.map +1 -1
- package/dist/capture/sensor-raw-frame.d.ts +5 -6
- package/dist/capture/sensor-raw-frame.js +26 -9
- package/dist/capture/sensor-raw-frame.js.map +1 -1
- package/dist/capture/sensor-raw-producer.d.ts +21 -13
- package/dist/capture/sensor-raw-producer.js +86 -25
- package/dist/capture/sensor-raw-producer.js.map +1 -1
- package/dist/capture/simulated-capture.d.ts +15 -16
- package/dist/capture/simulated-capture.js +22 -12
- package/dist/capture/simulated-capture.js.map +1 -1
- package/dist/color/camera-color-matrix.d.ts +69 -0
- package/dist/color/camera-color-matrix.js +132 -0
- package/dist/color/camera-color-matrix.js.map +1 -0
- package/dist/color/capture-color.d.ts +17 -10
- package/dist/color/capture-color.js +50 -17
- package/dist/color/capture-color.js.map +1 -1
- package/dist/color/chromatic-adaptation.d.ts +63 -0
- package/dist/color/chromatic-adaptation.js +91 -0
- package/dist/color/chromatic-adaptation.js.map +1 -0
- package/dist/color/color-difference.d.ts +104 -0
- package/dist/color/color-difference.js +205 -0
- package/dist/color/color-difference.js.map +1 -0
- package/dist/color/color-matching-functions.d.ts +168 -0
- package/dist/color/color-matching-functions.js +309 -0
- package/dist/color/color-matching-functions.js.map +1 -0
- package/dist/color/colorimetry-math.d.ts +52 -0
- package/dist/color/colorimetry-math.js +144 -0
- package/dist/color/colorimetry-math.js.map +1 -0
- package/dist/color/gamut-mapping.d.ts +54 -0
- package/dist/color/gamut-mapping.js +107 -0
- package/dist/color/gamut-mapping.js.map +1 -0
- package/dist/color/illuminants.d.ts +182 -0
- package/dist/color/illuminants.js +434 -0
- package/dist/color/illuminants.js.map +1 -0
- package/dist/color/rgb-color-spaces.d.ts +79 -0
- package/dist/color/rgb-color-spaces.js +115 -0
- package/dist/color/rgb-color-spaces.js.map +1 -0
- package/dist/color/sensor-color-development.d.ts +33 -11
- package/dist/color/sensor-color-development.js +104 -30
- package/dist/color/sensor-color-development.js.map +1 -1
- package/dist/color/srgb-icc.d.ts +9 -2
- package/dist/color/srgb-icc.js +16 -5
- package/dist/color/srgb-icc.js.map +1 -1
- package/dist/color/srgb-transfer.d.ts +1 -2
- package/dist/color/srgb-transfer.js +1 -1
- package/dist/color/srgb-transfer.js.map +1 -1
- package/dist/color/white-balance.d.ts +68 -19
- package/dist/color/white-balance.js +168 -35
- package/dist/color/white-balance.js.map +1 -1
- package/dist/composition/image-formation-plan.d.ts +152 -128
- package/dist/composition/image-formation-plan.js +292 -138
- package/dist/composition/image-formation-plan.js.map +1 -1
- package/dist/composition/plan-consumer.d.ts +6 -7
- package/dist/composition/plan-consumer.js +14 -11
- package/dist/composition/plan-consumer.js.map +1 -1
- package/dist/core/calculation-result.d.ts +21 -14
- package/dist/core/calculation-result.js +209 -11
- package/dist/core/calculation-result.js.map +1 -1
- package/dist/core/canonical-json.d.ts +13 -8
- package/dist/core/canonical-json.js +34 -15
- package/dist/core/canonical-json.js.map +1 -1
- package/dist/core/configuration-error.d.ts +5 -4
- package/dist/core/configuration-error.js +5 -3
- package/dist/core/configuration-error.js.map +1 -1
- package/dist/core/evidence-provenance.d.ts +12 -12
- package/dist/core/evidence-provenance.js +10 -9
- package/dist/core/evidence-provenance.js.map +1 -1
- package/dist/core/image-formation.d.ts +11 -10
- package/dist/core/image-formation.js +11 -9
- package/dist/core/image-formation.js.map +1 -1
- package/dist/core/owned-data.d.ts +9 -17
- package/dist/core/owned-data.js +9 -16
- package/dist/core/owned-data.js.map +1 -1
- package/dist/core/portable-math.d.ts +15 -0
- package/dist/core/portable-math.js +56 -0
- package/dist/core/portable-math.js.map +1 -0
- package/dist/core/record-validation.d.ts +48 -9
- package/dist/core/record-validation.js +93 -19
- package/dist/core/record-validation.js.map +1 -1
- package/dist/core/scientific-assurance.d.ts +16 -14
- package/dist/core/scientific-assurance.js +22 -18
- package/dist/core/scientific-assurance.js.map +1 -1
- package/dist/core/spectral-composition.d.ts +13 -14
- package/dist/core/spectral-composition.js +30 -27
- package/dist/core/spectral-composition.js.map +1 -1
- package/dist/core/spectral.d.ts +5 -6
- package/dist/core/spectral.js +9 -7
- package/dist/core/spectral.js.map +1 -1
- package/dist/core/validation.d.ts +3 -6
- package/dist/core/validation.js +3 -5
- package/dist/core/validation.js.map +1 -1
- package/dist/core/version.d.ts +6 -6
- package/dist/core/version.js +6 -5
- package/dist/core/version.js.map +1 -1
- package/dist/equipment/exposure-capabilities.d.ts +10 -10
- package/dist/equipment/exposure-capabilities.js +40 -30
- package/dist/equipment/exposure-capabilities.js.map +1 -1
- package/dist/equipment/generic-tier-assets.d.ts +13 -6
- package/dist/equipment/generic-tier-assets.js +34 -15
- package/dist/equipment/generic-tier-assets.js.map +1 -1
- package/dist/equipment/generic-tier-presets.d.ts +5 -6
- package/dist/equipment/generic-tier-presets.js +15 -13
- package/dist/equipment/generic-tier-presets.js.map +1 -1
- package/dist/equipment/iso-capabilities.d.ts +21 -22
- package/dist/equipment/iso-capabilities.js +49 -44
- package/dist/equipment/iso-capabilities.js.map +1 -1
- package/dist/equipment/metering-capabilities.d.ts +5 -6
- package/dist/equipment/metering-capabilities.js +22 -19
- package/dist/equipment/metering-capabilities.js.map +1 -1
- package/dist/equipment/release-capabilities.d.ts +3 -4
- package/dist/equipment/release-capabilities.js +18 -14
- package/dist/equipment/release-capabilities.js.map +1 -1
- package/dist/exposure/exposure-duration-control.d.ts +19 -17
- package/dist/exposure/exposure-duration-control.js +27 -23
- package/dist/exposure/exposure-duration-control.js.map +1 -1
- package/dist/exposure/exposure-mode-resolver.d.ts +42 -39
- package/dist/exposure/exposure-mode-resolver.js +127 -82
- package/dist/exposure/exposure-mode-resolver.js.map +1 -1
- package/dist/exposure/exposure.d.ts +17 -16
- package/dist/exposure/exposure.js +22 -15
- package/dist/exposure/exposure.js.map +1 -1
- package/dist/exposure/flash-ttl.d.ts +135 -0
- package/dist/exposure/flash-ttl.js +193 -0
- package/dist/exposure/flash-ttl.js.map +1 -0
- package/dist/exposure/flash.d.ts +144 -36
- package/dist/exposure/flash.js +259 -59
- package/dist/exposure/flash.js.map +1 -1
- package/dist/exposure/metering-scene-radiance.d.ts +10 -10
- package/dist/exposure/metering-scene-radiance.js +42 -23
- package/dist/exposure/metering-scene-radiance.js.map +1 -1
- package/dist/exposure/metering-target.d.ts +8 -8
- package/dist/exposure/metering-target.js +30 -20
- package/dist/exposure/metering-target.js.map +1 -1
- package/dist/exposure/metering-temporal.d.ts +16 -15
- package/dist/exposure/metering-temporal.js +41 -19
- package/dist/exposure/metering-temporal.js.map +1 -1
- package/dist/exposure/metering.d.ts +64 -17
- package/dist/exposure/metering.js +159 -30
- package/dist/exposure/metering.js.map +1 -1
- package/dist/exposure/program-line.d.ts +5 -5
- package/dist/exposure/program-line.js +20 -13
- package/dist/exposure/program-line.js.map +1 -1
- package/dist/facade/camera-preset.d.ts +8 -0
- package/dist/facade/camera-preset.js +102 -0
- package/dist/facade/camera-preset.js.map +1 -0
- package/dist/facade/chart-radiance-batch.d.ts +57 -0
- package/dist/facade/chart-radiance-batch.js +121 -0
- package/dist/facade/chart-radiance-batch.js.map +1 -0
- package/dist/facade/chart-scenes.d.ts +177 -0
- package/dist/facade/chart-scenes.js +232 -0
- package/dist/facade/chart-scenes.js.map +1 -0
- package/dist/facade/diffraction-provider.d.ts +30 -0
- package/dist/facade/diffraction-provider.js +127 -0
- package/dist/facade/diffraction-provider.js.map +1 -0
- package/dist/facade/host-yield.d.ts +7 -0
- package/dist/facade/host-yield.js +19 -0
- package/dist/facade/host-yield.js.map +1 -0
- package/dist/facade/scene-radiance.d.ts +117 -0
- package/dist/facade/scene-radiance.js +205 -0
- package/dist/facade/scene-radiance.js.map +1 -0
- package/dist/facade/simulate-capture.d.ts +363 -0
- package/dist/facade/simulate-capture.js +1281 -0
- package/dist/facade/simulate-capture.js.map +1 -0
- package/dist/gpu/chart-radiance-gpu.d.ts +17 -0
- package/dist/gpu/chart-radiance-gpu.js +176 -0
- package/dist/gpu/chart-radiance-gpu.js.map +1 -0
- package/dist/gpu/image-kernel-accelerator.d.ts +132 -0
- package/dist/gpu/image-kernel-accelerator.js +720 -0
- package/dist/gpu/image-kernel-accelerator.js.map +1 -0
- package/dist/gpu/image-kernel-execution.d.ts +92 -0
- package/dist/gpu/image-kernel-execution.js +84 -0
- package/dist/gpu/image-kernel-execution.js.map +1 -0
- package/dist/gpu/sensor-stage-gpu.d.ts +44 -0
- package/dist/gpu/sensor-stage-gpu.js +317 -0
- package/dist/gpu/sensor-stage-gpu.js.map +1 -0
- package/dist/gpu/temporal-sum-gpu.d.ts +23 -0
- package/dist/gpu/temporal-sum-gpu.js +150 -0
- package/dist/gpu/temporal-sum-gpu.js.map +1 -0
- package/dist/gpu/webgpu-runtime.d.ts +63 -0
- package/dist/gpu/webgpu-runtime.js +215 -0
- package/dist/gpu/webgpu-runtime.js.map +1 -0
- package/dist/gpu/wgsl-chart-kernel.d.ts +30 -0
- package/dist/gpu/wgsl-chart-kernel.js +165 -0
- package/dist/gpu/wgsl-chart-kernel.js.map +1 -0
- package/dist/gpu/wgsl-kernels.d.ts +53 -0
- package/dist/gpu/wgsl-kernels.js +365 -0
- package/dist/gpu/wgsl-kernels.js.map +1 -0
- package/dist/gpu/wgsl-sensor-kernel.d.ts +64 -0
- package/dist/gpu/wgsl-sensor-kernel.js +409 -0
- package/dist/gpu/wgsl-sensor-kernel.js.map +1 -0
- package/dist/index.d.ts +91 -25
- package/dist/index.js +60 -15
- package/dist/index.js.map +1 -1
- package/dist/motion/camera-rotation.d.ts +92 -40
- package/dist/motion/camera-rotation.js +84 -47
- package/dist/motion/camera-rotation.js.map +1 -1
- package/dist/motion/capture-rotation-inverse-mapping.d.ts +37 -34
- package/dist/motion/capture-rotation-inverse-mapping.js +32 -24
- package/dist/motion/capture-rotation-inverse-mapping.js.map +1 -1
- package/dist/motion/capture-rotation-temporal-quadrature.d.ts +39 -35
- package/dist/motion/capture-rotation-temporal-quadrature.js +37 -28
- package/dist/motion/capture-rotation-temporal-quadrature.js.map +1 -1
- package/dist/motion/capture-rotation-trajectory.d.ts +32 -28
- package/dist/motion/capture-rotation-trajectory.js +36 -26
- package/dist/motion/capture-rotation-trajectory.js.map +1 -1
- package/dist/motion/capture-translation-parallax-temporal-quadrature.d.ts +23 -21
- package/dist/motion/capture-translation-parallax-temporal-quadrature.js +33 -14
- package/dist/motion/capture-translation-parallax-temporal-quadrature.js.map +1 -1
- package/dist/motion/extended-object-projection.d.ts +19 -16
- package/dist/motion/extended-object-projection.js +38 -18
- package/dist/motion/extended-object-projection.js.map +1 -1
- package/dist/motion/projected-motion.d.ts +18 -17
- package/dist/motion/projected-motion.js +25 -17
- package/dist/motion/projected-motion.js.map +1 -1
- package/dist/motion/temporal-exposure-sum.d.ts +55 -0
- package/dist/motion/temporal-exposure-sum.js +141 -0
- package/dist/motion/temporal-exposure-sum.js.map +1 -0
- package/dist/motion/video-sequence.d.ts +111 -0
- package/dist/motion/video-sequence.js +179 -0
- package/dist/motion/video-sequence.js.map +1 -0
- package/dist/optics/aperture.d.ts +14 -15
- package/dist/optics/aperture.js +13 -11
- package/dist/optics/aperture.js.map +1 -1
- package/dist/optics/atmospheric-haze.d.ts +83 -0
- package/dist/optics/atmospheric-haze.js +113 -0
- package/dist/optics/atmospheric-haze.js.map +1 -0
- package/dist/optics/brown-conrady-distortion.d.ts +116 -0
- package/dist/optics/brown-conrady-distortion.js +291 -0
- package/dist/optics/brown-conrady-distortion.js.map +1 -0
- package/dist/optics/circle-of-confusion.d.ts +10 -10
- package/dist/optics/circle-of-confusion.js +15 -11
- package/dist/optics/circle-of-confusion.js.map +1 -1
- package/dist/optics/complex-pupil-psf.d.ts +64 -33
- package/dist/optics/complex-pupil-psf.js +190 -98
- package/dist/optics/complex-pupil-psf.js.map +1 -1
- package/dist/optics/depth-of-field.d.ts +25 -15
- package/dist/optics/depth-of-field.js +67 -27
- package/dist/optics/depth-of-field.js.map +1 -1
- package/dist/optics/diffraction-psf-profile.d.ts +118 -0
- package/dist/optics/diffraction-psf-profile.js +252 -0
- package/dist/optics/diffraction-psf-profile.js.map +1 -0
- package/dist/optics/diffraction.d.ts +14 -13
- package/dist/optics/diffraction.js +14 -10
- package/dist/optics/diffraction.js.map +1 -1
- package/dist/optics/focus-breathing.d.ts +88 -27
- package/dist/optics/focus-breathing.js +114 -23
- package/dist/optics/focus-breathing.js.map +1 -1
- package/dist/optics/focus-state.d.ts +18 -18
- package/dist/optics/focus-state.js +21 -15
- package/dist/optics/focus-state.js.map +1 -1
- package/dist/optics/front-of-lens-filter.d.ts +45 -14
- package/dist/optics/front-of-lens-filter.js +259 -88
- package/dist/optics/front-of-lens-filter.js.map +1 -1
- package/dist/optics/illumination-vignetting.d.ts +16 -17
- package/dist/optics/illumination-vignetting.js +40 -17
- package/dist/optics/illumination-vignetting.js.map +1 -1
- package/dist/optics/irradiance-convolution.d.ts +59 -0
- package/dist/optics/irradiance-convolution.js +138 -0
- package/dist/optics/irradiance-convolution.js.map +1 -0
- package/dist/optics/lateral-chromatic-aberration.d.ts +33 -30
- package/dist/optics/lateral-chromatic-aberration.js +33 -23
- package/dist/optics/lateral-chromatic-aberration.js.map +1 -1
- package/dist/optics/lens-psf-kernels.d.ts +89 -0
- package/dist/optics/lens-psf-kernels.js +175 -0
- package/dist/optics/lens-psf-kernels.js.map +1 -0
- package/dist/optics/lens-psf-profile.d.ts +78 -46
- package/dist/optics/lens-psf-profile.js +335 -124
- package/dist/optics/lens-psf-profile.js.map +1 -1
- package/dist/optics/longitudinal-chromatic-aberration.d.ts +102 -0
- package/dist/optics/longitudinal-chromatic-aberration.js +210 -0
- package/dist/optics/longitudinal-chromatic-aberration.js.map +1 -0
- package/dist/optics/polygon-diffraction.d.ts +80 -23
- package/dist/optics/polygon-diffraction.js +130 -25
- package/dist/optics/polygon-diffraction.js.map +1 -1
- package/dist/optics/profile-contract.d.ts +5 -6
- package/dist/optics/profile-contract.js +14 -11
- package/dist/optics/profile-contract.js.map +1 -1
- package/dist/optics/psf-foundation.d.ts +23 -23
- package/dist/optics/psf-foundation.js +24 -21
- package/dist/optics/psf-foundation.js.map +1 -1
- package/dist/optics/pupil-vignetting.d.ts +118 -0
- package/dist/optics/pupil-vignetting.js +264 -0
- package/dist/optics/pupil-vignetting.js.map +1 -0
- package/dist/optics/radial-distortion.d.ts +34 -33
- package/dist/optics/radial-distortion.js +37 -30
- package/dist/optics/radial-distortion.js.map +1 -1
- package/dist/optics/scene-to-sensor-irradiance.d.ts +47 -33
- package/dist/optics/scene-to-sensor-irradiance.js +73 -45
- package/dist/optics/scene-to-sensor-irradiance.js.map +1 -1
- package/dist/optics/scene-to-sensor-quadrature.d.ts +23 -18
- package/dist/optics/scene-to-sensor-quadrature.js +16 -11
- package/dist/optics/scene-to-sensor-quadrature.js.map +1 -1
- package/dist/optics/sensor-aperture-rays.d.ts +20 -4
- package/dist/optics/sensor-aperture-rays.js +32 -14
- package/dist/optics/sensor-aperture-rays.js.map +1 -1
- package/dist/optics/sensor-environment-query.d.ts +81 -16
- package/dist/optics/sensor-environment-query.js +145 -12
- package/dist/optics/sensor-environment-query.js.map +1 -1
- package/dist/optics/sensor-psf-quadrature.d.ts +12 -10
- package/dist/optics/sensor-psf-quadrature.js +18 -11
- package/dist/optics/sensor-psf-quadrature.js.map +1 -1
- package/dist/optics/sensor-psf-support.d.ts +8 -6
- package/dist/optics/sensor-psf-support.js +8 -5
- package/dist/optics/sensor-psf-support.js.map +1 -1
- package/dist/optics/stray-light.d.ts +22 -19
- package/dist/optics/stray-light.js +18 -12
- package/dist/optics/stray-light.js.map +1 -1
- package/dist/optics/thin-lens.d.ts +10 -9
- package/dist/optics/thin-lens.js +12 -8
- package/dist/optics/thin-lens.js.map +1 -1
- package/dist/optics/zernike-wavefront.d.ts +154 -0
- package/dist/optics/zernike-wavefront.js +352 -0
- package/dist/optics/zernike-wavefront.js.map +1 -0
- package/dist/output/capture-corrected-sdr.d.ts +16 -8
- package/dist/output/capture-corrected-sdr.js +16 -8
- package/dist/output/capture-corrected-sdr.js.map +1 -1
- package/dist/output/capture-geometry.d.ts +34 -36
- package/dist/output/capture-geometry.js +52 -32
- package/dist/output/capture-geometry.js.map +1 -1
- package/dist/output/capture-sdr.d.ts +7 -6
- package/dist/output/capture-sdr.js +11 -8
- package/dist/output/capture-sdr.js.map +1 -1
- package/dist/output/crop.d.ts +22 -6
- package/dist/output/crop.js +40 -6
- package/dist/output/crop.js.map +1 -1
- package/dist/output/geometric-transforms.d.ts +60 -23
- package/dist/output/geometric-transforms.js +111 -24
- package/dist/output/geometric-transforms.js.map +1 -1
- package/dist/output/lens-corrections.d.ts +27 -19
- package/dist/output/lens-corrections.js +29 -13
- package/dist/output/lens-corrections.js.map +1 -1
- package/dist/output/native-capture-sdr.d.ts +71 -16
- package/dist/output/native-capture-sdr.js +190 -33
- package/dist/output/native-capture-sdr.js.map +1 -1
- package/dist/output/png-encoder.d.ts +65 -0
- package/dist/output/png-encoder.js +461 -0
- package/dist/output/png-encoder.js.map +1 -0
- package/dist/output/print-contrast-reference.d.ts +10 -9
- package/dist/output/print-contrast-reference.js +10 -8
- package/dist/output/print-contrast-reference.js.map +1 -1
- package/dist/output/print-detail.d.ts +18 -17
- package/dist/output/print-detail.js +12 -10
- package/dist/output/print-detail.js.map +1 -1
- package/dist/output/print-jpeg.d.ts +26 -5
- package/dist/output/print-jpeg.js +117 -50
- package/dist/output/print-jpeg.js.map +1 -1
- package/dist/output/print-plan.d.ts +19 -19
- package/dist/output/print-plan.js +11 -10
- package/dist/output/print-plan.js.map +1 -1
- package/dist/output/print-region-statistics.d.ts +14 -15
- package/dist/output/print-region-statistics.js +11 -11
- package/dist/output/print-region-statistics.js.map +1 -1
- package/dist/output/sdr-rendering.d.ts +48 -10
- package/dist/output/sdr-rendering.js +114 -25
- package/dist/output/sdr-rendering.js.map +1 -1
- package/dist/output/subject-framing-crop.d.ts +6 -10
- package/dist/output/subject-framing-crop.js +23 -13
- package/dist/output/subject-framing-crop.js.map +1 -1
- package/dist/processing/demosaic.d.ts +90 -0
- package/dist/processing/demosaic.js +275 -0
- package/dist/processing/demosaic.js.map +1 -0
- package/dist/processing/denoise.d.ts +68 -0
- package/dist/processing/denoise.js +214 -0
- package/dist/processing/denoise.js.map +1 -0
- package/dist/processing/focus-stacking.d.ts +17 -0
- package/dist/processing/focus-stacking.js +80 -0
- package/dist/processing/focus-stacking.js.map +1 -0
- package/dist/processing/hdr.d.ts +54 -0
- package/dist/processing/hdr.js +172 -0
- package/dist/processing/hdr.js.map +1 -0
- package/dist/processing/image-ops.d.ts +66 -0
- package/dist/processing/image-ops.js +192 -0
- package/dist/processing/image-ops.js.map +1 -0
- package/dist/processing/panorama.d.ts +51 -0
- package/dist/processing/panorama.js +305 -0
- package/dist/processing/panorama.js.map +1 -0
- package/dist/processing/processing-task.d.ts +85 -0
- package/dist/processing/processing-task.js +164 -0
- package/dist/processing/processing-task.js.map +1 -0
- package/dist/processing/tone-mapping.d.ts +69 -0
- package/dist/processing/tone-mapping.js +310 -0
- package/dist/processing/tone-mapping.js.map +1 -0
- package/dist/schema/camera.d.ts +5 -4
- package/dist/schema/illumination-spectral.d.ts +13 -19
- package/dist/schema/illumination-spectral.js +23 -19
- package/dist/schema/illumination-spectral.js.map +1 -1
- package/dist/schema/illumination-temporal.d.ts +12 -15
- package/dist/schema/illumination-temporal.js +43 -28
- package/dist/schema/illumination-temporal.js.map +1 -1
- package/dist/schema/illumination.d.ts +5 -4
- package/dist/schema/illumination.js +55 -20
- package/dist/schema/illumination.js.map +1 -1
- package/dist/schema/scene-radiance-temporal.d.ts +9 -11
- package/dist/schema/scene-radiance-temporal.js +26 -23
- package/dist/schema/scene-radiance-temporal.js.map +1 -1
- package/dist/schema/scene-radiance.d.ts +17 -17
- package/dist/schema/scene-radiance.js +56 -34
- package/dist/schema/scene-radiance.js.map +1 -1
- package/dist/schema/scene.d.ts +14 -13
- package/dist/schema/validation.d.ts +0 -1
- package/dist/schema/validation.js +17 -15
- package/dist/schema/validation.js.map +1 -1
- package/dist/sensor/accumulated-charge.d.ts +45 -64
- package/dist/sensor/accumulated-charge.js +41 -47
- package/dist/sensor/accumulated-charge.js.map +1 -1
- package/dist/sensor/architecture.d.ts +22 -25
- package/dist/sensor/architecture.js +17 -16
- package/dist/sensor/architecture.js.map +1 -1
- package/dist/sensor/camera-saturation-capacity.d.ts +21 -28
- package/dist/sensor/camera-saturation-capacity.js +36 -34
- package/dist/sensor/camera-saturation-capacity.js.map +1 -1
- package/dist/sensor/capture-color-sampling-binding.d.ts +46 -51
- package/dist/sensor/capture-color-sampling-binding.js +39 -41
- package/dist/sensor/capture-color-sampling-binding.js.map +1 -1
- package/dist/sensor/capture-mode-timing.d.ts +8 -9
- package/dist/sensor/capture-mode-timing.js +24 -21
- package/dist/sensor/capture-mode-timing.js.map +1 -1
- package/dist/sensor/capture-mode.d.ts +28 -30
- package/dist/sensor/capture-mode.js +33 -31
- package/dist/sensor/capture-mode.js.map +1 -1
- package/dist/sensor/color-sampling.d.ts +30 -33
- package/dist/sensor/color-sampling.js +32 -37
- package/dist/sensor/color-sampling.js.map +1 -1
- package/dist/sensor/constant-rate-temporal-integration.d.ts +19 -23
- package/dist/sensor/constant-rate-temporal-integration.js +28 -26
- package/dist/sensor/constant-rate-temporal-integration.js.map +1 -1
- package/dist/sensor/dark-current.d.ts +53 -49
- package/dist/sensor/dark-current.js +87 -46
- package/dist/sensor/dark-current.js.map +1 -1
- package/dist/sensor/environment-photo-signal.d.ts +71 -30
- package/dist/sensor/environment-photo-signal.js +127 -46
- package/dist/sensor/environment-photo-signal.js.map +1 -1
- package/dist/sensor/eqe-electron-rate.d.ts +14 -13
- package/dist/sensor/eqe-electron-rate.js +34 -14
- package/dist/sensor/eqe-electron-rate.js.map +1 -1
- package/dist/sensor/eqe-local-exposure.d.ts +24 -24
- package/dist/sensor/eqe-local-exposure.js +15 -11
- package/dist/sensor/eqe-local-exposure.js.map +1 -1
- package/dist/sensor/eqe-temporal-exposure.d.ts +11 -11
- package/dist/sensor/eqe-temporal-exposure.js +15 -10
- package/dist/sensor/eqe-temporal-exposure.js.map +1 -1
- package/dist/sensor/exposure-window.d.ts +48 -34
- package/dist/sensor/exposure-window.js +77 -36
- package/dist/sensor/exposure-window.js.map +1 -1
- package/dist/sensor/fixed-pattern-noise.d.ts +108 -0
- package/dist/sensor/fixed-pattern-noise.js +166 -0
- package/dist/sensor/fixed-pattern-noise.js.map +1 -0
- package/dist/sensor/iso-gain.d.ts +44 -0
- package/dist/sensor/iso-gain.js +119 -0
- package/dist/sensor/iso-gain.js.map +1 -0
- package/dist/sensor/iso-signal-chain.d.ts +25 -48
- package/dist/sensor/iso-signal-chain.js +52 -66
- package/dist/sensor/iso-signal-chain.js.map +1 -1
- package/dist/sensor/local-exposure-binding.d.ts +21 -21
- package/dist/sensor/local-exposure-binding.js +22 -18
- package/dist/sensor/local-exposure-binding.js.map +1 -1
- package/dist/sensor/optical-stack.d.ts +36 -40
- package/dist/sensor/optical-stack.js +34 -37
- package/dist/sensor/optical-stack.js.map +1 -1
- package/dist/sensor/photon-energy.d.ts +22 -28
- package/dist/sensor/photon-energy.js +42 -34
- package/dist/sensor/photon-energy.js.map +1 -1
- package/dist/sensor/physical-charge-capacity.d.ts +20 -30
- package/dist/sensor/physical-charge-capacity.js +35 -36
- package/dist/sensor/physical-charge-capacity.js.map +1 -1
- package/dist/sensor/pixel-pitch.d.ts +2 -3
- package/dist/sensor/pixel-pitch.js +4 -2
- package/dist/sensor/pixel-pitch.js.map +1 -1
- package/dist/sensor/radiometry-readiness.d.ts +13 -15
- package/dist/sensor/radiometry-readiness.js +20 -17
- package/dist/sensor/radiometry-readiness.js.map +1 -1
- package/dist/sensor/raw-readout.d.ts +173 -83
- package/dist/sensor/raw-readout.js +425 -160
- package/dist/sensor/raw-readout.js.map +1 -1
- package/dist/sensor/raw-reconstruction.d.ts +112 -44
- package/dist/sensor/raw-reconstruction.js +200 -47
- package/dist/sensor/raw-reconstruction.js.map +1 -1
- package/dist/sensor/readout-exposure-linkage.d.ts +103 -34
- package/dist/sensor/readout-exposure-linkage.js +125 -27
- package/dist/sensor/readout-exposure-linkage.js.map +1 -1
- package/dist/sensor/readout-timing.d.ts +43 -44
- package/dist/sensor/readout-timing.js +38 -30
- package/dist/sensor/readout-timing.js.map +1 -1
- package/dist/sensor/response-application-compatibility.d.ts +21 -28
- package/dist/sensor/response-application-compatibility.js +35 -34
- package/dist/sensor/response-application-compatibility.js.map +1 -1
- package/dist/sensor/response-operating-range.d.ts +26 -35
- package/dist/sensor/response-operating-range.js +40 -39
- package/dist/sensor/response-operating-range.js.map +1 -1
- package/dist/sensor/responsivity-photocurrent.d.ts +21 -29
- package/dist/sensor/responsivity-photocurrent.js +57 -40
- package/dist/sensor/responsivity-photocurrent.js.map +1 -1
- package/dist/sensor/sampling-aperture.d.ts +21 -25
- package/dist/sensor/sampling-aperture.js +29 -28
- package/dist/sensor/sampling-aperture.js.map +1 -1
- package/dist/sensor/scene-eqe-temporal-exposure.d.ts +14 -12
- package/dist/sensor/scene-eqe-temporal-exposure.js +13 -8
- package/dist/sensor/scene-eqe-temporal-exposure.js.map +1 -1
- package/dist/sensor/sensor-geometry.d.ts +28 -32
- package/dist/sensor/sensor-geometry.js +35 -20
- package/dist/sensor/sensor-geometry.js.map +1 -1
- package/dist/sensor/signal-noise.d.ts +14 -16
- package/dist/sensor/signal-noise.js +15 -13
- package/dist/sensor/signal-noise.js.map +1 -1
- package/dist/sensor/spatial-sample-reduction.d.ts +45 -60
- package/dist/sensor/spatial-sample-reduction.js +39 -48
- package/dist/sensor/spatial-sample-reduction.js.map +1 -1
- package/dist/sensor/spatial-sampling-quadrature.d.ts +46 -54
- package/dist/sensor/spatial-sampling-quadrature.js +31 -36
- package/dist/sensor/spatial-sampling-quadrature.js.map +1 -1
- package/dist/sensor/spatio-spectral-reduction.d.ts +32 -42
- package/dist/sensor/spatio-spectral-reduction.js +24 -29
- package/dist/sensor/spatio-spectral-reduction.js.map +1 -1
- package/dist/sensor/spectral-coverage.d.ts +6 -9
- package/dist/sensor/spectral-coverage.js +9 -6
- package/dist/sensor/spectral-coverage.js.map +1 -1
- package/dist/sensor/spectral-quadrature.d.ts +46 -60
- package/dist/sensor/spectral-quadrature.js +38 -48
- package/dist/sensor/spectral-quadrature.js.map +1 -1
- package/dist/sensor/spectral-response.d.ts +53 -41
- package/dist/sensor/spectral-response.js +80 -47
- package/dist/sensor/spectral-response.js.map +1 -1
- package/dist/sensor/stochastic-seed.d.ts +50 -0
- package/dist/sensor/stochastic-seed.js +123 -0
- package/dist/sensor/stochastic-seed.js.map +1 -0
- package/dist/sensor/temporal-eqe-sum.d.ts +2 -4
- package/dist/sensor/temporal-eqe-sum.js +5 -6
- package/dist/sensor/temporal-eqe-sum.js.map +1 -1
- package/dist/sensor/temporal-photo-signal.d.ts +5 -6
- package/dist/sensor/temporal-photo-signal.js +11 -10
- package/dist/sensor/temporal-photo-signal.js.map +1 -1
- package/dist/sensor/temporal-sample-binding.d.ts +1 -2
- package/dist/sensor/temporal-sample-binding.js +3 -3
- package/dist/sensor/temporal-sample-binding.js.map +1 -1
- package/dist/simulation/poc-simulation.d.ts +16 -16
- package/dist/simulation/poc-simulation.js +20 -15
- package/dist/simulation/poc-simulation.js.map +1 -1
- package/dist/stabilization/camera-shake.d.ts +42 -18
- package/dist/stabilization/camera-shake.js +43 -20
- package/dist/stabilization/camera-shake.js.map +1 -1
- package/dist/stabilization/system.d.ts +44 -41
- package/dist/stabilization/system.js +196 -108
- package/dist/stabilization/system.js.map +1 -1
- package/docs/AGENT_GUIDE.md +183 -0
- package/docs/API_REFERENCE.md +777 -2
- package/docs/QUICK_START.md +663 -0
- package/docs/USAGE.md +1719 -714
- package/docs/api/camera-equivalent-focal-length.md +6 -7
- package/docs/api/camera-field-of-view.md +16 -8
- package/docs/api/camera-lens-projection.md +246 -0
- package/docs/api/camera-projected-object-size.md +6 -5
- package/docs/api/capture-capture-export-metadata.md +10 -10
- package/docs/api/capture-dng-import.md +134 -0
- package/docs/api/capture-environment-raw-producer.md +17 -11
- package/docs/api/capture-export-jpeg.md +16 -0
- package/docs/api/capture-focus-control.md +25 -47
- package/docs/api/capture-linear-encoding.md +21 -12
- package/docs/api/capture-lossless-jpeg.md +49 -0
- package/docs/api/capture-native-environment-optical-stage.md +75 -0
- package/docs/api/capture-native-environment-raw.md +161 -4
- package/docs/api/capture-native-raw-development.md +69 -8
- package/docs/api/capture-native-raw-dng.md +84 -0
- package/docs/api/capture-native-raw.md +21 -10
- package/docs/api/capture-packed-sensor-raw.md +156 -0
- package/docs/api/capture-photographic-export.md +69 -31
- package/docs/api/capture-raw-frame-reconstruction.md +8 -8
- package/docs/api/capture-raw-white-level.md +37 -0
- package/docs/api/capture-release-sequence.md +6 -7
- package/docs/api/capture-sensor-raw-frame.md +6 -6
- package/docs/api/capture-sensor-raw-producer.md +17 -11
- package/docs/api/capture-simulated-capture.md +15 -15
- package/docs/api/color-camera-color-matrix.md +103 -0
- package/docs/api/color-capture-color.md +22 -11
- package/docs/api/color-chromatic-adaptation.md +82 -0
- package/docs/api/color-color-difference.md +134 -0
- package/docs/api/color-color-matching-functions.md +259 -0
- package/docs/api/color-colorimetry-math.md +54 -0
- package/docs/api/color-gamut-mapping.md +72 -0
- package/docs/api/color-illuminants.md +280 -0
- package/docs/api/color-rgb-color-spaces.md +151 -0
- package/docs/api/color-sensor-color-development.md +27 -0
- package/docs/api/color-srgb-icc.md +2 -4
- package/docs/api/color-white-balance.md +95 -19
- package/docs/api/composition-image-formation-plan.md +124 -95
- package/docs/api/composition-plan-consumer.md +7 -7
- package/docs/api/core-calculation-result.md +18 -14
- package/docs/api/core-configuration-error.md +1 -1
- package/docs/api/core-image-formation.md +7 -7
- package/docs/api/core-scientific-assurance.md +12 -10
- package/docs/api/core-spectral-composition.md +14 -14
- package/docs/api/core-spectral.md +6 -6
- package/docs/api/core-validation.md +3 -3
- package/docs/api/core-version.md +7 -6
- package/docs/api/equipment-exposure-capabilities.md +11 -10
- package/docs/api/equipment-generic-tier-assets.md +7 -2
- package/docs/api/equipment-generic-tier-presets.md +6 -6
- package/docs/api/equipment-iso-capabilities.md +18 -18
- package/docs/api/equipment-metering-capabilities.md +6 -6
- package/docs/api/equipment-release-capabilities.md +4 -4
- package/docs/api/exports.json +2253 -3
- package/docs/api/exposure-exposure-duration-control.md +9 -9
- package/docs/api/exposure-exposure-mode-resolver.md +35 -31
- package/docs/api/exposure-exposure.md +10 -10
- package/docs/api/exposure-flash-ttl.md +182 -0
- package/docs/api/exposure-flash.md +183 -28
- package/docs/api/exposure-metering-scene-radiance.md +11 -10
- package/docs/api/exposure-metering-target.md +9 -8
- package/docs/api/exposure-metering-temporal.md +8 -8
- package/docs/api/exposure-metering.md +69 -9
- package/docs/api/exposure-program-line.md +6 -5
- package/docs/api/facade-chart-radiance-batch.md +96 -0
- package/docs/api/facade-chart-scenes.md +240 -0
- package/docs/api/facade-scene-radiance.md +122 -0
- package/docs/api/facade-simulate-capture.md +397 -0
- package/docs/api/gpu-image-kernel-accelerator.md +157 -0
- package/docs/api/gpu-image-kernel-execution.md +152 -0
- package/docs/api/motion-camera-rotation.md +43 -26
- package/docs/api/motion-capture-rotation-inverse-mapping.md +24 -23
- package/docs/api/motion-capture-rotation-temporal-quadrature.md +22 -22
- package/docs/api/motion-capture-rotation-trajectory.md +15 -15
- package/docs/api/motion-capture-translation-parallax-temporal-quadrature.md +15 -14
- package/docs/api/motion-extended-object-projection.md +10 -8
- package/docs/api/motion-projected-motion.md +8 -8
- package/docs/api/motion-temporal-exposure-sum.md +98 -0
- package/docs/api/motion-video-sequence.md +159 -0
- package/docs/api/optics-aperture.md +8 -8
- package/docs/api/optics-atmospheric-haze.md +104 -0
- package/docs/api/optics-brown-conrady-distortion.md +123 -0
- package/docs/api/optics-circle-of-confusion.md +5 -4
- package/docs/api/optics-complex-pupil-psf.md +57 -16
- package/docs/api/optics-depth-of-field.md +12 -6
- package/docs/api/optics-diffraction-psf-profile.md +96 -0
- package/docs/api/optics-diffraction.md +8 -7
- package/docs/api/optics-focus-breathing.md +104 -16
- package/docs/api/optics-focus-state.md +9 -10
- package/docs/api/optics-front-of-lens-filter.md +72 -14
- package/docs/api/optics-illumination-vignetting.md +10 -10
- package/docs/api/optics-irradiance-convolution.md +95 -0
- package/docs/api/optics-lateral-chromatic-aberration.md +22 -21
- package/docs/api/optics-lens-psf-kernels.md +72 -0
- package/docs/api/optics-lens-psf-profile.md +48 -26
- package/docs/api/optics-longitudinal-chromatic-aberration.md +128 -0
- package/docs/api/optics-polygon-diffraction.md +78 -13
- package/docs/api/optics-profile-contract.md +4 -4
- package/docs/api/optics-psf-foundation.md +12 -12
- package/docs/api/optics-pupil-vignetting.md +132 -0
- package/docs/api/optics-radial-distortion.md +12 -12
- package/docs/api/optics-scene-to-sensor-irradiance.md +25 -14
- package/docs/api/optics-scene-to-sensor-quadrature.md +15 -12
- package/docs/api/optics-sensor-aperture-rays.md +3 -2
- package/docs/api/optics-sensor-environment-query.md +52 -9
- package/docs/api/optics-sensor-psf-quadrature.md +13 -10
- package/docs/api/optics-stray-light.md +12 -11
- package/docs/api/optics-thin-lens.md +4 -3
- package/docs/api/optics-zernike-wavefront.md +229 -0
- package/docs/api/output-capture-corrected-sdr.md +10 -7
- package/docs/api/output-capture-geometry.md +35 -36
- package/docs/api/output-capture-sdr.md +4 -4
- package/docs/api/output-crop.md +7 -4
- package/docs/api/output-geometric-transforms.md +65 -19
- package/docs/api/output-lens-corrections.md +17 -15
- package/docs/api/output-native-capture-sdr.md +26 -13
- package/docs/api/output-png-encoder.md +105 -0
- package/docs/api/output-print-contrast-reference.md +8 -8
- package/docs/api/output-print-detail.md +14 -14
- package/docs/api/output-print-jpeg.md +22 -5
- package/docs/api/output-print-plan.md +18 -18
- package/docs/api/output-print-region-statistics.md +14 -14
- package/docs/api/output-sdr-rendering.md +52 -10
- package/docs/api/output-subject-framing-crop.md +5 -6
- package/docs/api/processing-demosaic.md +120 -0
- package/docs/api/processing-denoise.md +148 -0
- package/docs/api/processing-focus-stacking.md +41 -0
- package/docs/api/processing-hdr.md +113 -0
- package/docs/api/processing-panorama.md +82 -0
- package/docs/api/processing-processing-task.md +107 -0
- package/docs/api/processing-tone-mapping.md +142 -0
- package/docs/api/schema-camera.md +6 -4
- package/docs/api/schema-illumination-spectral.md +10 -11
- package/docs/api/schema-illumination-temporal.md +13 -15
- package/docs/api/schema-illumination.md +4 -4
- package/docs/api/schema-scene-radiance-temporal.md +10 -11
- package/docs/api/schema-scene-radiance.md +18 -17
- package/docs/api/schema-scene.md +9 -9
- package/docs/api/schema-validation.md +1 -1
- package/docs/api/sensor-accumulated-charge.md +12 -20
- package/docs/api/sensor-architecture.md +15 -16
- package/docs/api/sensor-camera-saturation-capacity.md +9 -11
- package/docs/api/sensor-capture-color-sampling-binding.md +47 -51
- package/docs/api/sensor-capture-mode-timing.md +9 -9
- package/docs/api/sensor-capture-mode.md +29 -30
- package/docs/api/sensor-color-sampling.md +31 -33
- package/docs/api/sensor-constant-rate-temporal-integration.md +10 -11
- package/docs/api/sensor-dark-current.md +30 -14
- package/docs/api/sensor-environment-photo-signal.md +13 -6
- package/docs/api/sensor-eqe-electron-rate.md +9 -8
- package/docs/api/sensor-eqe-local-exposure.md +18 -17
- package/docs/api/sensor-eqe-temporal-exposure.md +12 -11
- package/docs/api/sensor-exposure-window.md +24 -24
- package/docs/api/sensor-fixed-pattern-noise.md +104 -0
- package/docs/api/sensor-iso-gain.md +63 -0
- package/docs/api/sensor-iso-signal-chain.md +13 -22
- package/docs/api/sensor-local-exposure-binding.md +12 -13
- package/docs/api/sensor-optical-stack.md +37 -40
- package/docs/api/sensor-photon-energy.md +10 -11
- package/docs/api/sensor-physical-charge-capacity.md +8 -13
- package/docs/api/sensor-pixel-pitch.md +1 -1
- package/docs/api/sensor-radiometry-readiness.md +9 -9
- package/docs/api/sensor-raw-readout.md +118 -52
- package/docs/api/sensor-raw-reconstruction.md +97 -20
- package/docs/api/sensor-readout-exposure-linkage.md +120 -24
- package/docs/api/sensor-readout-timing.md +33 -35
- package/docs/api/sensor-response-application-compatibility.md +9 -11
- package/docs/api/sensor-response-operating-range.md +14 -18
- package/docs/api/sensor-responsivity-photocurrent.md +9 -12
- package/docs/api/sensor-sampling-aperture.md +22 -25
- package/docs/api/sensor-scene-eqe-temporal-exposure.md +9 -8
- package/docs/api/sensor-sensor-geometry.md +23 -24
- package/docs/api/sensor-signal-noise.md +10 -10
- package/docs/api/sensor-spatial-sample-reduction.md +27 -30
- package/docs/api/sensor-spatial-sampling-quadrature.md +37 -39
- package/docs/api/sensor-spatio-spectral-reduction.md +27 -29
- package/docs/api/sensor-spectral-coverage.md +5 -5
- package/docs/api/sensor-spectral-quadrature.md +33 -35
- package/docs/api/sensor-spectral-response.md +28 -16
- package/docs/api/sensor-temporal-photo-signal.md +6 -6
- package/docs/api/simulation-poc-simulation.md +17 -16
- package/docs/api/stabilization-camera-shake.md +29 -10
- package/docs/api/stabilization-system.md +25 -21
- package/docs/examples/production-request.json +3821 -2157
- package/docs/examples/simulate-capture.mjs +14 -0
- package/llms.txt +35 -0
- package/package.json +32 -11
- package/AGENTS.md +0 -674
- package/CONTRIBUTING.md +0 -76
- package/DCO +0 -33
- package/dist/camera/equivalent-focal-length.d.ts.map +0 -1
- package/dist/camera/field-of-view.d.ts.map +0 -1
- package/dist/camera/projected-object-size.d.ts.map +0 -1
- package/dist/capture/capture-export-metadata.d.ts.map +0 -1
- package/dist/capture/environment-raw-producer.d.ts.map +0 -1
- package/dist/capture/export-jpeg.d.ts.map +0 -1
- package/dist/capture/export-tiff.d.ts.map +0 -1
- package/dist/capture/focus-control.d.ts.map +0 -1
- package/dist/capture/linear-encoding.d.ts.map +0 -1
- package/dist/capture/native-environment-raw.d.ts.map +0 -1
- package/dist/capture/native-raw-development.d.ts.map +0 -1
- package/dist/capture/native-raw.d.ts.map +0 -1
- package/dist/capture/photographic-export.d.ts.map +0 -1
- package/dist/capture/raw-frame-limits.d.ts.map +0 -1
- package/dist/capture/raw-frame-reconstruction.d.ts.map +0 -1
- package/dist/capture/release-sequence.d.ts.map +0 -1
- package/dist/capture/sensor-raw-frame.d.ts.map +0 -1
- package/dist/capture/sensor-raw-producer.d.ts.map +0 -1
- package/dist/capture/simulated-capture.d.ts.map +0 -1
- package/dist/color/capture-color.d.ts.map +0 -1
- package/dist/color/sensor-color-development.d.ts.map +0 -1
- package/dist/color/srgb-icc.d.ts.map +0 -1
- package/dist/color/srgb-transfer.d.ts.map +0 -1
- package/dist/color/white-balance.d.ts.map +0 -1
- package/dist/composition/image-formation-plan.d.ts.map +0 -1
- package/dist/composition/plan-consumer.d.ts.map +0 -1
- package/dist/core/calculation-result.d.ts.map +0 -1
- package/dist/core/canonical-json.d.ts.map +0 -1
- package/dist/core/configuration-error.d.ts.map +0 -1
- package/dist/core/evidence-provenance.d.ts.map +0 -1
- package/dist/core/image-formation.d.ts.map +0 -1
- package/dist/core/owned-data.d.ts.map +0 -1
- package/dist/core/record-validation.d.ts.map +0 -1
- package/dist/core/scientific-assurance.d.ts.map +0 -1
- package/dist/core/spectral-composition.d.ts.map +0 -1
- package/dist/core/spectral.d.ts.map +0 -1
- package/dist/core/validation.d.ts.map +0 -1
- package/dist/core/version.d.ts.map +0 -1
- package/dist/equipment/exposure-capabilities.d.ts.map +0 -1
- package/dist/equipment/generic-tier-assets.d.ts.map +0 -1
- package/dist/equipment/generic-tier-presets.d.ts.map +0 -1
- package/dist/equipment/iso-capabilities.d.ts.map +0 -1
- package/dist/equipment/metering-capabilities.d.ts.map +0 -1
- package/dist/equipment/release-capabilities.d.ts.map +0 -1
- package/dist/exposure/exposure-duration-control.d.ts.map +0 -1
- package/dist/exposure/exposure-mode-resolver.d.ts.map +0 -1
- package/dist/exposure/exposure.d.ts.map +0 -1
- package/dist/exposure/flash.d.ts.map +0 -1
- package/dist/exposure/metering-scene-radiance.d.ts.map +0 -1
- package/dist/exposure/metering-target.d.ts.map +0 -1
- package/dist/exposure/metering-temporal.d.ts.map +0 -1
- package/dist/exposure/metering.d.ts.map +0 -1
- package/dist/exposure/program-line.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/motion/camera-rotation.d.ts.map +0 -1
- package/dist/motion/capture-rotation-inverse-mapping.d.ts.map +0 -1
- package/dist/motion/capture-rotation-temporal-quadrature.d.ts.map +0 -1
- package/dist/motion/capture-rotation-trajectory.d.ts.map +0 -1
- package/dist/motion/capture-translation-parallax-temporal-quadrature.d.ts.map +0 -1
- package/dist/motion/extended-object-projection.d.ts.map +0 -1
- package/dist/motion/projected-motion.d.ts.map +0 -1
- package/dist/optics/aperture.d.ts.map +0 -1
- package/dist/optics/circle-of-confusion.d.ts.map +0 -1
- package/dist/optics/complex-pupil-psf.d.ts.map +0 -1
- package/dist/optics/depth-of-field.d.ts.map +0 -1
- package/dist/optics/diffraction.d.ts.map +0 -1
- package/dist/optics/focus-breathing.d.ts.map +0 -1
- package/dist/optics/focus-state.d.ts.map +0 -1
- package/dist/optics/front-of-lens-filter.d.ts.map +0 -1
- package/dist/optics/illumination-vignetting.d.ts.map +0 -1
- package/dist/optics/lateral-chromatic-aberration.d.ts.map +0 -1
- package/dist/optics/lens-psf-profile.d.ts.map +0 -1
- package/dist/optics/polygon-diffraction.d.ts.map +0 -1
- package/dist/optics/profile-contract.d.ts.map +0 -1
- package/dist/optics/psf-foundation.d.ts.map +0 -1
- package/dist/optics/radial-distortion.d.ts.map +0 -1
- package/dist/optics/scene-to-sensor-irradiance.d.ts.map +0 -1
- package/dist/optics/scene-to-sensor-quadrature.d.ts.map +0 -1
- package/dist/optics/sensor-aperture-rays.d.ts.map +0 -1
- package/dist/optics/sensor-environment-query.d.ts.map +0 -1
- package/dist/optics/sensor-psf-quadrature.d.ts.map +0 -1
- package/dist/optics/sensor-psf-support.d.ts.map +0 -1
- package/dist/optics/stray-light.d.ts.map +0 -1
- package/dist/optics/thin-lens.d.ts.map +0 -1
- package/dist/output/capture-corrected-sdr.d.ts.map +0 -1
- package/dist/output/capture-geometry.d.ts.map +0 -1
- package/dist/output/capture-sdr.d.ts.map +0 -1
- package/dist/output/crop.d.ts.map +0 -1
- package/dist/output/geometric-transforms.d.ts.map +0 -1
- package/dist/output/lens-corrections.d.ts.map +0 -1
- package/dist/output/native-capture-sdr.d.ts.map +0 -1
- package/dist/output/print-contrast-reference.d.ts.map +0 -1
- package/dist/output/print-detail.d.ts.map +0 -1
- package/dist/output/print-jpeg.d.ts.map +0 -1
- package/dist/output/print-plan.d.ts.map +0 -1
- package/dist/output/print-region-statistics.d.ts.map +0 -1
- package/dist/output/sdr-rendering.d.ts.map +0 -1
- package/dist/output/subject-framing-crop.d.ts.map +0 -1
- package/dist/schema/camera.d.ts.map +0 -1
- package/dist/schema/camera.js +0 -3
- package/dist/schema/camera.js.map +0 -1
- package/dist/schema/illumination-spectral.d.ts.map +0 -1
- package/dist/schema/illumination-temporal.d.ts.map +0 -1
- package/dist/schema/illumination.d.ts.map +0 -1
- package/dist/schema/scene-radiance-temporal.d.ts.map +0 -1
- package/dist/schema/scene-radiance.d.ts.map +0 -1
- package/dist/schema/scene.d.ts.map +0 -1
- package/dist/schema/scene.js +0 -3
- package/dist/schema/scene.js.map +0 -1
- package/dist/schema/validation.d.ts.map +0 -1
- package/dist/sensor/accumulated-charge.d.ts.map +0 -1
- package/dist/sensor/architecture.d.ts.map +0 -1
- package/dist/sensor/camera-saturation-capacity.d.ts.map +0 -1
- package/dist/sensor/capture-color-sampling-binding.d.ts.map +0 -1
- package/dist/sensor/capture-mode-timing.d.ts.map +0 -1
- package/dist/sensor/capture-mode.d.ts.map +0 -1
- package/dist/sensor/color-sampling.d.ts.map +0 -1
- package/dist/sensor/constant-rate-temporal-integration.d.ts.map +0 -1
- package/dist/sensor/dark-current.d.ts.map +0 -1
- package/dist/sensor/environment-photo-signal.d.ts.map +0 -1
- package/dist/sensor/eqe-electron-rate.d.ts.map +0 -1
- package/dist/sensor/eqe-local-exposure.d.ts.map +0 -1
- package/dist/sensor/eqe-temporal-exposure.d.ts.map +0 -1
- package/dist/sensor/exposure-window.d.ts.map +0 -1
- package/dist/sensor/iso-signal-chain.d.ts.map +0 -1
- package/dist/sensor/local-exposure-binding.d.ts.map +0 -1
- package/dist/sensor/optical-stack.d.ts.map +0 -1
- package/dist/sensor/photon-energy.d.ts.map +0 -1
- package/dist/sensor/physical-charge-capacity.d.ts.map +0 -1
- package/dist/sensor/pixel-pitch.d.ts.map +0 -1
- package/dist/sensor/radiometry-readiness.d.ts.map +0 -1
- package/dist/sensor/raw-readout.d.ts.map +0 -1
- package/dist/sensor/raw-reconstruction.d.ts.map +0 -1
- package/dist/sensor/readout-exposure-linkage.d.ts.map +0 -1
- package/dist/sensor/readout-timing.d.ts.map +0 -1
- package/dist/sensor/response-application-compatibility.d.ts.map +0 -1
- package/dist/sensor/response-operating-range.d.ts.map +0 -1
- package/dist/sensor/responsivity-photocurrent.d.ts.map +0 -1
- package/dist/sensor/sampling-aperture.d.ts.map +0 -1
- package/dist/sensor/scene-eqe-temporal-exposure.d.ts.map +0 -1
- package/dist/sensor/sensor-geometry.d.ts.map +0 -1
- package/dist/sensor/signal-noise.d.ts.map +0 -1
- package/dist/sensor/spatial-sample-reduction.d.ts.map +0 -1
- package/dist/sensor/spatial-sampling-quadrature.d.ts.map +0 -1
- package/dist/sensor/spatio-spectral-reduction.d.ts.map +0 -1
- package/dist/sensor/spectral-coverage.d.ts.map +0 -1
- package/dist/sensor/spectral-quadrature.d.ts.map +0 -1
- package/dist/sensor/spectral-response.d.ts.map +0 -1
- package/dist/sensor/temporal-eqe-sum.d.ts.map +0 -1
- package/dist/sensor/temporal-photo-signal.d.ts.map +0 -1
- package/dist/sensor/temporal-sample-binding.d.ts.map +0 -1
- package/dist/simulation/poc-simulation.d.ts.map +0 -1
- package/dist/stabilization/camera-shake.d.ts.map +0 -1
- package/dist/stabilization/system.d.ts.map +0 -1
- package/docs/API_STYLE.md +0 -235
- package/docs/ARCHITECTURE.md +0 -356
- package/docs/AUTOMATION_COORDINATION.md +0 -190
- package/docs/CAPTURE_COLOR.md +0 -25
- package/docs/CAPTURE_CORRECTED_SDR.md +0 -25
- package/docs/CAPTURE_EXPORT_METADATA.md +0 -27
- package/docs/CAPTURE_SDR.md +0 -22
- package/docs/DENSE_PUPIL_QUALIFICATION.md +0 -121
- package/docs/DEVELOPERS.md +0 -68
- package/docs/DIGITAL_OPTICS_FOUNDATION.md +0 -69
- package/docs/ENVIRONMENT_RAW_CAPTURE.md +0 -208
- package/docs/EXPORT_ACCEPTANCE.md +0 -133
- package/docs/GENERIC_TIER_PRESETS.md +0 -269
- package/docs/GEOMETRIC_PREPARATION_REUSE.md +0 -141
- package/docs/IMAGE_FORMATION.md +0 -247
- package/docs/LINEAR_CAPTURE_ENCODING.md +0 -25
- package/docs/MOTION_AND_SIGNAL.md +0 -250
- package/docs/NATIVE_CAPTURE_SDR.md +0 -70
- package/docs/NATIVE_CAPTURE_SDR_REVIEW.md +0 -37
- package/docs/NATIVE_CAPTURE_SDR_VALIDATION.md +0 -34
- package/docs/NATIVE_RAW_AND_PRINT.md +0 -54
- package/docs/NUMERICAL_CORRECTNESS.md +0 -191
- package/docs/PERFORMANCE_BASELINE.md +0 -56
- package/docs/PHOTOGRAPHIC_EXPORT.md +0 -206
- package/docs/PHYSICS_FOUNDATION.md +0 -426
- package/docs/POC_API.md +0 -278
- package/docs/POC_PROJECTION_PLATFORM_REFERENCE.md +0 -12
- package/docs/POC_PROJECTION_REUSE.md +0 -124
- package/docs/PRINT_195_196_REVIEW.md +0 -93
- package/docs/PRINT_196_ENGINE_ACCEPTANCE.md +0 -45
- package/docs/PRINT_CONTRAST_REFERENCE.md +0 -43
- package/docs/PRINT_DETAIL_ASSESSMENT.md +0 -81
- package/docs/PRINT_DETAIL_JPEG_EVIDENCE.md +0 -36
- package/docs/PRINT_DETAIL_SDR_EVIDENCE.md +0 -29
- package/docs/PRINT_DETAIL_VALIDATION.md +0 -36
- package/docs/PRINT_PLANNING.md +0 -75
- package/docs/PRINT_REGION_STATISTICS.md +0 -38
- package/docs/PROCESSED_OUTPUT.md +0 -157
- package/docs/PRODUCTION_COMPOSITION.md +0 -373
- package/docs/PRODUCTION_ENVIRONMENT_CAPTURE.md +0 -131
- package/docs/PROVENANCE.md +0 -115
- package/docs/PSF_FOUNDATION.md +0 -165
- package/docs/RAW_FRAME_ENVELOPE.md +0 -56
- package/docs/RAW_FRAME_RECONSTRUCTION.md +0 -30
- package/docs/RELEASE_1_0.md +0 -66
- package/docs/RELEASE_1_0_1.md +0 -61
- package/docs/RELEASE_1_1_0.md +0 -25
- package/docs/RELEASE_1_2_0.md +0 -51
- package/docs/RELEASE_1_3_0.md +0 -15
- package/docs/RELEASE_1_4_0.md +0 -23
- package/docs/RELEASE_1_5_0.md +0 -105
- package/docs/RELEASE_AUDIT.md +0 -39
- package/docs/SCENE_RADIANCE_AND_ILLUMINATION.md +0 -298
- package/docs/SCENE_SENSOR_QUADRATURE.md +0 -98
- package/docs/SCENE_SENSOR_TEMPORAL_EXPOSURE.md +0 -86
- package/docs/SCIENTIFIC_ASSURANCE.md +0 -280
- package/docs/SCIENTIFIC_CONFORMANCE.md +0 -83
- package/docs/SDR_RENDERING.md +0 -33
- package/docs/SENSOR_APERTURE_RAYS.md +0 -23
- package/docs/SENSOR_ENVIRONMENT_QUERY.md +0 -86
- package/docs/SENSOR_EQE_LOCAL_EXPOSURE.md +0 -104
- package/docs/SENSOR_EQE_TEMPORAL_EXPOSURE.md +0 -74
- package/docs/SENSOR_PSF_QUADRATURE.md +0 -90
- package/docs/SENSOR_RAW_FRAME.md +0 -20
- package/docs/SENSOR_RAW_PRODUCER.md +0 -77
- package/docs/SEPARABLE_EMISSION_DRAFT.md +0 -103
- package/docs/SIGNAL_CONFORMANCE.md +0 -23
- package/docs/SIMULATED_CAPTURE.md +0 -65
- package/docs/STABILIZATION.md +0 -234
- package/docs/TEMPORAL_PHOTO_RAW.md +0 -83
- package/docs/TIER_ACCEPTANCE.md +0 -129
- package/docs/TIER_PRESET_ACCEPTANCE.md +0 -59
- package/docs/V1_COMPOSITION_MAP.md +0 -123
- package/docs/V1_HELPER_REUSE_REVIEW.md +0 -60
- package/docs/V1_PERFORMANCE_DISPOSITION.md +0 -88
- package/docs/benchmarks/2026-10-01-main-baseline.json +0 -694
- package/docs/benchmarks/2026-10-02-geometric-preparation-reuse.json +0 -2190
- package/docs/benchmarks/2026-10-02-poc-projection-reuse.json +0 -2423
- package/docs/benchmarks/2026-10-02-v1-environment-gc-profile.json +0 -210
- package/docs/benchmarks/2026-10-02-v1-environment-ordinary.json +0 -187
- package/docs/benchmarks/2026-10-02-v1-geometry-gc-profile.json +0 -756
- package/docs/benchmarks/2026-10-02-v1-geometry-ordinary-1.json +0 -711
- package/docs/benchmarks/2026-10-02-v1-geometry-ordinary-2.json +0 -711
- package/docs/benchmarks/2026-10-02-v1-poc-gc-profile.json +0 -885
- package/docs/benchmarks/2026-10-02-v1-poc-ordinary-1.json +0 -868
- package/docs/benchmarks/2026-10-02-v1-poc-ordinary-2.json +0 -868
- package/docs/licenses/castleCSF-MIT.txt +0 -21
- package/docs/validation/dense-pupil-2026-10-06/pilot.jsonl +0 -6
- package/docs/validation/documentation-fragments.json +0 -212
- package/docs/validation/native-capture-sdr-darwin-arm64-node26-review.jsonl +0 -4
- package/docs/validation/native-capture-sdr-darwin-arm64.jsonl +0 -3
- package/docs/validation/native-raw-print-2026-10-04/fractional-asymmetric-crop.jpg +0 -0
- package/docs/validation/native-raw-print-2026-10-04/gray-ramp.jpg +0 -0
- package/docs/validation/native-raw-print-2026-10-04/linear-area-checker.jpg +0 -0
- package/docs/validation/native-raw-print-2026-10-04/manifest.json +0 -218
- package/docs/validation/native-raw-print-2026-10-04/megapixel-native.jpg +0 -0
- package/docs/validation/native-raw-print-2026-10-04/native-color.jpg +0 -0
- package/docs/validation/native-raw-print-2026-10-04/photivra-native-full-megapixel-validation.json +0 -9
- package/docs/validation/native-raw-print-2026-10-04/photivra-native-full-megapixel.json +0 -29
- package/docs/validation/native-raw-print-2026-10-04/photivra-native-full-megapixel.json.codes.u16le.gz +0 -0
- package/docs/validation/native-raw-print-2026-10-04/photivra-native-full-megapixel.json.jpg +0 -0
- package/docs/validation/native-raw-print-2026-10-04/photivra-native-full-megapixel.json.rgb.gz +0 -0
- package/docs/validation/native-raw-print-2026-10-04/srgb.icc +0 -0
- package/docs/validation/native-raw-print-2026-10-04/validation.json +0 -41
- package/docs/validation/print-196-candidate-capabilities.json +0 -28
- package/docs/validation/print-196-candidate-evidence.json +0 -356
- package/docs/validation/print-196-engine-acceptance.json +0 -81
- package/docs/validation/print-detail-capabilities.json +0 -103
- package/docs/validation/print-detail-jpeg-evidence.json +0 -116
- package/docs/validation/print-detail-sdr-evidence.json +0 -81
- package/docs/validation/release-audit-inventory.json +0 -1306
- package/docs/validation/tier-acceptance-report-v1.json +0 -2538
|
@@ -0,0 +1,340 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
/**
|
|
3
|
+
* Keeps (retains) the result of the optical stage of a native environment capture, so the sensor stage
|
|
4
|
+
* can be re-run with new post-optics settings without calling the radiance callbacks again.
|
|
5
|
+
*
|
|
6
|
+
* Optical stage: scene radiance → optics, PSF (point-spread function) and pupil → expected photo signal
|
|
7
|
+
* via EQE (external quantum efficiency). Sensor stage: dark charge → charge realization → readout.
|
|
8
|
+
*
|
|
9
|
+
* Reuse is exact, not approximate: the sensor stage receives a photo signal whose every number is the
|
|
10
|
+
* float64 value the optical stage produced, and the same charge/noise/ADC code runs on it. Reuse is
|
|
11
|
+
* refused unless the capture's optical binding and every site's environment input are strictly equal
|
|
12
|
+
* to those the stage was produced from.
|
|
13
|
+
* @see docs/NATIVE_RAW_AND_PRINT.md for the invariance analysis, memory bound and limits.
|
|
14
|
+
*/
|
|
15
|
+
import { createNativeRawTask } from "./native-raw.js";
|
|
16
|
+
import { parseSensorEqeTemporalPhotoSignal } from "../sensor/temporal-photo-signal.js";
|
|
17
|
+
import { calculateSensorDarkCurrentCharge } from "../sensor/dark-current.js";
|
|
18
|
+
import { requireAllowlistedRecord } from "../core/record-validation.js";
|
|
19
|
+
import { stringifyCanonicalJson } from "../core/canonical-json.js";
|
|
20
|
+
import { freezeOwnedData } from "../core/owned-data.js";
|
|
21
|
+
import { InvalidConfigurationError } from "../core/configuration-error.js";
|
|
22
|
+
/**
|
|
23
|
+
* Fixed retention limits. The per-site footprint of a retained optical stage is
|
|
24
|
+
* `fixedBytesPerSite + bytesPerTemporalSamplePerSite × temporalSampleCount` bytes of typed-array storage;
|
|
25
|
+
* distinct environment and photo templates (each about one site's input size) are capped separately.
|
|
26
|
+
*/
|
|
27
|
+
export const NATIVE_ENVIRONMENT_OPTICAL_STAGE_LIMITS = Object.freeze({
|
|
28
|
+
/** Two one-byte template indices plus seven float64 values (site x/y, window start/end/duration, photon/electron counts). */
|
|
29
|
+
fixedBytesPerSite: 58,
|
|
30
|
+
/** Three float64 values per temporal midpoint: time, incident-photon rate, generated-electron rate. */
|
|
31
|
+
bytesPerTemporalSamplePerSite: 24,
|
|
32
|
+
/** Distinct per-site environment inputs once the site index and integration ID are removed. */
|
|
33
|
+
maximumEnvironmentTemplates: 256,
|
|
34
|
+
/** Distinct photo-signal identity/evidence records once per-site numbers are removed. */
|
|
35
|
+
maximumPhotoTemplates: 256
|
|
36
|
+
});
|
|
37
|
+
const FIXED_VALUES = 7;
|
|
38
|
+
const ENVIRONMENT_SHARED_KEYS = ["sceneBindings", "optics", "motion", "psf", "pupil", "fieldThroughput"];
|
|
39
|
+
function canonical(value) {
|
|
40
|
+
return stringifyCanonicalJson(value, { undefinedObjectProperties: "omit", nonFiniteNumberMessage: "Invalid native scene binding.",
|
|
41
|
+
unsupportedValueMessage: "Invalid native scene binding." });
|
|
42
|
+
}
|
|
43
|
+
function isPlainRecord(value) {
|
|
44
|
+
const prototype = Object.getPrototypeOf(value);
|
|
45
|
+
return prototype === Object.prototype || prototype === null;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Strict structural equality of plain data: Object.is for primitives (so 0 and -0 differ), identical own
|
|
49
|
+
* key sets, arrays element by element. Anything that is not a plain record or array is unequal unless it is
|
|
50
|
+
* the same reference, so an unexpected value refuses reuse instead of being treated as equal.
|
|
51
|
+
*/
|
|
52
|
+
function strictlyEqual(a, b, verified, skip) {
|
|
53
|
+
if (Object.is(a, b))
|
|
54
|
+
return true;
|
|
55
|
+
if (typeof a !== "object" || typeof b !== "object" || a === null || b === null)
|
|
56
|
+
return false;
|
|
57
|
+
if (!skip && verified.get(a)?.has(b))
|
|
58
|
+
return true;
|
|
59
|
+
if (Array.isArray(a)) {
|
|
60
|
+
if (!Array.isArray(b) || a.length !== b.length)
|
|
61
|
+
return false;
|
|
62
|
+
for (let i = 0; i < a.length; i++) {
|
|
63
|
+
if (!(i in a) || !(i in b) || !strictlyEqual(a[i], b[i], verified))
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
if (Array.isArray(b) || !isPlainRecord(a) || !isPlainRecord(b))
|
|
69
|
+
return false;
|
|
70
|
+
const ak = Object.keys(a), bk = Object.keys(b);
|
|
71
|
+
if (ak.length !== bk.length || Object.getOwnPropertySymbols(a).length !== 0 || Object.getOwnPropertySymbols(b).length !== 0)
|
|
72
|
+
return false;
|
|
73
|
+
for (const key of ak) {
|
|
74
|
+
if (!Object.prototype.hasOwnProperty.call(b, key))
|
|
75
|
+
return false;
|
|
76
|
+
if (skip?.has(key))
|
|
77
|
+
continue;
|
|
78
|
+
if (!strictlyEqual(a[key], b[key], verified))
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (!skip) {
|
|
83
|
+
let set = verified.get(a);
|
|
84
|
+
if (!set)
|
|
85
|
+
verified.set(a, set = new WeakSet());
|
|
86
|
+
set.add(b);
|
|
87
|
+
}
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Environment equality except the two per-site fields that are bound to the absolute native index and
|
|
92
|
+
* checked separately: temporalIntegrationId and sensor.spatialSampling.site.
|
|
93
|
+
*/
|
|
94
|
+
function environmentMatches(e, t, verified) {
|
|
95
|
+
if (typeof e !== "object" || e === null || typeof e.sensor !== "object" || e.sensor === null ||
|
|
96
|
+
typeof e.sensor.spatialSampling !== "object" || e.sensor.spatialSampling === null)
|
|
97
|
+
return false;
|
|
98
|
+
return strictlyEqual(e, t, verified, new Set(["temporalIntegrationId", "sensor"])) &&
|
|
99
|
+
strictlyEqual(e.sensor, t.sensor, verified, new Set(["spatialSampling"])) &&
|
|
100
|
+
strictlyEqual(e.sensor.spatialSampling, t.sensor.spatialSampling, verified, new Set(["site"]));
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Post-optics capture fields: noise seed/realization/model, ISO metadata, white-balance intent, adopted white,
|
|
104
|
+
* capture identity, source artifact metadata and declared models. The optical stage never reads them.
|
|
105
|
+
* Everything else in the normalized plan (scene state/time, geometry including orientation, focal length,
|
|
106
|
+
* aperture, shutter, focus, frame/mode/CFA/binding profiles and the exposure window) is part of the binding.
|
|
107
|
+
*/
|
|
108
|
+
function opticalBinding(plan, sceneBinding) {
|
|
109
|
+
const { captureId, noise, source, whiteBalanceIntent, adoptedWhiteXyz, models, exposure, ...capture } = plan.exposure;
|
|
110
|
+
void captureId;
|
|
111
|
+
void noise;
|
|
112
|
+
void source;
|
|
113
|
+
void whiteBalanceIntent;
|
|
114
|
+
void adoptedWhiteXyz;
|
|
115
|
+
void models;
|
|
116
|
+
const { iso, ...opticalExposure } = exposure;
|
|
117
|
+
void iso;
|
|
118
|
+
const { capture: frameCapture, ...frame } = plan.frame;
|
|
119
|
+
void frameCapture;
|
|
120
|
+
return { capture: { ...capture, exposure: opticalExposure }, frame, exposureWindow: plan.exposureWindow ?? null, sceneBinding };
|
|
121
|
+
}
|
|
122
|
+
const STAGES = new WeakMap();
|
|
123
|
+
function release(state) {
|
|
124
|
+
state.values.fill(0);
|
|
125
|
+
state.environmentIndex.fill(0);
|
|
126
|
+
state.photoIndex.fill(0);
|
|
127
|
+
state.values = new Float64Array(0);
|
|
128
|
+
state.environmentIndex = new Uint8Array(0);
|
|
129
|
+
state.photoIndex = new Uint8Array(0);
|
|
130
|
+
state.environments = [];
|
|
131
|
+
state.photoTemplates = [];
|
|
132
|
+
state.disposed = true;
|
|
133
|
+
}
|
|
134
|
+
function photoTemplate(p) {
|
|
135
|
+
const { temporalIntegrationId, site, startOffsetSecondsFromOpeningReference, endOffsetSecondsFromOpeningReference, localExposureDurationSeconds, expectedIncidentPhotonCount, expectedGeneratedElectronCount, temporalSamples, ...rest } = p;
|
|
136
|
+
void temporalIntegrationId;
|
|
137
|
+
void site;
|
|
138
|
+
void startOffsetSecondsFromOpeningReference;
|
|
139
|
+
void endOffsetSecondsFromOpeningReference;
|
|
140
|
+
void localExposureDurationSeconds;
|
|
141
|
+
void expectedIncidentPhotonCount;
|
|
142
|
+
void expectedGeneratedElectronCount;
|
|
143
|
+
void temporalSamples;
|
|
144
|
+
return rest;
|
|
145
|
+
}
|
|
146
|
+
/** Shared by full acquisition and reuse so the sensor stage receives an identical site record either way. */
|
|
147
|
+
export function composeNativeEnvironmentSensorSite(site, photoSignal) {
|
|
148
|
+
const darkCharge = calculateSensorDarkCurrentCharge({ exposure: photoSignal, darkCurrentProfile: site.darkCurrentProfile,
|
|
149
|
+
operatingTemperatureC: site.operatingTemperatureC }).value;
|
|
150
|
+
return { ...site.readout, charge: { ...site.charge, photoSignal, darkCharge } };
|
|
151
|
+
}
|
|
152
|
+
/** Validates the optional retention request before any provider work. */
|
|
153
|
+
export function parseNativeEnvironmentOpticalStageRetention(value) {
|
|
154
|
+
const r = requireAllowlistedRecord(value, ["maximumRetainedBytes"], "Invalid optical-stage retention request.");
|
|
155
|
+
if (typeof r.maximumRetainedBytes !== "number" || !Number.isSafeInteger(r.maximumRetainedBytes) || r.maximumRetainedBytes < 1) {
|
|
156
|
+
throw new InvalidConfigurationError("Optical-stage retention requires a positive safe-integer byte budget.");
|
|
157
|
+
}
|
|
158
|
+
return { maximumRetainedBytes: r.maximumRetainedBytes };
|
|
159
|
+
}
|
|
160
|
+
export function createNativeEnvironmentOpticalStageRecorder(plan, sceneBinding, retention) {
|
|
161
|
+
const L = NATIVE_ENVIRONMENT_OPTICAL_STAGE_LIMITS;
|
|
162
|
+
const state = { pixelCount: plan.pixelCount, nativeWidth: plan.exposure.geometry.nativeRaster.pixelWidth,
|
|
163
|
+
frameId: plan.frame.frameId, stride: 0, temporalSampleCount: 0, binding: freezeOwnedData(structuredClone(opticalBinding(plan, sceneBinding))),
|
|
164
|
+
values: new Float64Array(0), environmentIndex: new Uint8Array(0), photoIndex: new Uint8Array(0), environments: [], photoTemplates: [],
|
|
165
|
+
providerEvaluationCount: 0, disposed: false };
|
|
166
|
+
const environmentKeys = new Map(), photoKeys = new Map(), verified = new WeakMap();
|
|
167
|
+
const admitted = new Uint8Array(plan.pixelCount);
|
|
168
|
+
let recorded = 0;
|
|
169
|
+
function residualKey(e, sharedCanonical) {
|
|
170
|
+
const rest = { ...e, temporalIntegrationId: undefined,
|
|
171
|
+
sensor: { ...e.sensor, spatialSampling: { ...e.sensor.spatialSampling, site: undefined } } };
|
|
172
|
+
for (const key of ENVIRONMENT_SHARED_KEYS)
|
|
173
|
+
rest[key] = undefined;
|
|
174
|
+
return sharedCanonical + "\u0000" + canonical(rest);
|
|
175
|
+
}
|
|
176
|
+
return {
|
|
177
|
+
admit(index, environment, sharedCanonical) {
|
|
178
|
+
if (state.disposed)
|
|
179
|
+
throw new InvalidConfigurationError("Optical-stage retention was released.");
|
|
180
|
+
const n = environment.temporalSampleCount;
|
|
181
|
+
if (state.stride === 0) {
|
|
182
|
+
const bytes = plan.pixelCount * (L.fixedBytesPerSite + L.bytesPerTemporalSamplePerSite * n);
|
|
183
|
+
if (!Number.isSafeInteger(bytes) || bytes > retention.maximumRetainedBytes)
|
|
184
|
+
throw new InvalidConfigurationError("Optical-stage retention exceeds its byte budget.");
|
|
185
|
+
state.temporalSampleCount = n;
|
|
186
|
+
state.stride = FIXED_VALUES + 3 * n;
|
|
187
|
+
state.values = new Float64Array(plan.pixelCount * state.stride);
|
|
188
|
+
state.environmentIndex = new Uint8Array(plan.pixelCount);
|
|
189
|
+
state.photoIndex = new Uint8Array(plan.pixelCount);
|
|
190
|
+
}
|
|
191
|
+
else if (n !== state.temporalSampleCount)
|
|
192
|
+
throw new InvalidConfigurationError("Optical-stage retention requires one temporal sample count per event.");
|
|
193
|
+
const key = residualKey(environment, sharedCanonical), candidates = environmentKeys.get(key) ?? [];
|
|
194
|
+
let found = candidates.find(i => environmentMatches(environment, state.environments[i], verified));
|
|
195
|
+
if (found === undefined) {
|
|
196
|
+
if (state.environments.length >= L.maximumEnvironmentTemplates)
|
|
197
|
+
throw new InvalidConfigurationError("Optical-stage retention exceeds its distinct site-environment limit.");
|
|
198
|
+
found = state.environments.length;
|
|
199
|
+
state.environments.push(environment);
|
|
200
|
+
candidates.push(found);
|
|
201
|
+
environmentKeys.set(key, candidates);
|
|
202
|
+
}
|
|
203
|
+
state.environmentIndex[index] = found;
|
|
204
|
+
admitted[index] = 1;
|
|
205
|
+
},
|
|
206
|
+
record(index, p) {
|
|
207
|
+
if (state.disposed || admitted[index] !== 1)
|
|
208
|
+
throw new InvalidConfigurationError("Optical-stage retention was released or not admitted.");
|
|
209
|
+
const samples = p.temporalSamples;
|
|
210
|
+
if (samples.length !== state.temporalSampleCount)
|
|
211
|
+
throw new InvalidConfigurationError("Optical-stage temporal sample count changed.");
|
|
212
|
+
const template = photoTemplate(p), key = canonical(template), candidates = photoKeys.get(key) ?? [];
|
|
213
|
+
let found = candidates.find(i => strictlyEqual(template, state.photoTemplates[i], verified));
|
|
214
|
+
if (found === undefined) {
|
|
215
|
+
if (state.photoTemplates.length >= L.maximumPhotoTemplates)
|
|
216
|
+
throw new InvalidConfigurationError("Optical-stage retention exceeds its distinct photo-identity limit.");
|
|
217
|
+
found = state.photoTemplates.length;
|
|
218
|
+
state.photoTemplates.push(freezeOwnedData(structuredClone(template)));
|
|
219
|
+
candidates.push(found);
|
|
220
|
+
photoKeys.set(key, candidates);
|
|
221
|
+
}
|
|
222
|
+
state.photoIndex[index] = found;
|
|
223
|
+
const v = state.values, o = index * state.stride;
|
|
224
|
+
v[o] = p.site.x;
|
|
225
|
+
v[o + 1] = p.site.y;
|
|
226
|
+
v[o + 2] = p.startOffsetSecondsFromOpeningReference;
|
|
227
|
+
v[o + 3] = p.endOffsetSecondsFromOpeningReference;
|
|
228
|
+
v[o + 4] = p.localExposureDurationSeconds;
|
|
229
|
+
v[o + 5] = p.expectedIncidentPhotonCount;
|
|
230
|
+
v[o + 6] = p.expectedGeneratedElectronCount;
|
|
231
|
+
for (let t = 0; t < samples.length; t++) {
|
|
232
|
+
const s = samples[t], q = o + FIXED_VALUES + 3 * t;
|
|
233
|
+
v[q] = s.timeSecondsFromOpeningReference;
|
|
234
|
+
v[q + 1] = s.incidentPhotonRatePerSecond;
|
|
235
|
+
v[q + 2] = s.expectedGeneratedElectronRatePerSecond;
|
|
236
|
+
}
|
|
237
|
+
admitted[index] = 2;
|
|
238
|
+
recorded++;
|
|
239
|
+
},
|
|
240
|
+
finish(providerEvaluationCount) {
|
|
241
|
+
if (state.disposed || recorded !== plan.pixelCount)
|
|
242
|
+
throw new InvalidConfigurationError("Optical-stage retention is incomplete.");
|
|
243
|
+
for (const environment of state.environments)
|
|
244
|
+
freezeOwnedData(environment);
|
|
245
|
+
state.providerEvaluationCount = providerEvaluationCount;
|
|
246
|
+
const handle = Object.freeze({ kind: "native-environment-optical-stage",
|
|
247
|
+
pixelCount: state.pixelCount, temporalSampleCount: state.temporalSampleCount,
|
|
248
|
+
retainedBytes: state.pixelCount * (L.fixedBytesPerSite + L.bytesPerTemporalSamplePerSite * state.temporalSampleCount),
|
|
249
|
+
providerEvaluationCount, get disposed() { return state.disposed; },
|
|
250
|
+
dispose() { if (!state.disposed)
|
|
251
|
+
release(state); } });
|
|
252
|
+
STAGES.set(handle, state);
|
|
253
|
+
return handle;
|
|
254
|
+
},
|
|
255
|
+
discard() { if (!state.disposed)
|
|
256
|
+
release(state); }
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Internal: re-runs only the sensor stage (dark charge, charge realization, capacity, seeded noise and ADC) from a retained
|
|
261
|
+
* optical stage. The capture may change post-optics settings only: noise seed/realization, ISO metadata, readout
|
|
262
|
+
* regime/gain, charge sampling/capacity/completeness, dark-current profile and temperature, white-balance intent,
|
|
263
|
+
* capture identity and tile width. Every optical input must be strictly equal, otherwise this refuses before
|
|
264
|
+
* output: the capture binding is checked here, each site's environment as its tile is read.
|
|
265
|
+
*/
|
|
266
|
+
export function createSensorStageRawTask(input, opticalStage, provider, parseSceneBinding) {
|
|
267
|
+
const state = typeof opticalStage === "object" && opticalStage !== null ? STAGES.get(opticalStage) : undefined;
|
|
268
|
+
if (!state)
|
|
269
|
+
throw new InvalidConfigurationError("Optical-stage reuse requires an engine-produced optical stage.");
|
|
270
|
+
if (state.disposed)
|
|
271
|
+
throw new InvalidConfigurationError("Optical stage was disposed.");
|
|
272
|
+
const r = requireAllowlistedRecord(input, ["raw", "sceneBinding"], "Invalid native sensor-stage input.");
|
|
273
|
+
const sceneBinding = parseSceneBinding(r.sceneBinding);
|
|
274
|
+
if (!provider || typeof provider.readTile !== "function" || typeof provider.yieldControl !== "function") {
|
|
275
|
+
throw new InvalidConfigurationError("Sensor-stage reuse requires physical site input and host yields.");
|
|
276
|
+
}
|
|
277
|
+
const read = provider.readTile.bind(provider), yieldControl = provider.yieldControl.bind(provider);
|
|
278
|
+
const width = state.nativeWidth, frameId = state.frameId;
|
|
279
|
+
const task = createNativeRawTask(input.raw, {
|
|
280
|
+
async readTile(request, signal) {
|
|
281
|
+
const supplied = await read(request, signal);
|
|
282
|
+
if (signal.aborted)
|
|
283
|
+
throw new InvalidConfigurationError("Native sensor-stage acquisition aborted.");
|
|
284
|
+
if (state.disposed)
|
|
285
|
+
throw new InvalidConfigurationError("Optical stage was disposed.");
|
|
286
|
+
const tile = requireAllowlistedRecord(supplied, ["captureId", "frameId", "x", "y", "width", "height", "sites"], "Invalid physical source tile.");
|
|
287
|
+
for (const key of Object.keys(request))
|
|
288
|
+
if (tile[key] !== request[key])
|
|
289
|
+
throw new InvalidConfigurationError("Physical source tile identity mismatch.");
|
|
290
|
+
if (!Array.isArray(tile.sites) || tile.sites.length !== request.width || Array.from({ length: request.width }, (_, i) => i in tile.sites).includes(false)) {
|
|
291
|
+
throw new InvalidConfigurationError("Physical source tile needs exact native coverage.");
|
|
292
|
+
}
|
|
293
|
+
// The supplied environment is only compared, in one synchronous pass, and never used: execution uses the
|
|
294
|
+
// retained stage. Only the post-optics parts the sensor stage uses are cloned. The equality cache is per
|
|
295
|
+
// tile, so a caller object changed between tiles is compared again.
|
|
296
|
+
const tileVerified = new WeakMap();
|
|
297
|
+
const suppliedSites = tile.sites;
|
|
298
|
+
const sites = structuredClone(suppliedSites.map((value, j) => {
|
|
299
|
+
const site = requireAllowlistedRecord(value, ["environment", "darkCurrentProfile", "operatingTemperatureC", "charge", "readout"], "Invalid physical site input.");
|
|
300
|
+
const index = request.y * width + request.x + j, e = site.environment;
|
|
301
|
+
if (typeof e !== "object" || e === null || !environmentMatches(e, state.environments[state.environmentIndex[index]], tileVerified) ||
|
|
302
|
+
e.temporalIntegrationId !== frameId + ":native:" + index || typeof e.sensor.spatialSampling.site !== "object" || e.sensor.spatialSampling.site === null ||
|
|
303
|
+
!strictlyEqual(e.sensor.spatialSampling.site, { x: index % width, y: Math.floor(index / width) }, tileVerified)) {
|
|
304
|
+
throw new InvalidConfigurationError("Site environment differs from the retained optical stage; recompute the optical stage.");
|
|
305
|
+
}
|
|
306
|
+
return { temporalIntegrationId: e.temporalIntegrationId, darkCurrentProfile: site.darkCurrentProfile, operatingTemperatureC: site.operatingTemperatureC,
|
|
307
|
+
charge: site.charge, readout: site.readout };
|
|
308
|
+
}));
|
|
309
|
+
const photos = sites.map((site, j) => {
|
|
310
|
+
const index = request.y * width + request.x + j;
|
|
311
|
+
if (site.temporalIntegrationId !== frameId + ":native:" + index) {
|
|
312
|
+
throw new InvalidConfigurationError("Site environment differs from the retained optical stage; recompute the optical stage.");
|
|
313
|
+
}
|
|
314
|
+
const v = state.values, o = index * state.stride, template = state.photoTemplates[state.photoIndex[index]];
|
|
315
|
+
const temporalSamples = Array.from({ length: state.temporalSampleCount }, (_, t) => {
|
|
316
|
+
const q = o + FIXED_VALUES + 3 * t;
|
|
317
|
+
return { timeSecondsFromOpeningReference: v[q], incidentPhotonRatePerSecond: v[q + 1], expectedGeneratedElectronRatePerSecond: v[q + 2] };
|
|
318
|
+
});
|
|
319
|
+
return freezeOwnedData(parseSensorEqeTemporalPhotoSignal({ ...template, temporalIntegrationId: site.temporalIntegrationId, site: { x: v[o], y: v[o + 1] },
|
|
320
|
+
startOffsetSecondsFromOpeningReference: v[o + 2], endOffsetSecondsFromOpeningReference: v[o + 3], localExposureDurationSeconds: v[o + 4],
|
|
321
|
+
expectedIncidentPhotonCount: v[o + 5], expectedGeneratedElectronCount: v[o + 6], temporalSamples }));
|
|
322
|
+
});
|
|
323
|
+
return { ...request, sites: sites.map((site, j) => composeNativeEnvironmentSensorSite(site, photos[j])) };
|
|
324
|
+
},
|
|
325
|
+
// Host yields are time-budgeted and always follow the final tile, so a stage disposed
|
|
326
|
+
// while the host runs is caught here even when no further tile would be read.
|
|
327
|
+
async yieldControl(signal) {
|
|
328
|
+
await yieldControl(signal);
|
|
329
|
+
if (state.disposed)
|
|
330
|
+
throw new InvalidConfigurationError("Optical stage was disposed.");
|
|
331
|
+
}
|
|
332
|
+
});
|
|
333
|
+
// The task's own accepted plan is the one compared, so nothing is planned twice and no callback has run yet.
|
|
334
|
+
if (!strictlyEqual(opticalBinding(task.plan, sceneBinding), state.binding, new WeakMap())) {
|
|
335
|
+
task.dispose();
|
|
336
|
+
throw new InvalidConfigurationError("Optical stage does not match this capture's optical inputs; recompute the optical stage.");
|
|
337
|
+
}
|
|
338
|
+
return { task, sceneBinding };
|
|
339
|
+
}
|
|
340
|
+
//# sourceMappingURL=native-environment-optical-stage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-environment-optical-stage.js","sourceRoot":"","sources":["../../src/capture/native-environment-optical-stage.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,mBAAmB,EAAsE,MAAM,iBAAiB,CAAC;AAG1H,OAAO,EAAE,iCAAiC,EAAqC,MAAM,oCAAoC,CAAC;AAC1H,OAAO,EAAE,gCAAgC,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAK3E;;;;GAIG;AACH,MAAM,CAAC,MAAM,uCAAuC,GAAG,MAAM,CAAC,MAAM,CAAC;IACnE,6HAA6H;IAC7H,iBAAiB,EAAE,EAAE;IACrB,uGAAuG;IACvG,6BAA6B,EAAE,EAAE;IACjC,+FAA+F;IAC/F,2BAA2B,EAAE,GAAG;IAChC,yFAAyF;IACzF,qBAAqB,EAAE,GAAG;CAC3B,CAAC,CAAC;AAoCH,MAAM,YAAY,GAAG,CAAC,CAAC;AACvB,MAAM,uBAAuB,GAAG,CAAC,eAAe,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,iBAAiB,CAAU,CAAC;AAElH,SAAS,SAAS,CAAC,KAAc;IAC/B,OAAO,sBAAsB,CAAC,KAAK,EAAE,EAAE,yBAAyB,EAAE,MAAM,EAAE,sBAAsB,EAAE,+BAA+B;QAC/H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,CAAE,EAAE,8BAA8B,EAAE,CAAC,CAAC,CAAC,GAAC,CAAC,CAAE,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC;YACvG,CAAC,CAAC,CAAC;YACH,OAAO,EAAE,GAAG,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,kCAAkC,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAE,CAAC,CAAC,EAAE,CAAC;QAC7G,CAAC;QACD,sFAAsF;QACtF,8EAA8E;QAC9E,KAAK,CAAC,YAAY,CAAC,MAAM;YACvB,MAAM,YAAY,CAAC,MAAM,CAAC,CAAC;YAC3B,IAAI,KAAK,CAAC,QAAQ;gBAAE,MAAM,IAAI,yBAAyB,CAAC,6BAA6B,CAAC,CAAC;QACzF,CAAC;KACF,CAAC,CAAC;IACH,6GAA6G;IAC7G,IAAI,CAAC,aAAa,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,EAAE,KAAK,CAAC,OAAO,EAAE,IAAI,OAAO,EAAE,CAAC,EAAE,CAAC;QAC1F,IAAI,CAAC,OAAO,EAAE,CAAC;QACf,MAAM,IAAI,yBAAyB,CAAC,0FAA0F,CAAC,CAAC;IAClI,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;AAChC,CAAC","sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\n/**\n * Keeps (retains) the result of the optical stage of a native environment capture, so the sensor stage\n * can be re-run with new post-optics settings without calling the radiance callbacks again.\n *\n * Optical stage: scene radiance → optics, PSF (point-spread function) and pupil → expected photo signal\n * via EQE (external quantum efficiency). Sensor stage: dark charge → charge realization → readout.\n *\n * Reuse is exact, not approximate: the sensor stage receives a photo signal whose every number is the\n * float64 value the optical stage produced, and the same charge/noise/ADC code runs on it. Reuse is\n * refused unless the capture's optical binding and every site's environment input are strictly equal\n * to those the stage was produced from.\n * @see docs/NATIVE_RAW_AND_PRINT.md for the invariance analysis, memory bound and limits.\n */\n\nimport { createNativeRawTask, type NativeRawInput, type NativeRawPlan, type NativeRawTileRequest } from \"./native-raw.js\";\nimport type { SimulateEnvironmentSensorRawFrameInput } from \"./environment-raw-producer.js\";\nimport type { SensorRawProducerSiteInput } from \"./sensor-raw-producer.js\";\nimport { parseSensorEqeTemporalPhotoSignal, type SensorEqeTemporalPhotoSignal } from \"../sensor/temporal-photo-signal.js\";\nimport { calculateSensorDarkCurrentCharge } from \"../sensor/dark-current.js\";\nimport { requireAllowlistedRecord } from \"../core/record-validation.js\";\nimport { stringifyCanonicalJson } from \"../core/canonical-json.js\";\nimport { freezeOwnedData } from \"../core/owned-data.js\";\nimport { InvalidConfigurationError } from \"../core/configuration-error.js\";\n\ntype EnvironmentSite = SimulateEnvironmentSensorRawFrameInput[\"sites\"][number];\ntype SiteEnvironment = EnvironmentSite[\"environment\"];\n\n/**\n * Fixed retention limits. The per-site footprint of a retained optical stage is\n * `fixedBytesPerSite + bytesPerTemporalSamplePerSite × temporalSampleCount` bytes of typed-array storage;\n * distinct environment and photo templates (each about one site's input size) are capped separately.\n */\nexport const NATIVE_ENVIRONMENT_OPTICAL_STAGE_LIMITS = Object.freeze({\n /** Two one-byte template indices plus seven float64 values (site x/y, window start/end/duration, photon/electron counts). */\n fixedBytesPerSite: 58,\n /** Three float64 values per temporal midpoint: time, incident-photon rate, generated-electron rate. */\n bytesPerTemporalSamplePerSite: 24,\n /** Distinct per-site environment inputs once the site index and integration ID are removed. */\n maximumEnvironmentTemplates: 256,\n /** Distinct photo-signal identity/evidence records once per-site numbers are removed. */\n maximumPhotoTemplates: 256\n});\n\n/** Optional request on NativeEnvironmentRawInput to keep the optical stage. The byte budget covers the typed-array storage described by the limits. */\nexport interface NativeEnvironmentOpticalStageRetention {\n maximumRetainedBytes: number;\n}\n\n/**\n * Opaque, engine-owned optical-stage result. It is valid only for captures whose optical binding and every\n * site's environment input are strictly equal to those that produced it. dispose() zeroes and releases the\n * storage; a disposed stage refuses every later use.\n */\nexport interface NativeEnvironmentOpticalStage {\n readonly kind: \"native-environment-optical-stage\";\n readonly pixelCount: number;\n readonly temporalSampleCount: number;\n /** Typed-array bytes held: pixelCount × (fixedBytesPerSite + bytesPerTemporalSamplePerSite × temporalSampleCount). */\n readonly retainedBytes: number;\n /** Radiance callbacks the producing task executed; reuse executes none. */\n readonly providerEvaluationCount: number;\n readonly disposed: boolean;\n dispose(): void;\n}\n\n/** Input for a post-optics re-run. `raw` may differ from the original capture only in post-optics fields. */\nexport interface NativeEnvironmentSensorStageInput {\n raw: NativeRawInput;\n sceneBinding: SimulateEnvironmentSensorRawFrameInput[\"sceneBinding\"];\n}\n/** Supplies the same physical site inputs as the original capture. Environments must equal the retained ones exactly. */\nexport interface NativeEnvironmentSensorStageProvider {\n readTile(request: Readonly<NativeRawTileRequest>, signal: AbortSignal): Promise<{ captureId: string; frameId: string; x: number; y: number;\n width: number; height: number; sites: SimulateEnvironmentSensorRawFrameInput[\"sites\"] }>;\n yieldControl(signal: AbortSignal): Promise<void>;\n}\n\nconst FIXED_VALUES = 7;\nconst ENVIRONMENT_SHARED_KEYS = [\"sceneBindings\", \"optics\", \"motion\", \"psf\", \"pupil\", \"fieldThroughput\"] as const;\n\nfunction canonical(value: unknown): string {\n return stringifyCanonicalJson(value, { undefinedObjectProperties: \"omit\", nonFiniteNumberMessage: \"Invalid native scene binding.\",\n unsupportedValueMessage: \"Invalid native scene binding.\" });\n}\n\nfunction isPlainRecord(value: object): boolean {\n const prototype = Object.getPrototypeOf(value);\n return prototype === Object.prototype || prototype === null;\n}\n\n/**\n * Strict structural equality of plain data: Object.is for primitives (so 0 and -0 differ), identical own\n * key sets, arrays element by element. Anything that is not a plain record or array is unequal unless it is\n * the same reference, so an unexpected value refuses reuse instead of being treated as equal.\n */\nfunction strictlyEqual(a: unknown, b: unknown, verified: WeakMap<object, WeakSet<object>>, skip?: ReadonlySet<string>): boolean {\n if (Object.is(a, b)) return true;\n if (typeof a !== \"object\" || typeof b !== \"object\" || a === null || b === null) return false;\n if (!skip && verified.get(a)?.has(b)) return true;\n if (Array.isArray(a)) {\n if (!Array.isArray(b) || a.length !== b.length) return false;\n for (let i = 0; i < a.length; i++) {\n if (!(i in a) || !(i in b) || !strictlyEqual(a[i], b[i], verified)) return false;\n }\n } else {\n if (Array.isArray(b) || !isPlainRecord(a) || !isPlainRecord(b)) return false;\n const ak = Object.keys(a), bk = Object.keys(b);\n if (ak.length !== bk.length || Object.getOwnPropertySymbols(a).length !== 0 || Object.getOwnPropertySymbols(b).length !== 0) return false;\n for (const key of ak) {\n if (!Object.prototype.hasOwnProperty.call(b, key)) return false;\n if (skip?.has(key)) continue;\n if (!strictlyEqual((a as Record<string, unknown>)[key], (b as Record<string, unknown>)[key], verified)) return false;\n }\n }\n if (!skip) {\n let set = verified.get(a);\n if (!set) verified.set(a, set = new WeakSet());\n set.add(b);\n }\n return true;\n}\n\n/**\n * Environment equality except the two per-site fields that are bound to the absolute native index and\n * checked separately: temporalIntegrationId and sensor.spatialSampling.site.\n */\nfunction environmentMatches(e: SiteEnvironment, t: SiteEnvironment, verified: WeakMap<object, WeakSet<object>>): boolean {\n if (typeof e !== \"object\" || e === null || typeof e.sensor !== \"object\" || e.sensor === null ||\n typeof e.sensor.spatialSampling !== \"object\" || e.sensor.spatialSampling === null) return false;\n return strictlyEqual(e, t, verified, new Set([\"temporalIntegrationId\", \"sensor\"])) &&\n strictlyEqual(e.sensor, t.sensor, verified, new Set([\"spatialSampling\"])) &&\n strictlyEqual(e.sensor.spatialSampling, t.sensor.spatialSampling, verified, new Set([\"site\"]));\n}\n\n/**\n * Post-optics capture fields: noise seed/realization/model, ISO metadata, white-balance intent, adopted white,\n * capture identity, source artifact metadata and declared models. The optical stage never reads them.\n * Everything else in the normalized plan (scene state/time, geometry including orientation, focal length,\n * aperture, shutter, focus, frame/mode/CFA/binding profiles and the exposure window) is part of the binding.\n */\nfunction opticalBinding(plan: NativeRawPlan, sceneBinding: unknown): unknown {\n const { captureId, noise, source, whiteBalanceIntent, adoptedWhiteXyz, models, exposure, ...capture } = plan.exposure;\n void captureId; void noise; void source; void whiteBalanceIntent; void adoptedWhiteXyz; void models;\n const { iso, ...opticalExposure } = exposure; void iso;\n const { capture: frameCapture, ...frame } = plan.frame; void frameCapture;\n return { capture: { ...capture, exposure: opticalExposure }, frame, exposureWindow: plan.exposureWindow ?? null, sceneBinding };\n}\n\ninterface OpticalStageState {\n pixelCount: number;\n nativeWidth: number;\n frameId: string;\n stride: number;\n temporalSampleCount: number;\n binding: unknown;\n values: Float64Array;\n environmentIndex: Uint8Array;\n photoIndex: Uint8Array;\n environments: SiteEnvironment[];\n photoTemplates: Record<string, unknown>[];\n providerEvaluationCount: number;\n disposed: boolean;\n}\nconst STAGES = new WeakMap<object, OpticalStageState>();\n\nfunction release(state: OpticalStageState): void {\n state.values.fill(0); state.environmentIndex.fill(0); state.photoIndex.fill(0);\n state.values = new Float64Array(0); state.environmentIndex = new Uint8Array(0); state.photoIndex = new Uint8Array(0);\n state.environments = []; state.photoTemplates = []; state.disposed = true;\n}\n\nfunction photoTemplate(p: SensorEqeTemporalPhotoSignal): Record<string, unknown> {\n const { temporalIntegrationId, site, startOffsetSecondsFromOpeningReference, endOffsetSecondsFromOpeningReference,\n localExposureDurationSeconds, expectedIncidentPhotonCount, expectedGeneratedElectronCount, temporalSamples, ...rest } = p;\n void temporalIntegrationId; void site; void startOffsetSecondsFromOpeningReference; void endOffsetSecondsFromOpeningReference;\n void localExposureDurationSeconds; void expectedIncidentPhotonCount; void expectedGeneratedElectronCount; void temporalSamples;\n return rest;\n}\n\n/** Shared by full acquisition and reuse so the sensor stage receives an identical site record either way. */\nexport function composeNativeEnvironmentSensorSite(site: Omit<EnvironmentSite, \"environment\">, photoSignal: SensorEqeTemporalPhotoSignal): SensorRawProducerSiteInput {\n const darkCharge = calculateSensorDarkCurrentCharge({ exposure: photoSignal, darkCurrentProfile: site.darkCurrentProfile,\n operatingTemperatureC: site.operatingTemperatureC }).value;\n return { ...site.readout, charge: { ...site.charge, photoSignal, darkCharge } } as SensorRawProducerSiteInput;\n}\n\n/** Validates the optional retention request before any provider work. */\nexport function parseNativeEnvironmentOpticalStageRetention(value: unknown): NativeEnvironmentOpticalStageRetention {\n const r = requireAllowlistedRecord(value, [\"maximumRetainedBytes\"], \"Invalid optical-stage retention request.\");\n if (typeof r.maximumRetainedBytes !== \"number\" || !Number.isSafeInteger(r.maximumRetainedBytes) || r.maximumRetainedBytes < 1) {\n throw new InvalidConfigurationError(\"Optical-stage retention requires a positive safe-integer byte budget.\");\n }\n return { maximumRetainedBytes: r.maximumRetainedBytes };\n}\n\n/** Internal recorder used by createNativeEnvironmentRawTask when retention is requested. */\nexport interface NativeEnvironmentOpticalStageRecorder {\n /** Interns one planned site before any radiance callback; throws if a limit or the byte budget would be exceeded. */\n admit(index: number, environment: SiteEnvironment, sharedCanonical: string): void;\n record(index: number, photoSignal: SensorEqeTemporalPhotoSignal): void;\n finish(providerEvaluationCount: number): NativeEnvironmentOpticalStage;\n discard(): void;\n}\n\nexport function createNativeEnvironmentOpticalStageRecorder(plan: NativeRawPlan, sceneBinding: unknown,\n retention: NativeEnvironmentOpticalStageRetention): NativeEnvironmentOpticalStageRecorder {\n const L = NATIVE_ENVIRONMENT_OPTICAL_STAGE_LIMITS;\n const state: OpticalStageState = { pixelCount: plan.pixelCount, nativeWidth: plan.exposure.geometry.nativeRaster.pixelWidth,\n frameId: plan.frame.frameId, stride: 0, temporalSampleCount: 0, binding: freezeOwnedData(structuredClone(opticalBinding(plan, sceneBinding))),\n values: new Float64Array(0), environmentIndex: new Uint8Array(0), photoIndex: new Uint8Array(0), environments: [], photoTemplates: [],\n providerEvaluationCount: 0, disposed: false };\n const environmentKeys = new Map<string, number[]>(), photoKeys = new Map<string, number[]>(), verified = new WeakMap<object, WeakSet<object>>();\n const admitted = new Uint8Array(plan.pixelCount);\n let recorded = 0;\n function residualKey(e: SiteEnvironment, sharedCanonical: string): string {\n const rest: Record<string, unknown> = { ...e, temporalIntegrationId: undefined,\n sensor: { ...e.sensor, spatialSampling: { ...e.sensor.spatialSampling, site: undefined } } };\n for (const key of ENVIRONMENT_SHARED_KEYS) rest[key] = undefined;\n return sharedCanonical+\"\\u0000\"+canonical(rest);\n }\n return {\n admit(index, environment, sharedCanonical): void {\n if (state.disposed) throw new InvalidConfigurationError(\"Optical-stage retention was released.\");\n const n = environment.temporalSampleCount;\n if (state.stride === 0) {\n const bytes = plan.pixelCount*(L.fixedBytesPerSite+L.bytesPerTemporalSamplePerSite*n);\n if (!Number.isSafeInteger(bytes) || bytes > retention.maximumRetainedBytes) throw new InvalidConfigurationError(\"Optical-stage retention exceeds its byte budget.\");\n state.temporalSampleCount = n; state.stride = FIXED_VALUES+3*n;\n state.values = new Float64Array(plan.pixelCount*state.stride);\n state.environmentIndex = new Uint8Array(plan.pixelCount); state.photoIndex = new Uint8Array(plan.pixelCount);\n } else if (n !== state.temporalSampleCount) throw new InvalidConfigurationError(\"Optical-stage retention requires one temporal sample count per event.\");\n const key = residualKey(environment, sharedCanonical), candidates = environmentKeys.get(key) ?? [];\n let found = candidates.find(i => environmentMatches(environment, state.environments[i]!, verified));\n if (found === undefined) {\n if (state.environments.length >= L.maximumEnvironmentTemplates) throw new InvalidConfigurationError(\"Optical-stage retention exceeds its distinct site-environment limit.\");\n found = state.environments.length;\n state.environments.push(environment);\n candidates.push(found); environmentKeys.set(key, candidates);\n }\n state.environmentIndex[index] = found; admitted[index] = 1;\n },\n record(index, p): void {\n if (state.disposed || admitted[index] !== 1) throw new InvalidConfigurationError(\"Optical-stage retention was released or not admitted.\");\n const samples = p.temporalSamples;\n if (samples.length !== state.temporalSampleCount) throw new InvalidConfigurationError(\"Optical-stage temporal sample count changed.\");\n const template = photoTemplate(p), key = canonical(template), candidates = photoKeys.get(key) ?? [];\n let found = candidates.find(i => strictlyEqual(template, state.photoTemplates[i]!, verified));\n if (found === undefined) {\n if (state.photoTemplates.length >= L.maximumPhotoTemplates) throw new InvalidConfigurationError(\"Optical-stage retention exceeds its distinct photo-identity limit.\");\n found = state.photoTemplates.length;\n state.photoTemplates.push(freezeOwnedData(structuredClone(template)));\n candidates.push(found); photoKeys.set(key, candidates);\n }\n state.photoIndex[index] = found;\n const v = state.values, o = index*state.stride;\n v[o] = p.site.x; v[o+1] = p.site.y; v[o+2] = p.startOffsetSecondsFromOpeningReference; v[o+3] = p.endOffsetSecondsFromOpeningReference;\n v[o+4] = p.localExposureDurationSeconds; v[o+5] = p.expectedIncidentPhotonCount; v[o+6] = p.expectedGeneratedElectronCount;\n for (let t = 0; t < samples.length; t++) {\n const s = samples[t]!, q = o+FIXED_VALUES+3*t;\n v[q] = s.timeSecondsFromOpeningReference; v[q+1] = s.incidentPhotonRatePerSecond; v[q+2] = s.expectedGeneratedElectronRatePerSecond;\n }\n admitted[index] = 2; recorded++;\n },\n finish(providerEvaluationCount): NativeEnvironmentOpticalStage {\n if (state.disposed || recorded !== plan.pixelCount) throw new InvalidConfigurationError(\"Optical-stage retention is incomplete.\");\n for (const environment of state.environments) freezeOwnedData(environment);\n state.providerEvaluationCount = providerEvaluationCount;\n const handle: NativeEnvironmentOpticalStage = Object.freeze({ kind: \"native-environment-optical-stage\" as const,\n pixelCount: state.pixelCount, temporalSampleCount: state.temporalSampleCount,\n retainedBytes: state.pixelCount*(L.fixedBytesPerSite+L.bytesPerTemporalSamplePerSite*state.temporalSampleCount),\n providerEvaluationCount, get disposed(): boolean { return state.disposed; },\n dispose(): void { if (!state.disposed) release(state); } });\n STAGES.set(handle, state);\n return handle;\n },\n discard(): void { if (!state.disposed) release(state); }\n };\n}\n\n/**\n * Internal: re-runs only the sensor stage (dark charge, charge realization, capacity, seeded noise and ADC) from a retained\n * optical stage. The capture may change post-optics settings only: noise seed/realization, ISO metadata, readout\n * regime/gain, charge sampling/capacity/completeness, dark-current profile and temperature, white-balance intent,\n * capture identity and tile width. Every optical input must be strictly equal, otherwise this refuses before\n * output: the capture binding is checked here, each site's environment as its tile is read.\n */\nexport function createSensorStageRawTask<B>(input: NativeEnvironmentSensorStageInput, opticalStage: NativeEnvironmentOpticalStage,\n provider: NativeEnvironmentSensorStageProvider, parseSceneBinding: (value: unknown) => B):\n { task: ReturnType<typeof createNativeRawTask>; sceneBinding: B } {\n const state = typeof opticalStage === \"object\" && opticalStage !== null ? STAGES.get(opticalStage) : undefined;\n if (!state) throw new InvalidConfigurationError(\"Optical-stage reuse requires an engine-produced optical stage.\");\n if (state.disposed) throw new InvalidConfigurationError(\"Optical stage was disposed.\");\n const r = requireAllowlistedRecord(input, [\"raw\", \"sceneBinding\"], \"Invalid native sensor-stage input.\");\n const sceneBinding = parseSceneBinding(r.sceneBinding);\n if (!provider || typeof provider.readTile !== \"function\" || typeof provider.yieldControl !== \"function\") {\n throw new InvalidConfigurationError(\"Sensor-stage reuse requires physical site input and host yields.\");\n }\n const read = provider.readTile.bind(provider), yieldControl = provider.yieldControl.bind(provider);\n const width = state.nativeWidth, frameId = state.frameId;\n const task = createNativeRawTask(input.raw, {\n async readTile(request, signal) {\n const supplied = await read(request, signal);\n if (signal.aborted) throw new InvalidConfigurationError(\"Native sensor-stage acquisition aborted.\");\n if (state.disposed) throw new InvalidConfigurationError(\"Optical stage was disposed.\");\n const tile = requireAllowlistedRecord(supplied, [\"captureId\", \"frameId\", \"x\", \"y\", \"width\", \"height\", \"sites\"], \"Invalid physical source tile.\");\n for (const key of Object.keys(request) as (keyof NativeRawTileRequest)[]) if (tile[key] !== request[key]) throw new InvalidConfigurationError(\"Physical source tile identity mismatch.\");\n if (!Array.isArray(tile.sites) || tile.sites.length !== request.width || Array.from({ length: request.width }, (_, i) => i in (tile.sites as unknown[])).includes(false)) {\n throw new InvalidConfigurationError(\"Physical source tile needs exact native coverage.\");\n }\n // The supplied environment is only compared, in one synchronous pass, and never used: execution uses the\n // retained stage. Only the post-optics parts the sensor stage uses are cloned. The equality cache is per\n // tile, so a caller object changed between tiles is compared again.\n const tileVerified = new WeakMap<object, WeakSet<object>>();\n const suppliedSites = tile.sites as unknown[];\n const sites = structuredClone(suppliedSites.map((value, j) => {\n const site = requireAllowlistedRecord(value, [\"environment\", \"darkCurrentProfile\", \"operatingTemperatureC\", \"charge\", \"readout\"], \"Invalid physical site input.\");\n const index = request.y*width+request.x+j, e = site.environment as SiteEnvironment;\n if (typeof e !== \"object\" || e === null || !environmentMatches(e, state.environments[state.environmentIndex[index]!]!, tileVerified) ||\n e.temporalIntegrationId !== frameId+\":native:\"+index || typeof e.sensor.spatialSampling.site !== \"object\" || e.sensor.spatialSampling.site === null ||\n !strictlyEqual(e.sensor.spatialSampling.site, { x: index%width, y: Math.floor(index/width) }, tileVerified)) {\n throw new InvalidConfigurationError(\"Site environment differs from the retained optical stage; recompute the optical stage.\");\n }\n return { temporalIntegrationId: e.temporalIntegrationId, darkCurrentProfile: site.darkCurrentProfile, operatingTemperatureC: site.operatingTemperatureC,\n charge: site.charge, readout: site.readout };\n })) as (Omit<EnvironmentSite, \"environment\"> & { temporalIntegrationId: string })[];\n const photos = sites.map((site, j) => {\n const index = request.y*width+request.x+j;\n if (site.temporalIntegrationId !== frameId+\":native:\"+index) {\n throw new InvalidConfigurationError(\"Site environment differs from the retained optical stage; recompute the optical stage.\");\n }\n const v = state.values, o = index*state.stride, template = state.photoTemplates[state.photoIndex[index]!]!;\n const temporalSamples = Array.from({ length: state.temporalSampleCount }, (_, t) => {\n const q = o+FIXED_VALUES+3*t;\n return { timeSecondsFromOpeningReference: v[q]!, incidentPhotonRatePerSecond: v[q+1]!, expectedGeneratedElectronRatePerSecond: v[q+2]! };\n });\n return freezeOwnedData(parseSensorEqeTemporalPhotoSignal({ ...template, temporalIntegrationId: site.temporalIntegrationId, site: { x: v[o]!, y: v[o+1]! },\n startOffsetSecondsFromOpeningReference: v[o+2]!, endOffsetSecondsFromOpeningReference: v[o+3]!, localExposureDurationSeconds: v[o+4]!,\n expectedIncidentPhotonCount: v[o+5]!, expectedGeneratedElectronCount: v[o+6]!, temporalSamples }));\n });\n return { ...request, sites: sites.map((site, j) => composeNativeEnvironmentSensorSite(site, photos[j]!)) };\n },\n // Host yields are time-budgeted and always follow the final tile, so a stage disposed\n // while the host runs is caught here even when no further tile would be read.\n async yieldControl(signal) {\n await yieldControl(signal);\n if (state.disposed) throw new InvalidConfigurationError(\"Optical stage was disposed.\");\n }\n });\n // The task's own accepted plan is the one compared, so nothing is planned twice and no callback has run yet.\n if (!strictlyEqual(opticalBinding(task.plan, sceneBinding), state.binding, new WeakMap())) {\n task.dispose();\n throw new InvalidConfigurationError(\"Optical stage does not match this capture's optical inputs; recompute the optical stage.\");\n }\n return { task, sceneBinding };\n}\n"]}
|
|
@@ -1,21 +1,48 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Native RAW capture from a scene-radiance provider: source radiance → optics → EQE (external quantum
|
|
3
|
+
* efficiency) → packed RAW codes for the full native sensor, within fixed work limits.
|
|
4
|
+
*/
|
|
5
|
+
import { type NativeRawInput, type NativeRawOutput, type NativeRawPlan, type NativeRawTask, type NativeRawTileRequest } from "./native-raw.js";
|
|
6
|
+
import type { SensorRawProducerSiteInput } from "./sensor-raw-producer.js";
|
|
3
7
|
import { type SimulateEnvironmentSensorRawFrameInput } from "./environment-raw-producer.js";
|
|
8
|
+
import { type HostYieldCadence } from "./host-yield-cadence.js";
|
|
9
|
+
import { type NativeEnvironmentOpticalStage, type NativeEnvironmentOpticalStageRetention, type NativeEnvironmentSensorStageInput, type NativeEnvironmentSensorStageProvider } from "./native-environment-optical-stage.js";
|
|
10
|
+
import type { SceneRadianceEvaluationRequest, SceneRadianceEvaluationResult } from "../schema/scene-radiance.js";
|
|
11
|
+
import type { SensorApertureRay } from "../optics/sensor-aperture-rays.js";
|
|
4
12
|
export interface NativeEnvironmentRawInput {
|
|
5
13
|
raw: NativeRawInput;
|
|
6
14
|
sceneBinding: SimulateEnvironmentSensorRawFrameInput["sceneBinding"];
|
|
7
|
-
/**
|
|
15
|
+
/** Budget of provider calls for the whole capture, checked before work starts; at most 2 billion. Staying within it does not imply convergence. */
|
|
8
16
|
maximumProviderEvaluations: number;
|
|
17
|
+
/**
|
|
18
|
+
* Optional: keep the optical stage (per-site expected photo signal, tied to every optical input) on the
|
|
19
|
+
* output, for createNativeEnvironmentSensorStageTask. If omitted, behaviour and output shape are unchanged.
|
|
20
|
+
*/
|
|
21
|
+
opticalStage?: NativeEnvironmentOpticalStageRetention;
|
|
9
22
|
}
|
|
10
23
|
export interface NativeEnvironmentRawTile extends NativeRawTileRequest {
|
|
11
24
|
sites: SimulateEnvironmentSensorRawFrameInput["sites"];
|
|
12
25
|
}
|
|
26
|
+
/** One radiance query of a batch: the frozen provider request and, for an ideal-pupil ray, its frozen aperture ray. */
|
|
27
|
+
export interface NativeEnvironmentRadianceQuery {
|
|
28
|
+
request: Readonly<SceneRadianceEvaluationRequest>;
|
|
29
|
+
apertureRay?: Readonly<SensorApertureRay>;
|
|
30
|
+
}
|
|
13
31
|
export interface NativeEnvironmentRawProvider {
|
|
14
32
|
/** Supplies physical site profiles, not photo counts or precomputed RAW codes. */
|
|
15
33
|
readTile(request: Readonly<NativeRawTileRequest>, signal: AbortSignal): Promise<NativeEnvironmentRawTile>;
|
|
16
34
|
evaluateRadiance: SimulateEnvironmentSensorRawFrameInput["evaluateRadiance"];
|
|
17
35
|
evaluateApertureRadiance?: SimulateEnvironmentSensorRawFrameInput["evaluateApertureRadiance"];
|
|
18
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* Optional batched light sampling (2.0, additive). When present, the engine makes one call per tile instead of one
|
|
38
|
+
* evaluateRadiance or evaluateApertureRadiance call per query. `queries` holds every query of the tile's sites, in
|
|
39
|
+
* exactly the order the per-query callbacks would be made, each with the same frozen request (and aperture ray).
|
|
40
|
+
* Return one result per query, in the same order; a promise is allowed (for example a GPU readback). Each result
|
|
41
|
+
* is validated by the same parser and binding checks as a per-query result, so for the same results the output is
|
|
42
|
+
* byte-identical. The per-query evaluators stay required as the reference contract, but are not called.
|
|
43
|
+
*/
|
|
44
|
+
evaluateRadianceBatch?(queries: readonly NativeEnvironmentRadianceQuery[], signal: AbortSignal): readonly SceneRadianceEvaluationResult[] | Promise<readonly SceneRadianceEvaluationResult[]>;
|
|
45
|
+
/** Optional, bounded diagnostic callback. Counts are expected values before any noise, clipping or ADC (analogue-to-digital conversion). */
|
|
19
46
|
observePhotoTile?(tile: Readonly<NativeEnvironmentPhotoTile>, signal: AbortSignal): void | Promise<void>;
|
|
20
47
|
yieldControl(signal: AbortSignal): Promise<void>;
|
|
21
48
|
}
|
|
@@ -33,11 +60,118 @@ export interface NativeEnvironmentRawOutput {
|
|
|
33
60
|
upstreamOrigin: "executed-environment-query-provider-optics-psf-eqe";
|
|
34
61
|
providerTransportVerified: false;
|
|
35
62
|
productionPlanActivated: false;
|
|
63
|
+
/** Present only when NativeEnvironmentRawInput.opticalStage was requested. The caller owns and disposes it. */
|
|
64
|
+
opticalStage?: NativeEnvironmentOpticalStage;
|
|
36
65
|
}
|
|
37
66
|
export interface NativeEnvironmentRawTask extends Omit<NativeRawTask, "takeOutput"> {
|
|
38
67
|
readonly providerEvaluationCount: number;
|
|
39
68
|
takeOutput(): NativeEnvironmentRawOutput;
|
|
40
69
|
}
|
|
41
|
-
/**
|
|
70
|
+
/**
|
|
71
|
+
* Creates the native RAW task. Every tile is planned and checked against the limits before its radiance
|
|
72
|
+
* callbacks run, and no partial output is ever returned.
|
|
73
|
+
*
|
|
74
|
+
* The task also yields to the host between sites inside a tile once about 8 ms of work has passed (one budget
|
|
75
|
+
* shared with the tile loop). Cancellation is checked after each such yield, so cancel() takes effect within
|
|
76
|
+
* about one site's work. Yield timing never changes tile requests, limit checks, callbacks or output.
|
|
77
|
+
*/
|
|
42
78
|
export declare function createNativeEnvironmentRawTask(input: NativeEnvironmentRawInput, provider: NativeEnvironmentRawProvider): NativeEnvironmentRawTask;
|
|
43
|
-
|
|
79
|
+
/** Internal: a partition's row band, and the facts it records while running for the merge step. */
|
|
80
|
+
interface NativeEnvironmentPartitionProbe {
|
|
81
|
+
readonly rows: NativeRawRowBand;
|
|
82
|
+
/** Canonical string of the band's shared source/optical/motion state (the first site's). */
|
|
83
|
+
shared?: string;
|
|
84
|
+
/** The band's first parsed RAW site (its readout identity). */
|
|
85
|
+
firstSite?: SensorRawProducerSiteInput;
|
|
86
|
+
}
|
|
87
|
+
export declare function createNativeEnvironmentRawTaskWithCadence(input: NativeEnvironmentRawInput, provider: NativeEnvironmentRawProvider, cadence: HostYieldCadence, partition?: NativeEnvironmentPartitionProbe): NativeEnvironmentRawTask;
|
|
88
|
+
/** A band of whole native rows, [y, y + height), in absolute full-sensor coordinates. */
|
|
89
|
+
export interface NativeRawRowBand {
|
|
90
|
+
y: number;
|
|
91
|
+
height: number;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Splits a plan's native rows into at most `count` contiguous bands of nearly equal height (the first
|
|
95
|
+
* `height % count` bands are one row taller), in row order. Deterministic: it depends only on the raster height and
|
|
96
|
+
* `count`. Use one band per worker with createNativeEnvironmentRawPartitionTask.
|
|
97
|
+
*/
|
|
98
|
+
export declare function calculateNativeRawRowBands(plan: Pick<NativeRawPlan, "exposure">, count: number): NativeRawRowBand[];
|
|
99
|
+
/**
|
|
100
|
+
* One partition's result: plain data and typed arrays only, so it can be posted from a worker (transfer the four
|
|
101
|
+
* arrays' buffers). Merge every partition of a capture with composeNativeEnvironmentRawPartitions.
|
|
102
|
+
*/
|
|
103
|
+
export interface NativeEnvironmentRawPartition {
|
|
104
|
+
rows: NativeRawRowBand;
|
|
105
|
+
/** Canonical JSON of the capture input (raw, sceneBinding, maximumProviderEvaluations); the merge requires it to match. */
|
|
106
|
+
inputCanonical: string;
|
|
107
|
+
/** Canonical JSON of the band's shared source/optical/motion state; every partition must match. */
|
|
108
|
+
sharedStateCanonical: string;
|
|
109
|
+
/** Readout identity of the band's first site; every partition must match (one readout identity per frame). */
|
|
110
|
+
readoutIdentity: {
|
|
111
|
+
readoutProfileId: string;
|
|
112
|
+
regimeId: string;
|
|
113
|
+
fixedPatternProfileId: string | null;
|
|
114
|
+
fixedPatternSeedUint32: number | null;
|
|
115
|
+
};
|
|
116
|
+
/** The band's rows only, row-major, as in NativeRawOutput. */
|
|
117
|
+
codes: Uint16Array;
|
|
118
|
+
blackLevels: Uint16Array;
|
|
119
|
+
digitalSaturationCodes: Uint16Array;
|
|
120
|
+
saturationFlags: Uint8Array;
|
|
121
|
+
/** Effective white code per CFA phase; 0 for a phase the band does not contain. */
|
|
122
|
+
effectiveSaturationCodes: Uint16Array;
|
|
123
|
+
providerEvaluationCount: number;
|
|
124
|
+
}
|
|
125
|
+
export interface NativeEnvironmentRawPartitionTask extends Omit<NativeRawTask, "takeOutput"> {
|
|
126
|
+
readonly rows: NativeRawRowBand;
|
|
127
|
+
readonly providerEvaluationCount: number;
|
|
128
|
+
takeOutput(): NativeEnvironmentRawPartition;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Creates the task for one row band of a native environment capture (opt-in parallel execution, 2.0).
|
|
132
|
+
*
|
|
133
|
+
* Run one partition per worker (or one after another) with the same input, each worker using its own provider, then
|
|
134
|
+
* merge them with composeNativeEnvironmentRawPartitions. The merged output is byte-identical to the single
|
|
135
|
+
* createNativeEnvironmentRawTask output for the same input and a deterministic provider: noise seeds use absolute
|
|
136
|
+
* native indices, and tiles, plans and per-site values are those of the whole-frame task.
|
|
137
|
+
*
|
|
138
|
+
* Each partition checks the same inputs and limits before its callbacks. maximumProviderEvaluations bounds each
|
|
139
|
+
* partition's own work; the merge also rejects a total above it. Frame-wide checks that span sites (one shared
|
|
140
|
+
* state, one readout identity, one white level per CFA phase) run inside each band and again across bands in the
|
|
141
|
+
* merge. Callbacks are split across partitions, and when several partitions fail, which error is seen first depends
|
|
142
|
+
* on the caller's scheduling. Optical-stage retention is not supported in a partition.
|
|
143
|
+
*
|
|
144
|
+
* The package bundles no worker code: the caller creates workers (Web Workers or Node worker threads), runs this
|
|
145
|
+
* task inside each and posts the partition back.
|
|
146
|
+
*/
|
|
147
|
+
export declare function createNativeEnvironmentRawPartitionTask(input: NativeEnvironmentRawInput, rows: NativeRawRowBand, provider: NativeEnvironmentRawProvider): NativeEnvironmentRawPartitionTask;
|
|
148
|
+
/**
|
|
149
|
+
* Assembles the partitions of one capture into the output createNativeEnvironmentRawTask would have returned for
|
|
150
|
+
* the same input (byte-identical RAW arrays and white levels, the summed provider evaluation count).
|
|
151
|
+
*
|
|
152
|
+
* The partitions must be in row order and cover every native row exactly once, and each must come from
|
|
153
|
+
* createNativeEnvironmentRawPartitionTask with this same input. It rejects, with InvalidConfigurationError, a
|
|
154
|
+
* different input, a gap or overlap, wrong array types or lengths, a second shared state or readout identity, two
|
|
155
|
+
* white levels for one CFA phase, a missing phase, or a total evaluation count above the input's budget. It cannot
|
|
156
|
+
* verify how a partition was computed: posted partitions are the caller's own data.
|
|
157
|
+
*/
|
|
158
|
+
export declare function composeNativeEnvironmentRawPartitions(input: NativeEnvironmentRawInput, partitions: readonly NativeEnvironmentRawPartition[]): NativeEnvironmentRawOutput;
|
|
159
|
+
/**
|
|
160
|
+
* Re-runs only the sensor stage from a retained optical stage. No radiance callback is called.
|
|
161
|
+
*
|
|
162
|
+
* Use it when only post-optics settings change: noise seed, ISO and its readout regime and gain,
|
|
163
|
+
* fixed-pattern noise, charge, dark-current and capacity profiles, white-balance intent, capture identity
|
|
164
|
+
* or tile width. White balance and rendering are then applied by createNativeRawDevelopmentTask as usual.
|
|
165
|
+
*
|
|
166
|
+
* RAW codes are bit-identical to a full createNativeEnvironmentRawTask with the same final inputs, as long
|
|
167
|
+
* as the radiance provider is a deterministic function of its request.
|
|
168
|
+
*
|
|
169
|
+
* Any optical difference is rejected with InvalidConfigurationError before output. That includes scene
|
|
170
|
+
* binding, geometry or orientation, focal length, aperture, shutter or exposure window, focus,
|
|
171
|
+
* frame/CFA/binding profiles, and any site environment field such as PSF, field throughput, pupil, motion,
|
|
172
|
+
* spectral or temporal sampling and provider profiles.
|
|
173
|
+
*
|
|
174
|
+
* providerEvaluationCount is 0. The caller still owns the stage; it is not used up.
|
|
175
|
+
*/
|
|
176
|
+
export declare function createNativeEnvironmentSensorStageTask(input: NativeEnvironmentSensorStageInput, opticalStage: NativeEnvironmentOpticalStage, provider: NativeEnvironmentSensorStageProvider): NativeEnvironmentRawTask;
|
|
177
|
+
export {};
|