@photivra/engine 1.5.0 → 2.0.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 +393 -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/host-yield.d.ts +7 -0
- package/dist/facade/host-yield.js +23 -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 +284 -0
- package/dist/facade/simulate-capture.js +1026 -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 +89 -25
- package/dist/index.js +59 -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.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 +761 -2
- package/docs/QUICK_START.md +495 -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 +2213 -8
- 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 +324 -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.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 -12
- 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
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
2
|
+
* Links rolling sensor readout to electronic shutter scans, and derives the exposure schedule of a
|
|
3
|
+
* fully electronic rolling shutter.
|
|
4
|
+
*
|
|
5
|
+
* A declared link says that the readout scan and one or more exposure-boundary scans move across the
|
|
6
|
+
* sensor in the same order (or in reverse). That is deliberately weaker than time synchronization: it
|
|
7
|
+
* does not say when readout happens relative to the start or end of exposure. The total data-readout
|
|
8
|
+
* time is kept for diagnostics but never used to check the link. The readout skew and the boundary
|
|
9
|
+
* sweep times may differ; their ratio is reported without implying a shared clock.
|
|
10
10
|
* @see docs/MOTION_AND_SIGNAL.md for equations, coordinate/unit conventions, blockers and support
|
|
11
11
|
* limits.
|
|
12
12
|
*/
|
|
13
13
|
import { type CalculationProvenance, type CalculationResult } from "../core/calculation-result.js";
|
|
14
14
|
import { type EvidenceProvenance } from "../core/evidence-provenance.js";
|
|
15
15
|
import type { RasterPoint, RasterRect } from "../output/capture-geometry.js";
|
|
16
|
-
import { type ExposureBoundarySchedule, type SourcedCaptureTimingSeconds } from "./exposure-window.js";
|
|
17
|
-
import { type CaptureShutterMechanism, type NativeSensorReadoutScanDirection, type SensorReadoutTimingDeclaration, type SourcedSensorTimingSeconds } from "./readout-timing.js";
|
|
16
|
+
import { type CalculateCaptureExposureWindowsInput, type ExposureBoundarySchedule, type UniformLinearExposureBoundarySchedule, type SourcedCaptureTimingSeconds } from "./exposure-window.js";
|
|
17
|
+
import { type CaptureShutterMechanism, type NativeSensorReadoutScanDirection, type RollingSensorReadoutTimingDeclaration, type SensorReadoutTimingDeclaration, type SourcedSensorTimingSeconds } from "./readout-timing.js";
|
|
18
18
|
import type { NativeImageRaster } from "./sensor-geometry.js";
|
|
19
19
|
export type ReadoutExposureBoundaryId = "opening" | "closing";
|
|
20
20
|
export type ReadoutExposureSpatialPhaseOrientation = "same" | "reversed";
|
|
21
21
|
export interface ReadoutExposureBoundarySpatialLink {
|
|
22
22
|
boundary: ReadoutExposureBoundaryId;
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
25
|
-
* selected electronic exposure-boundary scan
|
|
24
|
+
* How the normalized position of the rolling readout scan relates to that
|
|
25
|
+
* of the selected electronic exposure-boundary scan.
|
|
26
26
|
*
|
|
27
27
|
* "same": boundary normalized phase = readout normalized phase.
|
|
28
28
|
* "reversed": boundary normalized phase = 1 - readout normalized phase.
|
|
@@ -31,24 +31,24 @@ export interface ReadoutExposureBoundarySpatialLink {
|
|
|
31
31
|
*/
|
|
32
32
|
phaseOrientation: ReadoutExposureSpatialPhaseOrientation;
|
|
33
33
|
/**
|
|
34
|
-
* Evidence
|
|
34
|
+
* Evidence for the link itself.
|
|
35
35
|
*
|
|
36
|
-
* The readout direction
|
|
37
|
-
* their own separate evidence.
|
|
36
|
+
* The readout direction and timing, and the exposure-boundary direction and
|
|
37
|
+
* timing, keep their own separate evidence.
|
|
38
38
|
*/
|
|
39
39
|
evidence: readonly EvidenceProvenance[];
|
|
40
40
|
}
|
|
41
41
|
export type ReadoutExposureTimingLinkageDeclaration = {
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* No link between readout and exposure is stated for this capture.
|
|
44
44
|
* This is not evidence that the physical processes are independent.
|
|
45
45
|
*/
|
|
46
46
|
kind: "unlinked";
|
|
47
47
|
links?: never;
|
|
48
48
|
} | {
|
|
49
49
|
/**
|
|
50
|
-
* One or more exposure boundaries are explicitly
|
|
51
|
-
* readout by normalized native
|
|
50
|
+
* One or more exposure boundaries are explicitly linked to the rolling
|
|
51
|
+
* readout by their normalized position across the native sensor.
|
|
52
52
|
*/
|
|
53
53
|
kind: "spatial-phase-linked";
|
|
54
54
|
links: readonly ReadoutExposureBoundarySpatialLink[];
|
|
@@ -73,15 +73,15 @@ export interface ReadoutExposureBoundarySpatialLinkAssessment {
|
|
|
73
73
|
readoutDirectionNative: NativeSensorReadoutScanDirection;
|
|
74
74
|
boundaryDirectionNative: NativeSensorReadoutScanDirection;
|
|
75
75
|
/**
|
|
76
|
-
*
|
|
76
|
+
* Rolling readout skew: time from the first to the last scan position.
|
|
77
77
|
*/
|
|
78
78
|
readoutSpatialSamplingSkewSeconds: SourcedSensorTimingSeconds;
|
|
79
79
|
/**
|
|
80
|
-
*
|
|
80
|
+
* Time for the exposure boundary to sweep from first to last position.
|
|
81
81
|
*/
|
|
82
82
|
boundaryTraversalDurationSeconds: SourcedCaptureTimingSeconds;
|
|
83
83
|
/**
|
|
84
|
-
*
|
|
84
|
+
* A descriptive ratio only. A value of 1 does not prove time
|
|
85
85
|
* synchronization or a common clock origin.
|
|
86
86
|
*/
|
|
87
87
|
boundaryTraversalToReadoutSpatialSkewRatio: number;
|
|
@@ -95,8 +95,8 @@ export interface ReadoutExposureTimingLinkageAssessment {
|
|
|
95
95
|
activeCaptureRect: RasterRect;
|
|
96
96
|
absoluteTemporalAlignment: "not-established";
|
|
97
97
|
/**
|
|
98
|
-
*
|
|
99
|
-
*
|
|
98
|
+
* Data-readout time for the capture. Kept for diagnostics, but never used to
|
|
99
|
+
* check an exposure-boundary link.
|
|
100
100
|
*/
|
|
101
101
|
captureReadoutDurationSeconds: SourcedSensorTimingSeconds;
|
|
102
102
|
links: readonly ReadoutExposureBoundarySpatialLinkAssessment[];
|
|
@@ -106,18 +106,87 @@ export interface ReadoutExposureTimingLinkageAssessment {
|
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
108
|
/**
|
|
109
|
-
*
|
|
110
|
-
*
|
|
109
|
+
* Checks an explicitly declared link between the rolling readout scan and one
|
|
110
|
+
* or more electronic exposure-boundary scans.
|
|
111
111
|
*
|
|
112
|
-
* This
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
* relative to exposure start/end.
|
|
112
|
+
* This is deliberately weaker than time synchronization. It can show that two
|
|
113
|
+
* schedules sweep the native sensor in the same order (or in reverse), but not
|
|
114
|
+
* when readout happens relative to the start or end of exposure.
|
|
116
115
|
*
|
|
117
|
-
* The total
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
* reported without implying a shared clock origin.
|
|
116
|
+
* The total data-readout time is kept for diagnostics and never used to check
|
|
117
|
+
* the link. The readout skew and the boundary sweep time may differ; their
|
|
118
|
+
* ratio is reported without implying a shared clock.
|
|
121
119
|
*/
|
|
122
120
|
export declare function assessReadoutExposureTimingLinkage(input: AssessReadoutExposureTimingLinkageInput): CalculationResult<ReadoutExposureTimingLinkageAssessment>;
|
|
123
|
-
|
|
121
|
+
/** Model identity of the electronic rolling-shutter (line reset → line read) exposure schedule. */
|
|
122
|
+
export declare const ELECTRONIC_ROLLING_SHUTTER_MODEL: Readonly<{
|
|
123
|
+
readonly id: "electronic-rolling-shutter-line-reset-read";
|
|
124
|
+
readonly version: "1.0.0";
|
|
125
|
+
}>;
|
|
126
|
+
export interface ResolveElectronicRollingShutterExposureScheduleInput {
|
|
127
|
+
/** Rolling readout declaration whose scan direction and spatial skew drive both exposure boundaries. */
|
|
128
|
+
readout: RollingSensorReadoutTimingDeclaration;
|
|
129
|
+
/** Per-line integration time between line reset and line read. */
|
|
130
|
+
nominalExposureDurationSeconds: SourcedCaptureTimingSeconds;
|
|
131
|
+
/**
|
|
132
|
+
* Evidence that this capture uses a fully electronic, line-by-line (rolling) shutter whose reset
|
|
133
|
+
* scan runs at the readout line rate. This explicit link is required before sensor readout timing
|
|
134
|
+
* may set the exposure-window timing.
|
|
135
|
+
*/
|
|
136
|
+
linkageEvidence: readonly EvidenceProvenance[];
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Exposure-window schedule of an electronic rolling shutter. Its `shutterMechanism`,
|
|
140
|
+
* `nominalExposureDurationSeconds`, `opening` and `closing` fields form a complete exposure schedule, so
|
|
141
|
+
* they can be passed as a native RAW / environment `exposureWindow` or spread into a production
|
|
142
|
+
* `temporalCapture.exposureWindowInput` (see {@link createRollingShutterCaptureExposureSchedule}).
|
|
143
|
+
*/
|
|
144
|
+
export interface ElectronicRollingShutterExposureSchedule {
|
|
145
|
+
modelId: typeof ELECTRONIC_ROLLING_SHUTTER_MODEL.id;
|
|
146
|
+
modelVersion: typeof ELECTRONIC_ROLLING_SHUTTER_MODEL.version;
|
|
147
|
+
shutterMechanism: "electronic";
|
|
148
|
+
nominalExposureDurationSeconds: SourcedCaptureTimingSeconds;
|
|
149
|
+
/** Line-reset scan: a native point at normalized scan position s starts integrating at s·τ. */
|
|
150
|
+
opening: UniformLinearExposureBoundarySchedule;
|
|
151
|
+
/** Line-read scan: the same point stops integrating at T + s·τ. */
|
|
152
|
+
closing: UniformLinearExposureBoundarySchedule;
|
|
153
|
+
/** Explicit linkage declaration accepted by {@link assessReadoutExposureTimingLinkage}. */
|
|
154
|
+
linkage: Extract<ReadoutExposureTimingLinkageDeclaration, {
|
|
155
|
+
kind: "spatial-phase-linked";
|
|
156
|
+
}>;
|
|
157
|
+
/** τ: offset between the first and last exposure starts (equal to the readout skew). */
|
|
158
|
+
lineScanSkewSeconds: number;
|
|
159
|
+
/** Every point integrates for exactly the nominal exposure duration T. */
|
|
160
|
+
localExposureDurationSeconds: number;
|
|
161
|
+
limitations: readonly string[];
|
|
162
|
+
}
|
|
163
|
+
/** The exposure-schedule fields of a derived rolling-shutter schedule, without model metadata. */
|
|
164
|
+
export declare function createRollingShutterCaptureExposureSchedule(schedule: ElectronicRollingShutterExposureSchedule): Pick<CalculateCaptureExposureWindowsInput, "shutterMechanism" | "nominalExposureDurationSeconds" | "opening" | "closing">;
|
|
165
|
+
/**
|
|
166
|
+
* Derives the exposure-window schedule of a fully electronic rolling shutter from its rolling readout
|
|
167
|
+
* declaration.
|
|
168
|
+
*
|
|
169
|
+
* In a CMOS rolling shutter, each line is reset, collects light for the exposure time T and is then
|
|
170
|
+
* read. The reset pointer runs T ahead of the read pointer, and both move at the line rate (El Gamal &
|
|
171
|
+
* Eltoukhy 2005; Liang, Chang & Chen 2008). With the uniform linear scan used throughout this engine, a
|
|
172
|
+
* native point at normalized scan position s ∈ [0, 1] (along the declared scan direction, over the
|
|
173
|
+
* active capture) collects light over [s·τ, s·τ + T], where τ is the declared first-to-last readout
|
|
174
|
+
* skew. So both boundaries become uniform linear scans in the readout direction that take τ to sweep.
|
|
175
|
+
*
|
|
176
|
+
* When this schedule feeds the per-site exposure windows, everything that samples motion, moving
|
|
177
|
+
* sources or time-varying light at local exposure times (environment RAW, rotation quadrature,
|
|
178
|
+
* temporal illumination integration) produces rolling-shutter skew, wobble, partial exposure and
|
|
179
|
+
* flicker banding.
|
|
180
|
+
*
|
|
181
|
+
* Approximation: constant line rate, no line-reset jitter, no hybrid of global reset with a mechanical
|
|
182
|
+
* closing shutter, and the active-capture skew is declared by the caller (never scaled from a
|
|
183
|
+
* full-frame value).
|
|
184
|
+
* @see docs/MOTION_AND_SIGNAL.md#electronic-rolling-shutter-image-formation
|
|
185
|
+
*/
|
|
186
|
+
export declare function resolveElectronicRollingShutterExposureSchedule(input: ResolveElectronicRollingShutterExposureScheduleInput): ElectronicRollingShutterExposureSchedule;
|
|
187
|
+
/**
|
|
188
|
+
* True when an exposure schedule is exactly the electronic rolling-shutter schedule derived from this
|
|
189
|
+
* readout declaration: an electronic mechanism, with both boundaries scanning in the readout direction
|
|
190
|
+
* and taking the readout skew to sweep.
|
|
191
|
+
*/
|
|
192
|
+
export declare function isElectronicRollingShutterExposureSchedule(schedule: Pick<CalculateCaptureExposureWindowsInput, "shutterMechanism" | "opening" | "closing">, readout: SensorReadoutTimingDeclaration): boolean;
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
3
|
+
* Links rolling sensor readout to electronic shutter scans, and derives the exposure schedule of a
|
|
4
|
+
* fully electronic rolling shutter.
|
|
5
|
+
*
|
|
6
|
+
* A declared link says that the readout scan and one or more exposure-boundary scans move across the
|
|
7
|
+
* sensor in the same order (or in reverse). That is deliberately weaker than time synchronization: it
|
|
8
|
+
* does not say when readout happens relative to the start or end of exposure. The total data-readout
|
|
9
|
+
* time is kept for diagnostics but never used to check the link. The readout skew and the boundary
|
|
10
|
+
* sweep times may differ; their ratio is reported without implying a shared clock.
|
|
11
11
|
* @see docs/MOTION_AND_SIGNAL.md for equations, coordinate/unit conventions, blockers and support
|
|
12
12
|
* limits.
|
|
13
13
|
*/
|
|
14
14
|
import { approximationResult } from "../core/calculation-result.js";
|
|
15
15
|
import { parseEvidenceList } from "../core/evidence-provenance.js";
|
|
16
16
|
import { InvalidScientificInputError } from "../core/validation.js";
|
|
17
|
-
import { calculateCaptureExposureWindows } from "./exposure-window.js";
|
|
17
|
+
import { calculateCaptureExposureWindows, parseBoundarySchedule, parseSecondsFact } from "./exposure-window.js";
|
|
18
18
|
import { calculateSensorReadoutTiming } from "./readout-timing.js";
|
|
19
|
+
import { requireInputKeys, rejectUnknownFields } from "../core/record-validation.js";
|
|
20
|
+
import { InvalidConfigurationError } from "../core/configuration-error.js";
|
|
19
21
|
const BOUNDARIES = new Set([
|
|
20
22
|
"opening",
|
|
21
23
|
"closing"
|
|
@@ -24,21 +26,23 @@ const PHASE_ORIENTATIONS = new Set([
|
|
|
24
26
|
"same",
|
|
25
27
|
"reversed"
|
|
26
28
|
]);
|
|
27
|
-
function requireRecord(value, path) {
|
|
29
|
+
function requireRecord(value, path, allowedKeys) {
|
|
28
30
|
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
29
|
-
throw new
|
|
31
|
+
throw new InvalidConfigurationError(path + " must be an object.");
|
|
30
32
|
}
|
|
33
|
+
if (allowedKeys !== null)
|
|
34
|
+
rejectUnknownFields(value, allowedKeys, path);
|
|
31
35
|
return value;
|
|
32
36
|
}
|
|
33
37
|
function parseSpatialLink(value, path) {
|
|
34
|
-
const record = requireRecord(value, path);
|
|
38
|
+
const record = requireRecord(value, path, ["boundary", "phaseOrientation", "evidence"]);
|
|
35
39
|
if (typeof record.boundary !== "string" ||
|
|
36
40
|
!BOUNDARIES.has(record.boundary)) {
|
|
37
|
-
throw new
|
|
41
|
+
throw new InvalidConfigurationError(path + ".boundary is invalid.");
|
|
38
42
|
}
|
|
39
43
|
if (typeof record.phaseOrientation !== "string" ||
|
|
40
44
|
!PHASE_ORIENTATIONS.has(record.phaseOrientation)) {
|
|
41
|
-
throw new
|
|
45
|
+
throw new InvalidConfigurationError(path + ".phaseOrientation is invalid.");
|
|
42
46
|
}
|
|
43
47
|
return {
|
|
44
48
|
boundary: record.boundary,
|
|
@@ -47,7 +51,7 @@ function parseSpatialLink(value, path) {
|
|
|
47
51
|
};
|
|
48
52
|
}
|
|
49
53
|
function parseLinkageDeclaration(value) {
|
|
50
|
-
const record = requireRecord(value, "linkage");
|
|
54
|
+
const record = requireRecord(value, "linkage", ["kind", "links"]);
|
|
51
55
|
if (record.kind === "unlinked") {
|
|
52
56
|
if (record.links !== undefined) {
|
|
53
57
|
throw new InvalidScientificInputError("linkage.links must be omitted when linkage.kind is unlinked.");
|
|
@@ -55,10 +59,10 @@ function parseLinkageDeclaration(value) {
|
|
|
55
59
|
return { kind: "unlinked" };
|
|
56
60
|
}
|
|
57
61
|
if (record.kind !== "spatial-phase-linked") {
|
|
58
|
-
throw new
|
|
62
|
+
throw new InvalidConfigurationError("linkage.kind is invalid.");
|
|
59
63
|
}
|
|
60
64
|
if (!Array.isArray(record.links) || record.links.length === 0) {
|
|
61
|
-
throw new
|
|
65
|
+
throw new InvalidConfigurationError("linkage.links must be a non-empty array for spatial-phase-linked linkage.");
|
|
62
66
|
}
|
|
63
67
|
const links = record.links.map((entry, index) => parseSpatialLink(entry, "linkage.links[" + index + "]"));
|
|
64
68
|
const seen = new Set();
|
|
@@ -91,20 +95,19 @@ function expectedBoundaryDirection(readoutDirection, phaseOrientation) {
|
|
|
91
95
|
: oppositeDirection(readoutDirection);
|
|
92
96
|
}
|
|
93
97
|
/**
|
|
94
|
-
*
|
|
95
|
-
*
|
|
98
|
+
* Checks an explicitly declared link between the rolling readout scan and one
|
|
99
|
+
* or more electronic exposure-boundary scans.
|
|
96
100
|
*
|
|
97
|
-
* This
|
|
98
|
-
*
|
|
99
|
-
*
|
|
100
|
-
* relative to exposure start/end.
|
|
101
|
+
* This is deliberately weaker than time synchronization. It can show that two
|
|
102
|
+
* schedules sweep the native sensor in the same order (or in reverse), but not
|
|
103
|
+
* when readout happens relative to the start or end of exposure.
|
|
101
104
|
*
|
|
102
|
-
* The total
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
* reported without implying a shared clock origin.
|
|
105
|
+
* The total data-readout time is kept for diagnostics and never used to check
|
|
106
|
+
* the link. The readout skew and the boundary sweep time may differ; their
|
|
107
|
+
* ratio is reported without implying a shared clock.
|
|
106
108
|
*/
|
|
107
109
|
export function assessReadoutExposureTimingLinkage(input) {
|
|
110
|
+
requireInputKeys(input, "assessReadoutExposureTimingLinkage", ["nativeRaster", "activeCaptureRect", "shutterMechanism", "readout", "nominalExposureDurationSeconds", "opening", "closing", "linkage", "samplePointsNative"]);
|
|
108
111
|
const linkage = parseLinkageDeclaration(input.linkage);
|
|
109
112
|
const sensorReadout = calculateSensorReadoutTiming({
|
|
110
113
|
nativeRaster: input.nativeRaster,
|
|
@@ -219,4 +222,99 @@ export function assessReadoutExposureTimingLinkage(input) {
|
|
|
219
222
|
"No camera-specific timing relationship is inferred from shutter mechanism, sensor architecture metadata, output resolution or adjacent specifications."
|
|
220
223
|
]);
|
|
221
224
|
}
|
|
225
|
+
/** Model identity of the electronic rolling-shutter (line reset → line read) exposure schedule. */
|
|
226
|
+
export const ELECTRONIC_ROLLING_SHUTTER_MODEL = Object.freeze({
|
|
227
|
+
id: "electronic-rolling-shutter-line-reset-read",
|
|
228
|
+
version: "1.0.0"
|
|
229
|
+
});
|
|
230
|
+
/** The exposure-schedule fields of a derived rolling-shutter schedule, without model metadata. */
|
|
231
|
+
export function createRollingShutterCaptureExposureSchedule(schedule) {
|
|
232
|
+
// 2.0.0: the whole schedule is checked, so an unknown field at any level is rejected.
|
|
233
|
+
const record = requireRecord(schedule, "rollingShutterSchedule", ["modelId", "modelVersion", "shutterMechanism",
|
|
234
|
+
"nominalExposureDurationSeconds", "opening", "closing", "linkage", "lineScanSkewSeconds", "localExposureDurationSeconds",
|
|
235
|
+
"limitations"]);
|
|
236
|
+
parseSecondsFact(record.nominalExposureDurationSeconds, "rollingShutterSchedule.nominalExposureDurationSeconds");
|
|
237
|
+
parseBoundarySchedule(record.opening, "rollingShutterSchedule.opening");
|
|
238
|
+
parseBoundarySchedule(record.closing, "rollingShutterSchedule.closing");
|
|
239
|
+
if (record.linkage !== undefined)
|
|
240
|
+
parseLinkageDeclaration(record.linkage);
|
|
241
|
+
return structuredClone({ shutterMechanism: schedule.shutterMechanism,
|
|
242
|
+
nominalExposureDurationSeconds: schedule.nominalExposureDurationSeconds,
|
|
243
|
+
opening: schedule.opening, closing: schedule.closing });
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Derives the exposure-window schedule of a fully electronic rolling shutter from its rolling readout
|
|
247
|
+
* declaration.
|
|
248
|
+
*
|
|
249
|
+
* In a CMOS rolling shutter, each line is reset, collects light for the exposure time T and is then
|
|
250
|
+
* read. The reset pointer runs T ahead of the read pointer, and both move at the line rate (El Gamal &
|
|
251
|
+
* Eltoukhy 2005; Liang, Chang & Chen 2008). With the uniform linear scan used throughout this engine, a
|
|
252
|
+
* native point at normalized scan position s ∈ [0, 1] (along the declared scan direction, over the
|
|
253
|
+
* active capture) collects light over [s·τ, s·τ + T], where τ is the declared first-to-last readout
|
|
254
|
+
* skew. So both boundaries become uniform linear scans in the readout direction that take τ to sweep.
|
|
255
|
+
*
|
|
256
|
+
* When this schedule feeds the per-site exposure windows, everything that samples motion, moving
|
|
257
|
+
* sources or time-varying light at local exposure times (environment RAW, rotation quadrature,
|
|
258
|
+
* temporal illumination integration) produces rolling-shutter skew, wobble, partial exposure and
|
|
259
|
+
* flicker banding.
|
|
260
|
+
*
|
|
261
|
+
* Approximation: constant line rate, no line-reset jitter, no hybrid of global reset with a mechanical
|
|
262
|
+
* closing shutter, and the active-capture skew is declared by the caller (never scaled from a
|
|
263
|
+
* full-frame value).
|
|
264
|
+
* @see docs/MOTION_AND_SIGNAL.md#electronic-rolling-shutter-image-formation
|
|
265
|
+
*/
|
|
266
|
+
export function resolveElectronicRollingShutterExposureSchedule(input) {
|
|
267
|
+
requireInputKeys(input, "resolveElectronicRollingShutterExposureSchedule", ["readout", "nominalExposureDurationSeconds", "linkageEvidence"]);
|
|
268
|
+
// The input keys are checked above; calculateSensorReadoutTiming checks the readout's own fields.
|
|
269
|
+
const record = requireRecord(input, "rollingShutter", null);
|
|
270
|
+
const readout = requireRecord(record.readout, "rollingShutter.readout", null);
|
|
271
|
+
if (readout.readoutMode !== "rolling") {
|
|
272
|
+
throw new InvalidScientificInputError("An electronic rolling-shutter exposure schedule requires a rolling sensor readout declaration.");
|
|
273
|
+
}
|
|
274
|
+
const linkageEvidence = parseEvidenceList(input.linkageEvidence, "rollingShutter.linkageEvidence");
|
|
275
|
+
const rolling = input.readout;
|
|
276
|
+
// Check the declaration and the exposure fact with the existing readout and exposure-window calculators.
|
|
277
|
+
const probeRaster = { pixelWidth: 2, pixelHeight: 2 };
|
|
278
|
+
calculateSensorReadoutTiming({ nativeRaster: probeRaster, shutterMechanism: "electronic", readout: rolling });
|
|
279
|
+
const opening = {
|
|
280
|
+
kind: "uniform-linear-native-scan",
|
|
281
|
+
directionNative: { value: rolling.scanDirectionNative.value, evidence: [...rolling.scanDirectionNative.evidence] },
|
|
282
|
+
traversalDurationSeconds: { value: rolling.spatialSamplingSkewSeconds.value, unit: "s",
|
|
283
|
+
evidence: [...rolling.spatialSamplingSkewSeconds.evidence] }
|
|
284
|
+
};
|
|
285
|
+
const closing = structuredClone(opening);
|
|
286
|
+
const nominal = calculateCaptureExposureWindows({ nativeRaster: probeRaster, shutterMechanism: "electronic",
|
|
287
|
+
nominalExposureDurationSeconds: input.nominalExposureDurationSeconds, opening, closing }).value.nominalExposureDurationSeconds;
|
|
288
|
+
return {
|
|
289
|
+
modelId: ELECTRONIC_ROLLING_SHUTTER_MODEL.id,
|
|
290
|
+
modelVersion: ELECTRONIC_ROLLING_SHUTTER_MODEL.version,
|
|
291
|
+
shutterMechanism: "electronic",
|
|
292
|
+
nominalExposureDurationSeconds: { value: nominal.value, unit: "s", evidence: [...nominal.evidence] },
|
|
293
|
+
opening,
|
|
294
|
+
closing,
|
|
295
|
+
linkage: { kind: "spatial-phase-linked", links: [
|
|
296
|
+
{ boundary: "opening", phaseOrientation: "same", evidence: linkageEvidence },
|
|
297
|
+
{ boundary: "closing", phaseOrientation: "same", evidence: linkageEvidence }
|
|
298
|
+
] },
|
|
299
|
+
lineScanSkewSeconds: rolling.spatialSamplingSkewSeconds.value,
|
|
300
|
+
localExposureDurationSeconds: nominal.value,
|
|
301
|
+
limitations: [
|
|
302
|
+
"Uniform-linear line timing: each native point integrates over [s·τ, s·τ + T] with s its normalized scan position.",
|
|
303
|
+
"Line-reset jitter, non-uniform line timing, global-reset release and mechanical-close hybrids are not modeled.",
|
|
304
|
+
"The skew τ is the caller-declared active-capture spatial sampling skew; it is never scaled from a full-frame value."
|
|
305
|
+
]
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* True when an exposure schedule is exactly the electronic rolling-shutter schedule derived from this
|
|
310
|
+
* readout declaration: an electronic mechanism, with both boundaries scanning in the readout direction
|
|
311
|
+
* and taking the readout skew to sweep.
|
|
312
|
+
*/
|
|
313
|
+
export function isElectronicRollingShutterExposureSchedule(schedule, readout) {
|
|
314
|
+
if (readout.readoutMode !== "rolling" || schedule.shutterMechanism !== "electronic")
|
|
315
|
+
return false;
|
|
316
|
+
return [schedule.opening, schedule.closing].every((boundary) => boundary.kind === "uniform-linear-native-scan" &&
|
|
317
|
+
boundary.directionNative.value === readout.scanDirectionNative.value &&
|
|
318
|
+
boundary.traversalDurationSeconds.value === readout.spatialSamplingSkewSeconds.value);
|
|
319
|
+
}
|
|
222
320
|
//# sourceMappingURL=readout-exposure-linkage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readout-exposure-linkage.js","sourceRoot":"","sources":["../../src/sensor/readout-exposure-linkage.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,mBAAmB,EAGpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,iBAAiB,EAElB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAEpE,OAAO,EACL,+BAA+B,EAGhC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,4BAA4B,EAK7B,MAAM,qBAAqB,CAAC;AA6G7B,MAAM,UAAU,GAAG,IAAI,GAAG,CAA4B;IACpD,SAAS;IACT,SAAS;CACV,CAAC,CAAC;AAEH,MAAM,kBAAkB,GACtB,IAAI,GAAG,CAAyC;IAC9C,MAAM;IACN,UAAU;CACX,CAAC,CAAC;AAEL,SAAS,aAAa,CAAC,KAAc,EAAE,IAAY;IACjD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,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,EAC3B,aAAa,CAAC,KAAK,CAAC,6BAA6B;QACnD,KAAK,EAAE,WAAW;QAClB,mBAAmB,EAAE;YACnB,aAAa,EAAE,aAAa,CAAC,UAAU;YACvC,eAAe,EAAE,eAAe,CAAC,UAAU;SAC5C;KACF,EACD,kCAAkC,EAClC,OAAO,EACP;QACE,mHAAmH;QACnH,gIAAgI;QAChI,4FAA4F;QAC5F,2JAA2J;QAC3J,4JAA4J;QAC5J,yFAAyF;QACzF,iJAAiJ;QACjJ,yIAAyI;QACzI,wJAAwJ;KACzJ,CACF,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"readout-exposure-linkage.js","sourceRoot":"","sources":["../../src/sensor/readout-exposure-linkage.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,mBAAmB,EAGpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,iBAAiB,EAElB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAEpE,OAAO,EACL,+BAA+B,EAC/B,qBAAqB,EACrB,gBAAgB,EAKjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,4BAA4B,EAM7B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AA4G3E,MAAM,UAAU,GAAG,IAAI,GAAG,CAA4B;IACpD,SAAS;IACT,SAAS;CACV,CAAC,CAAC;AAEH,MAAM,kBAAkB,GACtB,IAAI,GAAG,CAAyC;IAC9C,MAAM;IACN,UAAU;CACX,CAAC,CAAC;AAEL,SAAS,aAAa,CACpB,KAAc,EACd,IAAY,EACZ,WAAqC;IAErC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,CAAC,OAAO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C,KAAK;QAC7D,4BAA4B,EAAE,OAAO,CAAC,KAAK;QAC3C,WAAW,EAAE;YACX,mHAAmH;YACnH,gHAAgH;YAChH,qHAAqH;SACtH;KACF,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,0CAA0C,CACxD,QAAgG,EAChG,OAAuC;IAEvC,IAAI,OAAO,CAAC,WAAW,KAAK,SAAS,IAAI,QAAQ,CAAC,gBAAgB,KAAK,YAAY;QAAE,OAAO,KAAK,CAAC;IAClG,OAAO,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,KAAK,4BAA4B;QAC5G,QAAQ,CAAC,eAAe,CAAC,KAAK,KAAK,OAAO,CAAC,mBAAmB,CAAC,KAAK;QACpE,QAAQ,CAAC,wBAAwB,CAAC,KAAK,KAAK,OAAO,CAAC,0BAA0B,CAAC,KAAK,CAAC,CAAC;AAC1F,CAAC","sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\n/**\n * Links rolling sensor readout to electronic shutter scans, and derives the exposure schedule of a\n * fully electronic rolling shutter.\n *\n * A declared link says that the readout scan and one or more exposure-boundary scans move across the\n * sensor in the same order (or in reverse). That is deliberately weaker than time synchronization: it\n * does not say when readout happens relative to the start or end of exposure. The total data-readout\n * time is kept for diagnostics but never used to check the link. The readout skew and the boundary\n * sweep times may differ; their ratio is reported without implying a shared clock.\n * @see docs/MOTION_AND_SIGNAL.md for equations, coordinate/unit conventions, blockers and support\n * limits.\n */\n\nimport {\n approximationResult,\n type CalculationProvenance,\n type CalculationResult\n} from \"../core/calculation-result.js\";\nimport {\n parseEvidenceList,\n type EvidenceProvenance\n} from \"../core/evidence-provenance.js\";\nimport { InvalidScientificInputError } from \"../core/validation.js\";\nimport type { RasterPoint, RasterRect } from \"../output/capture-geometry.js\";\nimport {\n calculateCaptureExposureWindows,\n parseBoundarySchedule,\n parseSecondsFact,\n type CalculateCaptureExposureWindowsInput,\n type ExposureBoundarySchedule,\n type UniformLinearExposureBoundarySchedule,\n type SourcedCaptureTimingSeconds\n} from \"./exposure-window.js\";\nimport {\n calculateSensorReadoutTiming,\n type CaptureShutterMechanism,\n type NativeSensorReadoutScanDirection,\n type RollingSensorReadoutTimingDeclaration,\n type SensorReadoutTimingDeclaration,\n type SourcedSensorTimingSeconds\n} from \"./readout-timing.js\";\nimport type { NativeImageRaster } from \"./sensor-geometry.js\";\nimport { requireInputKeys, rejectUnknownFields } from \"../core/record-validation.js\";\nimport { InvalidConfigurationError } from \"../core/configuration-error.js\";\n\nexport type ReadoutExposureBoundaryId = \"opening\" | \"closing\";\n\nexport type ReadoutExposureSpatialPhaseOrientation =\n | \"same\"\n | \"reversed\";\n\nexport interface ReadoutExposureBoundarySpatialLink {\n boundary: ReadoutExposureBoundaryId;\n /**\n * How the normalized position of the rolling readout scan relates to that\n * of the selected electronic exposure-boundary scan.\n *\n * \"same\": boundary normalized phase = readout normalized phase.\n * \"reversed\": boundary normalized phase = 1 - readout normalized phase.\n *\n * This does not establish absolute temporal synchronization.\n */\n phaseOrientation: ReadoutExposureSpatialPhaseOrientation;\n /**\n * Evidence for the link itself.\n *\n * The readout direction and timing, and the exposure-boundary direction and\n * timing, keep their own separate evidence.\n */\n evidence: readonly EvidenceProvenance[];\n}\n\nexport type ReadoutExposureTimingLinkageDeclaration =\n | {\n /**\n * No link between readout and exposure is stated for this capture.\n * This is not evidence that the physical processes are independent.\n */\n kind: \"unlinked\";\n links?: never;\n }\n | {\n /**\n * One or more exposure boundaries are explicitly linked to the rolling\n * readout by their normalized position across the native sensor.\n */\n kind: \"spatial-phase-linked\";\n links: readonly ReadoutExposureBoundarySpatialLink[];\n };\n\nexport interface AssessReadoutExposureTimingLinkageInput {\n nativeRaster: NativeImageRaster;\n activeCaptureRect?: RasterRect;\n shutterMechanism: CaptureShutterMechanism;\n readout: SensorReadoutTimingDeclaration;\n nominalExposureDurationSeconds: SourcedCaptureTimingSeconds;\n opening: ExposureBoundarySchedule;\n closing: ExposureBoundarySchedule;\n linkage: ReadoutExposureTimingLinkageDeclaration;\n samplePointsNative?: readonly RasterPoint[];\n}\n\nexport interface ReadoutExposureBoundarySpatialLinkAssessment {\n boundary: ReadoutExposureBoundaryId;\n boundaryActuator: \"electronic\";\n phaseOrientation: ReadoutExposureSpatialPhaseOrientation;\n normalizedPhaseRelationship:\n | \"boundary-phase-equals-readout-phase\"\n | \"boundary-phase-equals-one-minus-readout-phase\";\n relationshipEvidence: readonly EvidenceProvenance[];\n readoutDirectionNative: NativeSensorReadoutScanDirection;\n boundaryDirectionNative: NativeSensorReadoutScanDirection;\n /**\n * Rolling readout skew: time from the first to the last scan position.\n */\n readoutSpatialSamplingSkewSeconds: SourcedSensorTimingSeconds;\n /**\n * Time for the exposure boundary to sweep from first to last position.\n */\n boundaryTraversalDurationSeconds: SourcedCaptureTimingSeconds;\n /**\n * A descriptive ratio only. A value of 1 does not prove time\n * synchronization or a common clock origin.\n */\n boundaryTraversalToReadoutSpatialSkewRatio: number;\n absoluteTemporalAlignment: \"not-established\";\n}\n\nexport interface ReadoutExposureTimingLinkageAssessment {\n linkageKind: ReadoutExposureTimingLinkageDeclaration[\"kind\"];\n relationshipMeaning:\n | \"no-readout-exposure-relationship-asserted\"\n | \"normalized-spatial-phase-relationship-asserted\";\n readoutMode: \"rolling\" | \"global\";\n shutterMechanism: CaptureShutterMechanism;\n activeCaptureRect: RasterRect;\n absoluteTemporalAlignment: \"not-established\";\n /**\n * Data-readout time for the capture. Kept for diagnostics, but never used to\n * check an exposure-boundary link.\n */\n captureReadoutDurationSeconds: SourcedSensorTimingSeconds;\n links: readonly ReadoutExposureBoundarySpatialLinkAssessment[];\n componentProvenance: {\n sensorReadout: CalculationProvenance;\n exposureWindows: CalculationProvenance;\n };\n}\n\ntype UnknownRecord = Record<string, unknown>;\n\nconst BOUNDARIES = new Set<ReadoutExposureBoundaryId>([\n \"opening\",\n \"closing\"\n]);\n\nconst PHASE_ORIENTATIONS =\n new Set<ReadoutExposureSpatialPhaseOrientation>([\n \"same\",\n \"reversed\"\n ]);\n\nfunction requireRecord(\n value: unknown,\n path: string,\n allowedKeys: readonly string[] | null\n): UnknownRecord {\n if (typeof value !== \"object\" || value === null || Array.isArray(value)) {\n throw new InvalidConfigurationError(path + \" must be an object.\");\n }\n if (allowedKeys !== null) rejectUnknownFields(value, allowedKeys, path);\n return value as UnknownRecord;\n}\n\nfunction parseSpatialLink(\n value: unknown,\n path: string\n): ReadoutExposureBoundarySpatialLink {\n const record = requireRecord(value, path, [\"boundary\", \"phaseOrientation\", \"evidence\"]);\n\n if (\n typeof record.boundary !== \"string\" ||\n !BOUNDARIES.has(record.boundary as ReadoutExposureBoundaryId)\n ) {\n throw new InvalidConfigurationError(path + \".boundary is invalid.\");\n }\n\n if (\n typeof record.phaseOrientation !== \"string\" ||\n !PHASE_ORIENTATIONS.has(\n record.phaseOrientation as ReadoutExposureSpatialPhaseOrientation\n )\n ) {\n throw new InvalidConfigurationError(\n path + \".phaseOrientation is invalid.\"\n );\n }\n\n return {\n boundary: record.boundary as ReadoutExposureBoundaryId,\n phaseOrientation:\n record.phaseOrientation as ReadoutExposureSpatialPhaseOrientation,\n evidence: parseEvidenceList(record.evidence, path + \".evidence\")\n };\n}\n\nfunction parseLinkageDeclaration(\n value: unknown\n): ReadoutExposureTimingLinkageDeclaration {\n const record = requireRecord(value, \"linkage\", [\"kind\", \"links\"]);\n\n if (record.kind === \"unlinked\") {\n if (record.links !== undefined) {\n throw new InvalidScientificInputError(\n \"linkage.links must be omitted when linkage.kind is unlinked.\"\n );\n }\n return { kind: \"unlinked\" };\n }\n\n if (record.kind !== \"spatial-phase-linked\") {\n throw new InvalidConfigurationError(\"linkage.kind is invalid.\");\n }\n\n if (!Array.isArray(record.links) || record.links.length === 0) {\n throw new InvalidConfigurationError(\n \"linkage.links must be a non-empty array for spatial-phase-linked linkage.\"\n );\n }\n\n const links = record.links.map((entry, index) =>\n parseSpatialLink(entry, \"linkage.links[\" + index + \"]\")\n );\n\n const seen = new Set<ReadoutExposureBoundaryId>();\n for (const link of links) {\n if (seen.has(link.boundary)) {\n throw new InvalidScientificInputError(\n \"linkage.links must not contain duplicate boundary links.\"\n );\n }\n seen.add(link.boundary);\n }\n\n return {\n kind: \"spatial-phase-linked\",\n links\n };\n}\n\nfunction oppositeDirection(\n direction: NativeSensorReadoutScanDirection\n): NativeSensorReadoutScanDirection {\n switch (direction) {\n case \"top-to-bottom\":\n return \"bottom-to-top\";\n case \"bottom-to-top\":\n return \"top-to-bottom\";\n case \"left-to-right\":\n return \"right-to-left\";\n case \"right-to-left\":\n return \"left-to-right\";\n }\n}\n\nfunction expectedBoundaryDirection(\n readoutDirection: NativeSensorReadoutScanDirection,\n phaseOrientation: ReadoutExposureSpatialPhaseOrientation\n): NativeSensorReadoutScanDirection {\n return phaseOrientation === \"same\"\n ? readoutDirection\n : oppositeDirection(readoutDirection);\n}\n\n/**\n * Checks an explicitly declared link between the rolling readout scan and one\n * or more electronic exposure-boundary scans.\n *\n * This is deliberately weaker than time synchronization. It can show that two\n * schedules sweep the native sensor in the same order (or in reverse), but not\n * when readout happens relative to the start or end of exposure.\n *\n * The total data-readout time is kept for diagnostics and never used to check\n * the link. The readout skew and the boundary sweep time may differ; their\n * ratio is reported without implying a shared clock.\n */\nexport function assessReadoutExposureTimingLinkage(\n input: AssessReadoutExposureTimingLinkageInput\n): CalculationResult<ReadoutExposureTimingLinkageAssessment> {\n requireInputKeys(input, \"assessReadoutExposureTimingLinkage\", [\"nativeRaster\", \"activeCaptureRect\", \"shutterMechanism\", \"readout\", \"nominalExposureDurationSeconds\", \"opening\", \"closing\", \"linkage\", \"samplePointsNative\"]);\n const linkage = parseLinkageDeclaration(input.linkage);\n\n const sensorReadout = calculateSensorReadoutTiming({\n nativeRaster: input.nativeRaster,\n ...(input.activeCaptureRect === undefined\n ? {}\n : { activeCaptureRect: input.activeCaptureRect }),\n shutterMechanism: input.shutterMechanism,\n readout: input.readout,\n ...(input.samplePointsNative === undefined\n ? {}\n : { samplePointsNative: input.samplePointsNative })\n });\n\n const exposureWindows = calculateCaptureExposureWindows({\n nativeRaster: input.nativeRaster,\n ...(input.activeCaptureRect === undefined\n ? {}\n : { activeCaptureRect: input.activeCaptureRect }),\n shutterMechanism: input.shutterMechanism,\n nominalExposureDurationSeconds:\n input.nominalExposureDurationSeconds,\n opening: input.opening,\n closing: input.closing,\n ...(input.samplePointsNative === undefined\n ? {}\n : { samplePointsNative: input.samplePointsNative })\n });\n\n if (linkage.kind === \"unlinked\") {\n return approximationResult(\n {\n linkageKind: \"unlinked\",\n relationshipMeaning:\n \"no-readout-exposure-relationship-asserted\",\n readoutMode: sensorReadout.value.readoutMode,\n shutterMechanism: input.shutterMechanism,\n activeCaptureRect: {\n ...sensorReadout.value.activeCaptureRect\n },\n absoluteTemporalAlignment: \"not-established\",\n captureReadoutDurationSeconds:\n sensorReadout.value.captureReadoutDurationSeconds,\n links: [],\n componentProvenance: {\n sensorReadout: sensorReadout.provenance,\n exposureWindows: exposureWindows.provenance\n }\n },\n \"readout-exposure-spatial-linkage\",\n \"1.0.0\",\n [\n \"Unlinked means Photivra asserts no readout-to-exposure relationship for this capture; it does not prove the physical processes are independent.\",\n \"Sensor data-readout timing and exposure-window timing retain independent provenance and semantics.\",\n \"Absolute temporal alignment between data readout and exposure boundaries is not established.\"\n ]\n );\n }\n\n const readoutScan = sensorReadout.value.scan;\n if (readoutScan === null) {\n throw new InvalidScientificInputError(\n \"spatial-phase-linked linkage requires rolling sensor readout with a spatial scan.\"\n );\n }\n\n const assessments =\n linkage.links.map<ReadoutExposureBoundarySpatialLinkAssessment>(\n (link) => {\n const boundary =\n link.boundary === \"opening\"\n ? exposureWindows.value.opening\n : exposureWindows.value.closing;\n\n if (boundary.actuator !== \"electronic\") {\n throw new InvalidScientificInputError(\n \"A readout spatial-phase link may target only an electronic exposure boundary.\"\n );\n }\n\n if (\n boundary.schedule.kind !==\n \"uniform-linear-native-scan\"\n ) {\n throw new InvalidScientificInputError(\n \"A readout spatial-phase link requires the selected exposure boundary to use a uniform-linear native scan.\"\n );\n }\n\n const readoutDirection =\n readoutScan.directionNative.value;\n const boundaryDirection =\n boundary.schedule.directionNative.value;\n const expectedDirection = expectedBoundaryDirection(\n readoutDirection,\n link.phaseOrientation\n );\n\n if (boundaryDirection !== expectedDirection) {\n throw new InvalidScientificInputError(\n \"Declared readout/exposure spatial phase orientation contradicts the readout and exposure-boundary scan directions.\"\n );\n }\n\n const readoutSpatialSamplingSkewSeconds =\n readoutScan.spatialSamplingSkewSeconds;\n const boundaryTraversalDurationSeconds =\n boundary.schedule.traversalDurationSeconds;\n\n return {\n boundary: link.boundary,\n boundaryActuator: \"electronic\",\n phaseOrientation: link.phaseOrientation,\n normalizedPhaseRelationship:\n link.phaseOrientation === \"same\"\n ? \"boundary-phase-equals-readout-phase\"\n : \"boundary-phase-equals-one-minus-readout-phase\",\n relationshipEvidence: link.evidence,\n readoutDirectionNative: readoutDirection,\n boundaryDirectionNative: boundaryDirection,\n readoutSpatialSamplingSkewSeconds,\n boundaryTraversalDurationSeconds,\n boundaryTraversalToReadoutSpatialSkewRatio:\n boundaryTraversalDurationSeconds.value /\n readoutSpatialSamplingSkewSeconds.value,\n absoluteTemporalAlignment: \"not-established\"\n };\n }\n );\n\n return approximationResult(\n {\n linkageKind: \"spatial-phase-linked\",\n relationshipMeaning:\n \"normalized-spatial-phase-relationship-asserted\",\n readoutMode: sensorReadout.value.readoutMode,\n shutterMechanism: input.shutterMechanism,\n activeCaptureRect: {\n ...sensorReadout.value.activeCaptureRect\n },\n absoluteTemporalAlignment: \"not-established\",\n captureReadoutDurationSeconds:\n sensorReadout.value.captureReadoutDurationSeconds,\n links: assessments,\n componentProvenance: {\n sensorReadout: sensorReadout.provenance,\n exposureWindows: exposureWindows.provenance\n }\n },\n \"readout-exposure-spatial-linkage\",\n \"1.0.0\",\n [\n \"The linkage establishes normalized native-sensor spatial phase/order only, not absolute temporal synchronization.\",\n \"Every asserted boundary link carries evidence separate from the evidence for the underlying readout and exposure timing facts.\",\n \"Only electronic exposure boundaries may be linked to rolling sensor readout spatial phase.\",\n \"Same phase orientation requires matching native scan direction; reversed phase orientation requires the exact opposite direction on the same native axis.\",\n \"Rolling readout spatial skew and exposure-boundary traversal duration may differ; their ratio is descriptive and does not establish a common clock origin.\",\n \"Capture data-readout duration is not used to validate exposure-boundary timing linkage.\",\n \"Active capture, native coordinate semantics and shutter mechanism are shared because both component schedules are resolved from the same input.\",\n \"Sensor readout and exposure-window component provenance remain visible; linkage does not upgrade either component to calibrated status.\",\n \"No camera-specific timing relationship is inferred from shutter mechanism, sensor architecture metadata, output resolution or adjacent specifications.\"\n ]\n );\n}\n\n/** Model identity of the electronic rolling-shutter (line reset → line read) exposure schedule. */\nexport const ELECTRONIC_ROLLING_SHUTTER_MODEL = Object.freeze({\n id: \"electronic-rolling-shutter-line-reset-read\",\n version: \"1.0.0\"\n} as const);\n\nexport interface ResolveElectronicRollingShutterExposureScheduleInput {\n /** Rolling readout declaration whose scan direction and spatial skew drive both exposure boundaries. */\n readout: RollingSensorReadoutTimingDeclaration;\n /** Per-line integration time between line reset and line read. */\n nominalExposureDurationSeconds: SourcedCaptureTimingSeconds;\n /**\n * Evidence that this capture uses a fully electronic, line-by-line (rolling) shutter whose reset\n * scan runs at the readout line rate. This explicit link is required before sensor readout timing\n * may set the exposure-window timing.\n */\n linkageEvidence: readonly EvidenceProvenance[];\n}\n\n/**\n * Exposure-window schedule of an electronic rolling shutter. Its `shutterMechanism`,\n * `nominalExposureDurationSeconds`, `opening` and `closing` fields form a complete exposure schedule, so\n * they can be passed as a native RAW / environment `exposureWindow` or spread into a production\n * `temporalCapture.exposureWindowInput` (see {@link createRollingShutterCaptureExposureSchedule}).\n */\nexport interface ElectronicRollingShutterExposureSchedule {\n modelId: typeof ELECTRONIC_ROLLING_SHUTTER_MODEL.id;\n modelVersion: typeof ELECTRONIC_ROLLING_SHUTTER_MODEL.version;\n shutterMechanism: \"electronic\";\n nominalExposureDurationSeconds: SourcedCaptureTimingSeconds;\n /** Line-reset scan: a native point at normalized scan position s starts integrating at s·τ. */\n opening: UniformLinearExposureBoundarySchedule;\n /** Line-read scan: the same point stops integrating at T + s·τ. */\n closing: UniformLinearExposureBoundarySchedule;\n /** Explicit linkage declaration accepted by {@link assessReadoutExposureTimingLinkage}. */\n linkage: Extract<ReadoutExposureTimingLinkageDeclaration, { kind: \"spatial-phase-linked\" }>;\n /** τ: offset between the first and last exposure starts (equal to the readout skew). */\n lineScanSkewSeconds: number;\n /** Every point integrates for exactly the nominal exposure duration T. */\n localExposureDurationSeconds: number;\n limitations: readonly string[];\n}\n\n/** The exposure-schedule fields of a derived rolling-shutter schedule, without model metadata. */\nexport function createRollingShutterCaptureExposureSchedule(\n schedule: ElectronicRollingShutterExposureSchedule\n): Pick<CalculateCaptureExposureWindowsInput, \"shutterMechanism\" | \"nominalExposureDurationSeconds\" | \"opening\" | \"closing\"> {\n // 2.0.0: the whole schedule is checked, so an unknown field at any level is rejected.\n const record = requireRecord(schedule, \"rollingShutterSchedule\", [\"modelId\", \"modelVersion\", \"shutterMechanism\",\n \"nominalExposureDurationSeconds\", \"opening\", \"closing\", \"linkage\", \"lineScanSkewSeconds\", \"localExposureDurationSeconds\",\n \"limitations\"]);\n parseSecondsFact(record.nominalExposureDurationSeconds, \"rollingShutterSchedule.nominalExposureDurationSeconds\");\n parseBoundarySchedule(record.opening, \"rollingShutterSchedule.opening\");\n parseBoundarySchedule(record.closing, \"rollingShutterSchedule.closing\");\n if (record.linkage !== undefined) parseLinkageDeclaration(record.linkage);\n return structuredClone({ shutterMechanism: schedule.shutterMechanism,\n nominalExposureDurationSeconds: schedule.nominalExposureDurationSeconds,\n opening: schedule.opening, closing: schedule.closing });\n}\n\n/**\n * Derives the exposure-window schedule of a fully electronic rolling shutter from its rolling readout\n * declaration.\n *\n * In a CMOS rolling shutter, each line is reset, collects light for the exposure time T and is then\n * read. The reset pointer runs T ahead of the read pointer, and both move at the line rate (El Gamal &\n * Eltoukhy 2005; Liang, Chang & Chen 2008). With the uniform linear scan used throughout this engine, a\n * native point at normalized scan position s ∈ [0, 1] (along the declared scan direction, over the\n * active capture) collects light over [s·τ, s·τ + T], where τ is the declared first-to-last readout\n * skew. So both boundaries become uniform linear scans in the readout direction that take τ to sweep.\n *\n * When this schedule feeds the per-site exposure windows, everything that samples motion, moving\n * sources or time-varying light at local exposure times (environment RAW, rotation quadrature,\n * temporal illumination integration) produces rolling-shutter skew, wobble, partial exposure and\n * flicker banding.\n *\n * Approximation: constant line rate, no line-reset jitter, no hybrid of global reset with a mechanical\n * closing shutter, and the active-capture skew is declared by the caller (never scaled from a\n * full-frame value).\n * @see docs/MOTION_AND_SIGNAL.md#electronic-rolling-shutter-image-formation\n */\nexport function resolveElectronicRollingShutterExposureSchedule(\n input: ResolveElectronicRollingShutterExposureScheduleInput\n): ElectronicRollingShutterExposureSchedule {\n requireInputKeys(input, \"resolveElectronicRollingShutterExposureSchedule\", [\"readout\", \"nominalExposureDurationSeconds\", \"linkageEvidence\"]);\n // The input keys are checked above; calculateSensorReadoutTiming checks the readout's own fields.\n const record = requireRecord(input, \"rollingShutter\", null);\n const readout = requireRecord(record.readout, \"rollingShutter.readout\", null);\n if (readout.readoutMode !== \"rolling\") {\n throw new InvalidScientificInputError(\n \"An electronic rolling-shutter exposure schedule requires a rolling sensor readout declaration.\"\n );\n }\n const linkageEvidence = parseEvidenceList(input.linkageEvidence, \"rollingShutter.linkageEvidence\");\n const rolling = input.readout;\n // Check the declaration and the exposure fact with the existing readout and exposure-window calculators.\n const probeRaster = { pixelWidth: 2, pixelHeight: 2 };\n calculateSensorReadoutTiming({ nativeRaster: probeRaster, shutterMechanism: \"electronic\", readout: rolling });\n const opening: UniformLinearExposureBoundarySchedule = {\n kind: \"uniform-linear-native-scan\",\n directionNative: { value: rolling.scanDirectionNative.value, evidence: [...rolling.scanDirectionNative.evidence] },\n traversalDurationSeconds: { value: rolling.spatialSamplingSkewSeconds.value, unit: \"s\",\n evidence: [...rolling.spatialSamplingSkewSeconds.evidence] }\n };\n const closing: UniformLinearExposureBoundarySchedule = structuredClone(opening);\n const nominal = calculateCaptureExposureWindows({ nativeRaster: probeRaster, shutterMechanism: \"electronic\",\n nominalExposureDurationSeconds: input.nominalExposureDurationSeconds, opening, closing }).value.nominalExposureDurationSeconds;\n return {\n modelId: ELECTRONIC_ROLLING_SHUTTER_MODEL.id,\n modelVersion: ELECTRONIC_ROLLING_SHUTTER_MODEL.version,\n shutterMechanism: \"electronic\",\n nominalExposureDurationSeconds: { value: nominal.value, unit: \"s\", evidence: [...nominal.evidence] },\n opening,\n closing,\n linkage: { kind: \"spatial-phase-linked\", links: [\n { boundary: \"opening\", phaseOrientation: \"same\", evidence: linkageEvidence },\n { boundary: \"closing\", phaseOrientation: \"same\", evidence: linkageEvidence }] },\n lineScanSkewSeconds: rolling.spatialSamplingSkewSeconds.value,\n localExposureDurationSeconds: nominal.value,\n limitations: [\n \"Uniform-linear line timing: each native point integrates over [s·τ, s·τ + T] with s its normalized scan position.\",\n \"Line-reset jitter, non-uniform line timing, global-reset release and mechanical-close hybrids are not modeled.\",\n \"The skew τ is the caller-declared active-capture spatial sampling skew; it is never scaled from a full-frame value.\"\n ]\n };\n}\n\n/**\n * True when an exposure schedule is exactly the electronic rolling-shutter schedule derived from this\n * readout declaration: an electronic mechanism, with both boundaries scanning in the readout direction\n * and taking the readout skew to sweep.\n */\nexport function isElectronicRollingShutterExposureSchedule(\n schedule: Pick<CalculateCaptureExposureWindowsInput, \"shutterMechanism\" | \"opening\" | \"closing\">,\n readout: SensorReadoutTimingDeclaration\n): boolean {\n if (readout.readoutMode !== \"rolling\" || schedule.shutterMechanism !== \"electronic\") return false;\n return [schedule.opening, schedule.closing].every((boundary) => boundary.kind === \"uniform-linear-native-scan\" &&\n boundary.directionNative.value === readout.scanDirectionNative.value &&\n boundary.traversalDurationSeconds.value === readout.spatialSamplingSkewSeconds.value);\n}\n"]}
|