@photivra/engine 2.18.0 → 2.19.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 +68 -1
- package/CITATION.cff +1 -1
- package/README.md +6 -6
- package/SECURITY.md +1 -1
- package/dist/capture/focus-control.js +2 -75
- package/dist/capture/focus-control.js.map +1 -1
- package/dist/capture/native-environment-lean.d.ts +1 -0
- package/dist/capture/native-environment-lean.js +1 -1
- package/dist/capture/native-environment-lean.js.map +1 -1
- package/dist/capture/native-environment-optical-stage.d.ts +1 -0
- package/dist/capture/native-environment-optical-stage.js +2 -5
- package/dist/capture/native-environment-optical-stage.js.map +1 -1
- package/dist/capture/native-environment-raw.js +1 -5
- package/dist/capture/native-environment-raw.js.map +1 -1
- package/dist/capture/release-sequence.js +2 -47
- package/dist/capture/release-sequence.js.map +1 -1
- package/dist/color/white-balance.d.ts +2 -0
- package/dist/color/white-balance.js +3 -56
- package/dist/color/white-balance.js.map +1 -1
- package/dist/composition/image-formation-plan.d.ts +1 -0
- package/dist/composition/image-formation-plan.js +3 -49
- package/dist/composition/image-formation-plan.js.map +1 -1
- package/dist/core/evidence-provenance.js +1 -16
- package/dist/core/evidence-provenance.js.map +1 -1
- package/dist/core/record-validation.d.ts +54 -0
- package/dist/core/record-validation.js +176 -0
- package/dist/core/record-validation.js.map +1 -1
- package/dist/core/scientific-assurance.js +1 -18
- package/dist/core/scientific-assurance.js.map +1 -1
- package/dist/core/shared-helpers.d.ts +33 -0
- package/dist/core/shared-helpers.js +34 -0
- package/dist/core/shared-helpers.js.map +1 -0
- package/dist/core/spectral-composition.js +1 -36
- package/dist/core/spectral-composition.js.map +1 -1
- package/dist/core/spectral.js +1 -19
- package/dist/core/spectral.js.map +1 -1
- package/dist/core/version.d.ts +1 -1
- package/dist/core/version.js +1 -1
- package/dist/core/version.js.map +1 -1
- package/dist/equipment/exposure-capabilities.d.ts +1 -0
- package/dist/equipment/exposure-capabilities.js +2 -36
- package/dist/equipment/exposure-capabilities.js.map +1 -1
- package/dist/equipment/iso-capabilities.js +2 -49
- package/dist/equipment/iso-capabilities.js.map +1 -1
- package/dist/equipment/metering-capabilities.js +1 -26
- package/dist/equipment/metering-capabilities.js.map +1 -1
- package/dist/equipment/release-capabilities.js +1 -53
- package/dist/equipment/release-capabilities.js.map +1 -1
- package/dist/exposure/auto-iso-slowest-shutter.js +1 -7
- package/dist/exposure/auto-iso-slowest-shutter.js.map +1 -1
- package/dist/exposure/exposure-duration-control.js +1 -16
- package/dist/exposure/exposure-duration-control.js.map +1 -1
- package/dist/exposure/exposure-mode-resolver.js +1 -17
- package/dist/exposure/exposure-mode-resolver.js.map +1 -1
- package/dist/exposure/filtered-exposure-time.d.ts +93 -0
- package/dist/exposure/filtered-exposure-time.js +129 -0
- package/dist/exposure/filtered-exposure-time.js.map +1 -0
- package/dist/exposure/flash-ttl.d.ts +1 -0
- package/dist/exposure/flash-ttl.js +1 -1
- package/dist/exposure/flash-ttl.js.map +1 -1
- package/dist/exposure/flash.js +1 -49
- package/dist/exposure/flash.js.map +1 -1
- package/dist/exposure/metering-scene-radiance.js +1 -25
- package/dist/exposure/metering-scene-radiance.js.map +1 -1
- package/dist/exposure/metering-target.js +1 -30
- package/dist/exposure/metering-target.js.map +1 -1
- package/dist/exposure/metering-temporal.js +1 -8
- package/dist/exposure/metering-temporal.js.map +1 -1
- package/dist/exposure/metering.js +1 -72
- package/dist/exposure/metering.js.map +1 -1
- package/dist/exposure/program-line.js +1 -45
- package/dist/exposure/program-line.js.map +1 -1
- package/dist/facade/develop-joined-parts.d.ts +29 -0
- package/dist/facade/develop-joined-parts.js +33 -0
- package/dist/facade/develop-joined-parts.js.map +1 -0
- package/dist/facade/generic-lens-capture.d.ts +4 -2
- package/dist/facade/generic-lens-capture.js +4 -2
- package/dist/facade/generic-lens-capture.js.map +1 -1
- package/dist/facade/simulate-capture.d.ts +37 -5
- package/dist/facade/simulate-capture.js +153 -96
- package/dist/facade/simulate-capture.js.map +1 -1
- package/dist/gpu/chart-composite-gpu.js +1 -3
- package/dist/gpu/chart-composite-gpu.js.map +1 -1
- package/dist/gpu/chart-radiance-gpu.js +1 -5
- package/dist/gpu/chart-radiance-gpu.js.map +1 -1
- package/dist/gpu/display-view-quality-gpu.d.ts +13 -1
- package/dist/gpu/display-view-quality-gpu.js +4 -8
- package/dist/gpu/display-view-quality-gpu.js.map +1 -1
- package/dist/gpu/display-view-speed-gpu.js +3 -25
- package/dist/gpu/display-view-speed-gpu.js.map +1 -1
- package/dist/gpu/sensor-stage-gpu.js +1 -5
- package/dist/gpu/sensor-stage-gpu.js.map +1 -1
- package/dist/gpu/webgpu-runtime.d.ts +2 -0
- package/dist/gpu/webgpu-runtime.js +3 -0
- package/dist/gpu/webgpu-runtime.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/motion/camera-rotation.js +1 -6
- package/dist/motion/camera-rotation.js.map +1 -1
- package/dist/motion/capture-rotation-inverse-mapping.d.ts +12 -0
- package/dist/motion/capture-rotation-inverse-mapping.js +2 -2
- package/dist/motion/capture-rotation-inverse-mapping.js.map +1 -1
- package/dist/motion/capture-rotation-temporal-quadrature.d.ts +1 -0
- package/dist/motion/capture-rotation-temporal-quadrature.js +1 -1
- package/dist/motion/capture-rotation-temporal-quadrature.js.map +1 -1
- package/dist/motion/capture-rotation-trajectory.js +2 -17
- package/dist/motion/capture-rotation-trajectory.js.map +1 -1
- package/dist/motion/capture-translation-parallax-temporal-quadrature.d.ts +1 -0
- package/dist/motion/capture-translation-parallax-temporal-quadrature.js +3 -14
- package/dist/motion/capture-translation-parallax-temporal-quadrature.js.map +1 -1
- package/dist/motion/extended-object-projection.js +5 -40
- package/dist/motion/extended-object-projection.js.map +1 -1
- package/dist/optics/atmospheric-haze.js +1 -7
- package/dist/optics/atmospheric-haze.js.map +1 -1
- package/dist/optics/brown-conrady-distortion.js +1 -7
- package/dist/optics/brown-conrady-distortion.js.map +1 -1
- package/dist/optics/complex-pupil-psf.d.ts +1 -0
- package/dist/optics/complex-pupil-psf.js +2 -84
- package/dist/optics/complex-pupil-psf.js.map +1 -1
- package/dist/optics/focus-state.js +1 -11
- package/dist/optics/focus-state.js.map +1 -1
- package/dist/optics/front-of-lens-filter.d.ts +5 -0
- package/dist/optics/front-of-lens-filter.js +3 -65
- package/dist/optics/front-of-lens-filter.js.map +1 -1
- package/dist/optics/generic-nd-filter-presets.d.ts +12 -0
- package/dist/optics/generic-nd-filter-presets.js +48 -0
- package/dist/optics/generic-nd-filter-presets.js.map +1 -0
- package/dist/optics/illumination-vignetting.js +1 -6
- package/dist/optics/illumination-vignetting.js.map +1 -1
- package/dist/optics/lens-psf-profile.d.ts +4 -1
- package/dist/optics/lens-psf-profile.js +12 -111
- package/dist/optics/lens-psf-profile.js.map +1 -1
- package/dist/optics/longitudinal-chromatic-aberration.js +1 -7
- package/dist/optics/longitudinal-chromatic-aberration.js.map +1 -1
- package/dist/optics/pupil-vignetting.js +1 -7
- package/dist/optics/pupil-vignetting.js.map +1 -1
- package/dist/optics/radial-distortion.js +1 -6
- package/dist/optics/radial-distortion.js.map +1 -1
- package/dist/optics/scene-to-sensor-irradiance.js +4 -96
- package/dist/optics/scene-to-sensor-irradiance.js.map +1 -1
- package/dist/optics/stray-light.d.ts +1 -0
- package/dist/optics/stray-light.js +1 -1
- package/dist/optics/stray-light.js.map +1 -1
- package/dist/optics/zernike-wavefront.js +1 -7
- package/dist/optics/zernike-wavefront.js.map +1 -1
- package/dist/output/capture-geometry.js +1 -8
- package/dist/output/capture-geometry.js.map +1 -1
- package/dist/output/developed-lens-corrections.d.ts +62 -0
- package/dist/output/developed-lens-corrections.js +135 -0
- package/dist/output/developed-lens-corrections.js.map +1 -0
- package/dist/output/generic-lens-corrections.d.ts +2 -6
- package/dist/output/generic-lens-corrections.js +3 -6
- package/dist/output/generic-lens-corrections.js.map +1 -1
- package/dist/output/geometric-transforms.js +1 -4
- package/dist/output/geometric-transforms.js.map +1 -1
- package/dist/output/native-capture-sdr.d.ts +2 -2
- package/dist/output/native-capture-sdr.js +3 -2
- package/dist/output/native-capture-sdr.js.map +1 -1
- package/dist/processing/development-detail.d.ts +29 -0
- package/dist/processing/development-detail.js +128 -107
- package/dist/processing/development-detail.js.map +1 -1
- package/dist/schema/illumination-temporal.js +3 -72
- package/dist/schema/illumination-temporal.js.map +1 -1
- package/dist/schema/illumination.d.ts +1 -0
- package/dist/schema/illumination.js +2 -65
- package/dist/schema/illumination.js.map +1 -1
- package/dist/schema/scene-radiance-temporal.js +2 -14
- package/dist/schema/scene-radiance-temporal.js.map +1 -1
- package/dist/schema/scene-radiance.js +2 -60
- package/dist/schema/scene-radiance.js.map +1 -1
- package/dist/schema/validation.d.ts +2 -0
- package/dist/schema/validation.js +2 -17
- package/dist/schema/validation.js.map +1 -1
- package/dist/sensor/accumulated-charge.js +2 -59
- package/dist/sensor/accumulated-charge.js.map +1 -1
- package/dist/sensor/architecture.js +1 -16
- package/dist/sensor/architecture.js.map +1 -1
- package/dist/sensor/camera-saturation-capacity.d.ts +1 -0
- package/dist/sensor/camera-saturation-capacity.js +3 -55
- package/dist/sensor/camera-saturation-capacity.js.map +1 -1
- package/dist/sensor/capture-color-sampling-binding.js +1 -26
- package/dist/sensor/capture-color-sampling-binding.js.map +1 -1
- package/dist/sensor/capture-mode-timing.js +1 -39
- package/dist/sensor/capture-mode-timing.js.map +1 -1
- package/dist/sensor/capture-mode.js +1 -23
- package/dist/sensor/capture-mode.js.map +1 -1
- package/dist/sensor/color-sampling.js +1 -26
- package/dist/sensor/color-sampling.js.map +1 -1
- package/dist/sensor/constant-rate-temporal-integration.js +2 -46
- package/dist/sensor/constant-rate-temporal-integration.js.map +1 -1
- package/dist/sensor/dark-current.js +2 -45
- package/dist/sensor/dark-current.js.map +1 -1
- package/dist/sensor/eqe-electron-rate.js +2 -35
- package/dist/sensor/eqe-electron-rate.js.map +1 -1
- package/dist/sensor/exposure-window.d.ts +5 -0
- package/dist/sensor/exposure-window.js +7 -22
- package/dist/sensor/exposure-window.js.map +1 -1
- package/dist/sensor/iso-gain.js +1 -7
- package/dist/sensor/iso-gain.js.map +1 -1
- package/dist/sensor/iso-signal-chain.js +1 -43
- package/dist/sensor/iso-signal-chain.js.map +1 -1
- package/dist/sensor/optical-stack.js +1 -25
- package/dist/sensor/optical-stack.js.map +1 -1
- package/dist/sensor/photon-energy.js +1 -26
- package/dist/sensor/photon-energy.js.map +1 -1
- package/dist/sensor/physical-charge-capacity.js +3 -77
- package/dist/sensor/physical-charge-capacity.js.map +1 -1
- package/dist/sensor/radiometry-readiness.js +2 -23
- package/dist/sensor/radiometry-readiness.js.map +1 -1
- package/dist/sensor/raw-readout.d.ts +3 -0
- package/dist/sensor/raw-readout.js +4 -66
- package/dist/sensor/raw-readout.js.map +1 -1
- package/dist/sensor/raw-reconstruction.js +2 -64
- package/dist/sensor/raw-reconstruction.js.map +1 -1
- package/dist/sensor/readout-exposure-linkage.js +1 -9
- package/dist/sensor/readout-exposure-linkage.js.map +1 -1
- package/dist/sensor/readout-timing.js +3 -57
- package/dist/sensor/readout-timing.js.map +1 -1
- package/dist/sensor/response-application-compatibility.d.ts +2 -0
- package/dist/sensor/response-application-compatibility.js +3 -29
- package/dist/sensor/response-application-compatibility.js.map +1 -1
- package/dist/sensor/response-operating-range.d.ts +1 -0
- package/dist/sensor/response-operating-range.js +3 -79
- package/dist/sensor/response-operating-range.js.map +1 -1
- package/dist/sensor/responsivity-photocurrent.js +4 -108
- package/dist/sensor/responsivity-photocurrent.js.map +1 -1
- package/dist/sensor/sampling-aperture.js +1 -25
- package/dist/sensor/sampling-aperture.js.map +1 -1
- package/dist/sensor/spatial-sample-reduction.js +2 -19
- package/dist/sensor/spatial-sample-reduction.js.map +1 -1
- package/dist/sensor/spatial-sampling-quadrature.js +1 -3
- package/dist/sensor/spatial-sampling-quadrature.js.map +1 -1
- package/dist/sensor/spatio-spectral-reduction.js +1 -18
- package/dist/sensor/spatio-spectral-reduction.js.map +1 -1
- package/dist/sensor/spectral-coverage.d.ts +10 -1
- package/dist/sensor/spectral-coverage.js +1 -1
- package/dist/sensor/spectral-coverage.js.map +1 -1
- package/dist/sensor/spectral-quadrature.js +2 -35
- package/dist/sensor/spectral-quadrature.js.map +1 -1
- package/dist/sensor/spectral-response.js +1 -47
- package/dist/sensor/spectral-response.js.map +1 -1
- package/dist/stabilization/camera-shake.js +1 -6
- package/dist/stabilization/camera-shake.js.map +1 -1
- package/dist/stabilization/system.js +2 -80
- package/dist/stabilization/system.js.map +1 -1
- package/docs/AGENT_GUIDE.md +1 -0
- package/docs/API_REFERENCE.md +41 -2
- package/docs/QUICK_START.md +90 -8
- package/docs/USAGE.md +47 -2
- package/docs/api/core-version.md +1 -1
- package/docs/api/exports.json +53 -3
- package/docs/api/exposure-filtered-exposure-time.md +105 -0
- package/docs/api/facade-develop-joined-parts.md +32 -0
- package/docs/api/facade-simulate-capture.md +36 -5
- package/docs/api/optics-generic-nd-filter-presets.md +34 -0
- package/docs/api/optics-lens-psf-profile.md +3 -1
- package/docs/api/output-developed-lens-corrections.md +12 -0
- package/docs/api/output-generic-lens-corrections.md +0 -9
- package/llms.txt +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"program-line.js","sourceRoot":"","sources":["../../src/exposure/program-line.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EACL,iBAAiB,EAElB,MAAM,gCAAgC,CAAC;AAIxC,MAAM,CAAC,MAAM,oCAAoC,GAC/C,OAAgB,CAAC;AAyBnB,SAAS,aAAa,CACpB,KAAc,EACd,IAAY,EACZ,WAAqC;IAErC,IACE,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,KAAK,IAA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QACL,aAAa,EACX,oCAAoC;QACtC,SAAS,EACP,qBAAqB,CACnB,MAAM,CAAC,SAAS,EAChB,sCAAsC,CACvC;QACH,cAAc,EACZ,qBAAqB,CACnB,MAAM,CAAC,cAAc,EACrB,2CAA2C,CAC5C;QACH,gBAAgB,EACd,eAAe;QACjB,UAAU,EACR,sBAAsB;QACxB,aAAa,EACX,uBAAuB;QACzB,QAAQ,EAAE,iBAAiB,CACzB,MAAM,CAAC,QAAQ,EACf,qCAAqC,CACtC;QACD,WAAW,EACT,gBAAgB,CACd,MAAM,CAAC,WAAW,EAClB,wCAAwC,CACzC;QACH,KAAK;KACN,CAAC;AACJ,CAAC","sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\n/**\n * Generic exposure program lines, for teaching and for products. A program line is the curve of\n * aperture/shutter pairs a camera's Program mode follows.\n *\n * A program line is control policy, not physics. Each node declares a wanted aperture/shutter pair at\n * an explicit number of stops of optical exposure, relative to the resolver's reference exposure.\n * The resolver later checks that every node is physically consistent with that reference and with\n * what the equipment can do.\n * @see docs/USAGE.md for the equations, units, coordinate conventions, known blockers and support\n * limits.\n */\n\nimport { rejectUnknownFields } from \"../core/record-validation.js\";\nimport { InvalidConfigurationError } from \"../core/configuration-error.js\";\nimport {\n parseEvidenceList,\n type EvidenceProvenance\n} from \"../core/evidence-provenance.js\";\n\ntype UnknownRecord = Record<string, unknown>;\n\nexport const EXPOSURE_PROGRAM_LINE_SCHEMA_VERSION =\n \"0.1.0\" as const;\n\nexport interface ExposureProgramLineNode {\n nodeId: string;\n opticalExposureStopsFromReference: number;\n aperture: number;\n shutterSeconds: number;\n}\n\nexport interface ExposureProgramLineProfile {\n schemaVersion:\n typeof EXPOSURE_PROGRAM_LINE_SCHEMA_VERSION;\n profileId: string;\n profileVersion: string;\n scientificStatus: \"approximation\";\n policyKind:\n \"generic-program-line\";\n interpolation:\n \"log2-aperture-shutter\";\n evidence: readonly EvidenceProvenance[];\n limitations: readonly string[];\n nodes:\n readonly ExposureProgramLineNode[];\n}\n\nfunction requireRecord(\n value: unknown,\n path: string,\n allowedKeys: readonly string[] | null\n): UnknownRecord {\n if (\n typeof value !== \"object\" ||\n value === null ||\n Array.isArray(value)\n ) {\n throw new InvalidConfigurationError(\n path + \" must be an object.\"\n );\n }\n if (allowedKeys !== null) rejectUnknownFields(value, allowedKeys, path);\n return value as UnknownRecord;\n}\n\nfunction requireNonEmptyString(\n value: unknown,\n path: string\n): string {\n if (\n typeof value !== \"string\" ||\n value.trim().length === 0\n ) {\n throw new InvalidConfigurationError(\n path + \" must be a non-empty string.\"\n );\n }\n return value.trim();\n}\n\nfunction requireFinite(\n value: unknown,\n path: string\n): number {\n if (\n typeof value !== \"number\" ||\n !Number.isFinite(value)\n ) {\n throw new InvalidConfigurationError(\n path + \" must be finite.\"\n );\n }\n return value;\n}\n\nfunction requirePositiveFinite(\n value: unknown,\n path: string\n): number {\n const parsed =\n requireFinite(value, path);\n if (parsed <= 0) {\n throw new InvalidConfigurationError(\n path +\n \" must be greater than zero.\"\n );\n }\n return parsed;\n}\n\nfunction parseLimitations(\n value: unknown,\n path: string\n): readonly string[] {\n if (!Array.isArray(value)) {\n throw new InvalidConfigurationError(\n path + \" must be an array.\"\n );\n }\n const parsed = value.map(\n (entry, index) =>\n requireNonEmptyString(\n entry,\n path + \"[\" + index + \"]\"\n )\n );\n if (\n new Set(parsed).size !==\n parsed.length\n ) {\n throw new InvalidConfigurationError(\n path +\n \" must not contain duplicates.\"\n );\n }\n return parsed;\n}\n\n/**\n * Parses a generic educational/product exposure program line.\n *\n * A program line is control policy, not physics. Each node declares a wanted\n * aperture/shutter pair at an explicit number of stops of optical exposure,\n * relative to the resolver's reference exposure. The resolver later checks\n * that every node is physically consistent with that reference and with what\n * the equipment can do.\n */\nexport function parseExposureProgramLineProfile(\n value: unknown\n): ExposureProgramLineProfile {\n const record = requireRecord(\n value,\n \"exposureProgramLineProfile\", [\"schemaVersion\", \"scientificStatus\", \"policyKind\", \"interpolation\", \"nodes\", \"profileId\", \"profileVersion\", \"evidence\", \"limitations\"]\n );\n\n if (\n record.schemaVersion !==\n EXPOSURE_PROGRAM_LINE_SCHEMA_VERSION\n ) {\n throw new InvalidConfigurationError(\n 'exposureProgramLineProfile.schemaVersion must be \"' +\n EXPOSURE_PROGRAM_LINE_SCHEMA_VERSION +\n '\".'\n );\n }\n if (\n record.scientificStatus !==\n \"approximation\"\n ) {\n throw new InvalidConfigurationError(\n 'exposureProgramLineProfile.scientificStatus must be \"approximation\".'\n );\n }\n if (\n record.policyKind !==\n \"generic-program-line\"\n ) {\n throw new InvalidConfigurationError(\n 'exposureProgramLineProfile.policyKind must be \"generic-program-line\".'\n );\n }\n if (\n record.interpolation !==\n \"log2-aperture-shutter\"\n ) {\n throw new InvalidConfigurationError(\n 'exposureProgramLineProfile.interpolation must be \"log2-aperture-shutter\".'\n );\n }\n if (\n !Array.isArray(record.nodes) ||\n record.nodes.length < 2\n ) {\n throw new InvalidConfigurationError(\n \"exposureProgramLineProfile.nodes must contain at least two nodes.\"\n );\n }\n\n let previousStops =\n Number.NEGATIVE_INFINITY;\n const ids: string[] = [];\n\n const nodes = record.nodes.map(\n (entry, index) => {\n const path =\n \"exposureProgramLineProfile.nodes[\" +\n index +\n \"]\";\n const node =\n requireRecord(entry, path, [\"nodeId\", \"opticalExposureStopsFromReference\", \"aperture\", \"shutterSeconds\"]);\n const nodeId =\n requireNonEmptyString(\n node.nodeId,\n path + \".nodeId\"\n );\n const stops =\n requireFinite(\n node\n .opticalExposureStopsFromReference,\n path +\n \".opticalExposureStopsFromReference\"\n );\n if (stops <= previousStops) {\n throw new InvalidConfigurationError(\n \"exposureProgramLineProfile.nodes opticalExposureStopsFromReference must be strictly increasing.\"\n );\n }\n previousStops = stops;\n ids.push(nodeId);\n\n return {\n nodeId,\n opticalExposureStopsFromReference:\n stops,\n aperture:\n requirePositiveFinite(\n node.aperture,\n path + \".aperture\"\n ),\n shutterSeconds:\n requirePositiveFinite(\n node.shutterSeconds,\n path +\n \".shutterSeconds\"\n )\n };\n }\n );\n\n if (\n new Set(ids).size !== ids.length\n ) {\n throw new InvalidConfigurationError(\n \"exposureProgramLineProfile.nodes[].nodeId must not contain duplicates.\"\n );\n }\n\n return {\n schemaVersion:\n EXPOSURE_PROGRAM_LINE_SCHEMA_VERSION,\n profileId:\n requireNonEmptyString(\n record.profileId,\n \"exposureProgramLineProfile.profileId\"\n ),\n profileVersion:\n requireNonEmptyString(\n record.profileVersion,\n \"exposureProgramLineProfile.profileVersion\"\n ),\n scientificStatus:\n \"approximation\",\n policyKind:\n \"generic-program-line\",\n interpolation:\n \"log2-aperture-shutter\",\n evidence: parseEvidenceList(\n record.evidence,\n \"exposureProgramLineProfile.evidence\"\n ),\n limitations:\n parseLimitations(\n record.limitations,\n \"exposureProgramLineProfile.limitations\"\n ),\n nodes\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"program-line.js","sourceRoot":"","sources":["../../src/exposure/program-line.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EACL,iBAAiB,EAElB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,mBAAmB,IAAI,aAAa,EAAE,0BAA0B,IAAI,qBAAqB,EAAE,mBAAmB,IAAI,aAAa,EAAE,sBAAsB,IAAI,gBAAgB,EAAE,4BAA4B,IAAI,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAElR,MAAM,CAAC,MAAM,oCAAoC,GAC/C,OAAgB,CAAC;AAyBnB;;;;;;;;GAQG;AACH,MAAM,UAAU,+BAA+B,CAC7C,KAAc;IAEd,MAAM,MAAM,GAAG,aAAa,CAC1B,KAAK,EACL,4BAA4B,EAAE,CAAC,eAAe,EAAE,kBAAkB,EAAE,YAAY,EAAE,eAAe,EAAE,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,UAAU,EAAE,aAAa,CAAC,CACtK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AoC,CACvC,CAAC;QACJ,IAAI,KAAK,IAAI,aAAa,EAAE,CAAC;YAC3B,MAAM,IAAI,yBAAyB,CACjC,iGAAiG,CAClG,CAAC;QACJ,CAAC;QACD,aAAa,GAAG,KAAK,CAAC;QACtB,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAEjB,OAAO;YACL,MAAM;YACN,iCAAiC,EAC/B,KAAK;YACP,QAAQ,EACN,qBAAqB,CACnB,IAAI,CAAC,QAAQ,EACb,IAAI,GAAG,WAAW,CACnB;YACH,cAAc,EACZ,qBAAqB,CACnB,IAAI,CAAC,cAAc,EACnB,IAAI;gBACF,iBAAiB,CACpB;SACJ,CAAC;IACJ,CAAC,CACF,CAAC;IAEF,IACE,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,GAAG,CAAC,MAAM,EAChC,CAAC;QACD,MAAM,IAAI,yBAAyB,CACjC,wEAAwE,CACzE,CAAC;IACJ,CAAC;IAED,OAAO;QACL,aAAa,EACX,oCAAoC;QACtC,SAAS,EACP,qBAAqB,CACnB,MAAM,CAAC,SAAS,EAChB,sCAAsC,CACvC;QACH,cAAc,EACZ,qBAAqB,CACnB,MAAM,CAAC,cAAc,EACrB,2CAA2C,CAC5C;QACH,gBAAgB,EACd,eAAe;QACjB,UAAU,EACR,sBAAsB;QACxB,aAAa,EACX,uBAAuB;QACzB,QAAQ,EAAE,iBAAiB,CACzB,MAAM,CAAC,QAAQ,EACf,qCAAqC,CACtC;QACD,WAAW,EACT,gBAAgB,CACd,MAAM,CAAC,WAAW,EAClB,wCAAwC,CACzC;QACH,KAAK;KACN,CAAC;AACJ,CAAC","sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\n/**\n * Generic exposure program lines, for teaching and for products. A program line is the curve of\n * aperture/shutter pairs a camera's Program mode follows.\n *\n * A program line is control policy, not physics. Each node declares a wanted aperture/shutter pair at\n * an explicit number of stops of optical exposure, relative to the resolver's reference exposure.\n * The resolver later checks that every node is physically consistent with that reference and with\n * what the equipment can do.\n * @see docs/USAGE.md for the equations, units, coordinate conventions, known blockers and support\n * limits.\n */\n\nimport { InvalidConfigurationError } from \"../core/configuration-error.js\";\nimport {\n parseEvidenceList,\n type EvidenceProvenance\n} from \"../core/evidence-provenance.js\";\nimport { requireConfigRecord as requireRecord, requireTrimmedConfigString as requireNonEmptyString, requireConfigFinite as requireFinite, parseConfigLimitations as parseLimitations, requireConfigFiniteAboveZero as requirePositiveFinite } from \"../core/record-validation.js\";\n\nexport const EXPOSURE_PROGRAM_LINE_SCHEMA_VERSION =\n \"0.1.0\" as const;\n\nexport interface ExposureProgramLineNode {\n nodeId: string;\n opticalExposureStopsFromReference: number;\n aperture: number;\n shutterSeconds: number;\n}\n\nexport interface ExposureProgramLineProfile {\n schemaVersion:\n typeof EXPOSURE_PROGRAM_LINE_SCHEMA_VERSION;\n profileId: string;\n profileVersion: string;\n scientificStatus: \"approximation\";\n policyKind:\n \"generic-program-line\";\n interpolation:\n \"log2-aperture-shutter\";\n evidence: readonly EvidenceProvenance[];\n limitations: readonly string[];\n nodes:\n readonly ExposureProgramLineNode[];\n}\n\n/**\n * Parses a generic educational/product exposure program line.\n *\n * A program line is control policy, not physics. Each node declares a wanted\n * aperture/shutter pair at an explicit number of stops of optical exposure,\n * relative to the resolver's reference exposure. The resolver later checks\n * that every node is physically consistent with that reference and with what\n * the equipment can do.\n */\nexport function parseExposureProgramLineProfile(\n value: unknown\n): ExposureProgramLineProfile {\n const record = requireRecord(\n value,\n \"exposureProgramLineProfile\", [\"schemaVersion\", \"scientificStatus\", \"policyKind\", \"interpolation\", \"nodes\", \"profileId\", \"profileVersion\", \"evidence\", \"limitations\"]\n );\n\n if (\n record.schemaVersion !==\n EXPOSURE_PROGRAM_LINE_SCHEMA_VERSION\n ) {\n throw new InvalidConfigurationError(\n 'exposureProgramLineProfile.schemaVersion must be \"' +\n EXPOSURE_PROGRAM_LINE_SCHEMA_VERSION +\n '\".'\n );\n }\n if (\n record.scientificStatus !==\n \"approximation\"\n ) {\n throw new InvalidConfigurationError(\n 'exposureProgramLineProfile.scientificStatus must be \"approximation\".'\n );\n }\n if (\n record.policyKind !==\n \"generic-program-line\"\n ) {\n throw new InvalidConfigurationError(\n 'exposureProgramLineProfile.policyKind must be \"generic-program-line\".'\n );\n }\n if (\n record.interpolation !==\n \"log2-aperture-shutter\"\n ) {\n throw new InvalidConfigurationError(\n 'exposureProgramLineProfile.interpolation must be \"log2-aperture-shutter\".'\n );\n }\n if (\n !Array.isArray(record.nodes) ||\n record.nodes.length < 2\n ) {\n throw new InvalidConfigurationError(\n \"exposureProgramLineProfile.nodes must contain at least two nodes.\"\n );\n }\n\n let previousStops =\n Number.NEGATIVE_INFINITY;\n const ids: string[] = [];\n\n const nodes = record.nodes.map(\n (entry, index) => {\n const path =\n \"exposureProgramLineProfile.nodes[\" +\n index +\n \"]\";\n const node =\n requireRecord(entry, path, [\"nodeId\", \"opticalExposureStopsFromReference\", \"aperture\", \"shutterSeconds\"]);\n const nodeId =\n requireNonEmptyString(\n node.nodeId,\n path + \".nodeId\"\n );\n const stops =\n requireFinite(\n node\n .opticalExposureStopsFromReference,\n path +\n \".opticalExposureStopsFromReference\"\n );\n if (stops <= previousStops) {\n throw new InvalidConfigurationError(\n \"exposureProgramLineProfile.nodes opticalExposureStopsFromReference must be strictly increasing.\"\n );\n }\n previousStops = stops;\n ids.push(nodeId);\n\n return {\n nodeId,\n opticalExposureStopsFromReference:\n stops,\n aperture:\n requirePositiveFinite(\n node.aperture,\n path + \".aperture\"\n ),\n shutterSeconds:\n requirePositiveFinite(\n node.shutterSeconds,\n path +\n \".shutterSeconds\"\n )\n };\n }\n );\n\n if (\n new Set(ids).size !== ids.length\n ) {\n throw new InvalidConfigurationError(\n \"exposureProgramLineProfile.nodes[].nodeId must not contain duplicates.\"\n );\n }\n\n return {\n schemaVersion:\n EXPOSURE_PROGRAM_LINE_SCHEMA_VERSION,\n profileId:\n requireNonEmptyString(\n record.profileId,\n \"exposureProgramLineProfile.profileId\"\n ),\n profileVersion:\n requireNonEmptyString(\n record.profileVersion,\n \"exposureProgramLineProfile.profileVersion\"\n ),\n scientificStatus:\n \"approximation\",\n policyKind:\n \"generic-program-line\",\n interpolation:\n \"log2-aperture-shutter\",\n evidence: parseEvidenceList(\n record.evidence,\n \"exposureProgramLineProfile.evidence\"\n ),\n limitations:\n parseLimitations(\n record.limitations,\n \"exposureProgramLineProfile.limitations\"\n ),\n nodes\n };\n}\n"]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Develop joined parts (#571): the whole-image development steps of a capture whose RAW was rendered in parts.
|
|
3
|
+
* @see docs/QUICK_START.md, "Developing a capture rendered in parts".
|
|
4
|
+
*/
|
|
5
|
+
import { type SimulateCaptureDngPart, type SimulateCaptureOptions, type SimulateCaptureResult } from "./simulate-capture.js";
|
|
6
|
+
/**
|
|
7
|
+
* Develops the whole frame of `options` from the packed RAW of region renders of the same request (#571), so a capture can
|
|
8
|
+
* render its RAW in parallel parts and still take the development steps that filter across the whole image:
|
|
9
|
+
* `output.diffractionCorrection` and `output.sharpening`, which a region render refuses, and `output.lensCorrections` (#570), which
|
|
10
|
+
* runs on the whole developed frame here exactly as in `simulateCapture(options)`. The parts are joined exactly as
|
|
11
|
+
* {@link serializeSimulatedCaptureDngFromParts} joins them (they must cover every native site and agree where they overlap),
|
|
12
|
+
* and the joined RAW is the whole render's RAW, so the result's `image` (samples and JPEG or PNG bytes), `raw` codes and
|
|
13
|
+
* `plan` are those of `simulateCapture(options)`, bit for bit.
|
|
14
|
+
*
|
|
15
|
+
* `options` is the whole request (no `output.region`), with the development options it should have; render the parts with
|
|
16
|
+
* the same request plus `output.region`, without `output.diffractionCorrection`, `output.sharpening` and `output.dng`, and with a
|
|
17
|
+
* fixed white balance in place of `"auto"` (none of these change the RAW codes; auto white balance is measured here over the
|
|
18
|
+
* joined frame). A part may keep or drop `output.lensCorrections` (a corrected region only widens its `region.nativeRect`).
|
|
19
|
+
* Any `output.format` serves for a part.
|
|
20
|
+
*
|
|
21
|
+
* `onProgress` reports the `white-balance` (with auto white balance), `development`, `diffraction-correction`, `sharpening` and
|
|
22
|
+
* `jpeg` stages, the detail stages once per output row, so a host can show "Applying sharpening to the whole image". The lens
|
|
23
|
+
* corrections report no stage of their own: they run between `diffraction-correction` and `sharpening`.
|
|
24
|
+
* No `raw` stage is reported: no RAW is rendered. What differs from the whole render's result: `diagnostics.providerEvaluationCount`
|
|
25
|
+
* is 0, `diagnostics.timingsMs` are this call's, `diagnostics.fast` and the `raw.*` assumptions of how the RAW was rendered are
|
|
26
|
+
* not repeated (they are in the parts' results), and a `parts` assumption records the join.
|
|
27
|
+
* @returns The capture result of `options`, developed from the joined RAW.
|
|
28
|
+
*/
|
|
29
|
+
export declare function simulateCaptureFromParts(options: SimulateCaptureOptions, parts: readonly SimulateCaptureDngPart[]): Promise<SimulateCaptureResult>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
/**
|
|
3
|
+
* Develop joined parts (#571): the whole-image development steps of a capture whose RAW was rendered in parts.
|
|
4
|
+
* @see docs/QUICK_START.md, "Developing a capture rendered in parts".
|
|
5
|
+
*/
|
|
6
|
+
import { runCapture } from "./simulate-capture.js";
|
|
7
|
+
/**
|
|
8
|
+
* Develops the whole frame of `options` from the packed RAW of region renders of the same request (#571), so a capture can
|
|
9
|
+
* render its RAW in parallel parts and still take the development steps that filter across the whole image:
|
|
10
|
+
* `output.diffractionCorrection` and `output.sharpening`, which a region render refuses, and `output.lensCorrections` (#570), which
|
|
11
|
+
* runs on the whole developed frame here exactly as in `simulateCapture(options)`. The parts are joined exactly as
|
|
12
|
+
* {@link serializeSimulatedCaptureDngFromParts} joins them (they must cover every native site and agree where they overlap),
|
|
13
|
+
* and the joined RAW is the whole render's RAW, so the result's `image` (samples and JPEG or PNG bytes), `raw` codes and
|
|
14
|
+
* `plan` are those of `simulateCapture(options)`, bit for bit.
|
|
15
|
+
*
|
|
16
|
+
* `options` is the whole request (no `output.region`), with the development options it should have; render the parts with
|
|
17
|
+
* the same request plus `output.region`, without `output.diffractionCorrection`, `output.sharpening` and `output.dng`, and with a
|
|
18
|
+
* fixed white balance in place of `"auto"` (none of these change the RAW codes; auto white balance is measured here over the
|
|
19
|
+
* joined frame). A part may keep or drop `output.lensCorrections` (a corrected region only widens its `region.nativeRect`).
|
|
20
|
+
* Any `output.format` serves for a part.
|
|
21
|
+
*
|
|
22
|
+
* `onProgress` reports the `white-balance` (with auto white balance), `development`, `diffraction-correction`, `sharpening` and
|
|
23
|
+
* `jpeg` stages, the detail stages once per output row, so a host can show "Applying sharpening to the whole image". The lens
|
|
24
|
+
* corrections report no stage of their own: they run between `diffraction-correction` and `sharpening`.
|
|
25
|
+
* No `raw` stage is reported: no RAW is rendered. What differs from the whole render's result: `diagnostics.providerEvaluationCount`
|
|
26
|
+
* is 0, `diagnostics.timingsMs` are this call's, `diagnostics.fast` and the `raw.*` assumptions of how the RAW was rendered are
|
|
27
|
+
* not repeated (they are in the parts' results), and a `parts` assumption records the join.
|
|
28
|
+
* @returns The capture result of `options`, developed from the joined RAW.
|
|
29
|
+
*/
|
|
30
|
+
export async function simulateCaptureFromParts(options, parts) {
|
|
31
|
+
return await runCapture(options, "develop-from-parts", parts);
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=develop-joined-parts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"develop-joined-parts.js","sourceRoot":"","sources":["../../src/facade/develop-joined-parts.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC;;;GAGG;AAEH,OAAO,EAAE,UAAU,EAAwF,MAAM,uBAAuB,CAAC;AAEzI;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,OAA+B,EAAE,KAAwC;IACtH,OAAO,MAAM,UAAU,CAAC,OAAO,EAAE,oBAAoB,EAAE,KAAK,CAA0B,CAAC;AACzF,CAAC","sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\n/**\n * Develop joined parts (#571): the whole-image development steps of a capture whose RAW was rendered in parts.\n * @see docs/QUICK_START.md, \"Developing a capture rendered in parts\".\n */\n\nimport { runCapture, type SimulateCaptureDngPart, type SimulateCaptureOptions, type SimulateCaptureResult } from \"./simulate-capture.js\";\n\n/**\n * Develops the whole frame of `options` from the packed RAW of region renders of the same request (#571), so a capture can\n * render its RAW in parallel parts and still take the development steps that filter across the whole image:\n * `output.diffractionCorrection` and `output.sharpening`, which a region render refuses, and `output.lensCorrections` (#570), which\n * runs on the whole developed frame here exactly as in `simulateCapture(options)`. The parts are joined exactly as\n * {@link serializeSimulatedCaptureDngFromParts} joins them (they must cover every native site and agree where they overlap),\n * and the joined RAW is the whole render's RAW, so the result's `image` (samples and JPEG or PNG bytes), `raw` codes and\n * `plan` are those of `simulateCapture(options)`, bit for bit.\n *\n * `options` is the whole request (no `output.region`), with the development options it should have; render the parts with\n * the same request plus `output.region`, without `output.diffractionCorrection`, `output.sharpening` and `output.dng`, and with a\n * fixed white balance in place of `\"auto\"` (none of these change the RAW codes; auto white balance is measured here over the\n * joined frame). A part may keep or drop `output.lensCorrections` (a corrected region only widens its `region.nativeRect`).\n * Any `output.format` serves for a part.\n *\n * `onProgress` reports the `white-balance` (with auto white balance), `development`, `diffraction-correction`, `sharpening` and\n * `jpeg` stages, the detail stages once per output row, so a host can show \"Applying sharpening to the whole image\". The lens\n * corrections report no stage of their own: they run between `diffraction-correction` and `sharpening`.\n * No `raw` stage is reported: no RAW is rendered. What differs from the whole render's result: `diagnostics.providerEvaluationCount`\n * is 0, `diagnostics.timingsMs` are this call's, `diagnostics.fast` and the `raw.*` assumptions of how the RAW was rendered are\n * not repeated (they are in the parts' results), and a `parts` assumption records the join.\n * @returns The capture result of `options`, developed from the joined RAW.\n */\nexport async function simulateCaptureFromParts(options: SimulateCaptureOptions, parts: readonly SimulateCaptureDngPart[]): Promise<SimulateCaptureResult> {\n return await runCapture(options, \"develop-from-parts\", parts) as SimulateCaptureResult;\n}\n"]}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* What `simulateCapture` needs for `lens.catalogue` (#549), loaded on demand: a capture without a catalogue lens (and a bundle
|
|
3
|
-
* that never asks for one) does not load the catalogue's data or its PSF builder.
|
|
3
|
+
* that never asks for one) does not load the catalogue's data or its PSF builder. It also holds the developed-image lens
|
|
4
|
+
* corrections (`output.lensCorrections`, #570), which need a catalogue lens.
|
|
4
5
|
*/
|
|
5
|
-
export { GENERIC_LENS_EVIDENCE, genericLensDistortionProfile, genericLensVignettingProfile, resolveGenericLens, simulateGenericLensFocusError } from "../equipment/generic-lens-catalogue.js";
|
|
6
|
+
export { GENERIC_LENS_EVIDENCE, genericLensDispersion, genericLensDistortionProfile, genericLensVignettingProfile, resolveGenericLens, simulateGenericLensFocusError } from "../equipment/generic-lens-catalogue.js";
|
|
6
7
|
export { createGenericLensPsfProfile, genericLensPsfKernelRadius, GENERIC_LENS_PSF_MAXIMUM_COMBINED_RADIUS_SITES } from "../optics/generic-lens-psf.js";
|
|
7
8
|
export { CATALOGUE_FAST_VERIFICATION_TOLERANCE, catalogueFastAssumptions, createCatalogueLensSignal } from "./catalogue-lens-signal.js";
|
|
9
|
+
export { applyDevelopedLensCorrection, developedLensCorrectionSourceRect, prepareDevelopedLensCorrection } from "../output/developed-lens-corrections.js";
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
/**
|
|
3
3
|
* What `simulateCapture` needs for `lens.catalogue` (#549), loaded on demand: a capture without a catalogue lens (and a bundle
|
|
4
|
-
* that never asks for one) does not load the catalogue's data or its PSF builder.
|
|
4
|
+
* that never asks for one) does not load the catalogue's data or its PSF builder. It also holds the developed-image lens
|
|
5
|
+
* corrections (`output.lensCorrections`, #570), which need a catalogue lens.
|
|
5
6
|
*/
|
|
6
|
-
export { GENERIC_LENS_EVIDENCE, genericLensDistortionProfile, genericLensVignettingProfile, resolveGenericLens, simulateGenericLensFocusError } from "../equipment/generic-lens-catalogue.js";
|
|
7
|
+
export { GENERIC_LENS_EVIDENCE, genericLensDispersion, genericLensDistortionProfile, genericLensVignettingProfile, resolveGenericLens, simulateGenericLensFocusError } from "../equipment/generic-lens-catalogue.js";
|
|
7
8
|
export { createGenericLensPsfProfile, genericLensPsfKernelRadius, GENERIC_LENS_PSF_MAXIMUM_COMBINED_RADIUS_SITES } from "../optics/generic-lens-psf.js";
|
|
8
9
|
export { CATALOGUE_FAST_VERIFICATION_TOLERANCE, catalogueFastAssumptions, createCatalogueLensSignal } from "./catalogue-lens-signal.js";
|
|
10
|
+
export { applyDevelopedLensCorrection, developedLensCorrectionSourceRect, prepareDevelopedLensCorrection } from "../output/developed-lens-corrections.js";
|
|
9
11
|
//# sourceMappingURL=generic-lens-capture.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic-lens-capture.js","sourceRoot":"","sources":["../../src/facade/generic-lens-capture.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC
|
|
1
|
+
{"version":3,"file":"generic-lens-capture.js","sourceRoot":"","sources":["../../src/facade/generic-lens-capture.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC;;;;GAIG;AACH,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,4BAA4B,EAAE,kBAAkB,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AACrN,OAAO,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,8CAA8C,EAAE,MAAM,+BAA+B,CAAC;AACxJ,OAAO,EAAE,qCAAqC,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACxI,OAAO,EAAE,4BAA4B,EAAE,iCAAiC,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC","sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\n/**\n * What `simulateCapture` needs for `lens.catalogue` (#549), loaded on demand: a capture without a catalogue lens (and a bundle\n * that never asks for one) does not load the catalogue's data or its PSF builder. It also holds the developed-image lens\n * corrections (`output.lensCorrections`, #570), which need a catalogue lens.\n */\nexport { GENERIC_LENS_EVIDENCE, genericLensDispersion, genericLensDistortionProfile, genericLensVignettingProfile, resolveGenericLens, simulateGenericLensFocusError } from \"../equipment/generic-lens-catalogue.js\";\nexport { createGenericLensPsfProfile, genericLensPsfKernelRadius, GENERIC_LENS_PSF_MAXIMUM_COMBINED_RADIUS_SITES } from \"../optics/generic-lens-psf.js\";\nexport { CATALOGUE_FAST_VERIFICATION_TOLERANCE, catalogueFastAssumptions, createCatalogueLensSignal } from \"./catalogue-lens-signal.js\";\nexport { applyDevelopedLensCorrection, developedLensCorrectionSourceRect, prepareDevelopedLensCorrection } from \"../output/developed-lens-corrections.js\";\n"]}
|
|
@@ -253,6 +253,18 @@ export interface SimulateCaptureDiffractionCorrection {
|
|
|
253
253
|
/** FIR radius R in pixels, 1–16. Default: the Airy pattern's third dark ring at the design wavelength, within 1–16. */
|
|
254
254
|
kernelRadiusPixels?: number;
|
|
255
255
|
}
|
|
256
|
+
/**
|
|
257
|
+
* `output.lensCorrections` (#570): which of the catalogue lens's generic corrections (`createGenericLensCorrectionProfile`) the
|
|
258
|
+
* development applies. Each is off unless set to true.
|
|
259
|
+
*/
|
|
260
|
+
export interface SimulateCaptureLensCorrections {
|
|
261
|
+
/** Radial distortion r_d = r(1 + k1ρ²), inverted by resampling: it stretches the corners and lowers their resolution. */
|
|
262
|
+
distortion?: boolean;
|
|
263
|
+
/** Lateral colour: each channel rescaled by 1/(1 + L·D(λ_c)) into register; axial (longitudinal) colour stays. */
|
|
264
|
+
lateralColor?: boolean;
|
|
265
|
+
/** Vignetting: a gain 1/E(ρ) at each pixel's source point; corner noise rises with the signal, the SNR does not. */
|
|
266
|
+
vignetting?: boolean;
|
|
267
|
+
}
|
|
256
268
|
/** `diagnostics.detail` (#552): what the development detail stages did. Present only when one ran. */
|
|
257
269
|
export interface SimulateCaptureDetailDiagnostics {
|
|
258
270
|
diffractionCorrection?: {
|
|
@@ -314,7 +326,8 @@ export interface SimulateCaptureOptions {
|
|
|
314
326
|
* distance beyond the focal length (no minimum focus distance; `subjectDistanceM` must be at least twice the focal length, as for
|
|
315
327
|
* every lens). Works in `simulateCapture` and the display view. Not combinable with `prime`, `catalogue` or `focalLengthMm`.
|
|
316
328
|
* Optional `widestFNumber` and `narrowestFNumber` (within `IDEAL_LENS_LIMITS`, widest ≤ narrowest; each defaults to its bound)
|
|
317
|
-
* narrow the range: `fNumber` must lie in it, and shutter priority and program choose apertures only in it
|
|
329
|
+
* narrow the range: `fNumber` must lie in it, and shutter priority and program choose apertures only in it (program limits its
|
|
330
|
+
* line to a range that does not hold f/4–f/16, #583). Default off.
|
|
318
331
|
*/
|
|
319
332
|
ideal?: {
|
|
320
333
|
focalLengthMm: number;
|
|
@@ -547,6 +560,16 @@ export interface SimulateCaptureOptions {
|
|
|
547
560
|
* (not the wide-gamut or perceptual PNG paths); not combinable with `region`. The DNG's RAW codes are not changed. Default off.
|
|
548
561
|
*/
|
|
549
562
|
sharpening?: SimulateCaptureSharpening;
|
|
563
|
+
/**
|
|
564
|
+
* Opt-in (#570), with `lens.catalogue`: the lens's generic corrections (see {@link SimulateCaptureLensCorrections}) on the
|
|
565
|
+
* developed linear colour, after demosaic, colour, white balance and `diffractionCorrection`, before the tone curve; for the JPEG,
|
|
566
|
+
* PNG and samples. The RAW and the DNG are never corrected. To keep the output size with no missing pixels, the corrected image is
|
|
567
|
+
* magnified by the smallest factor 1/m ≥ 1 that keeps every pixel's source inside the frame (recorded in the
|
|
568
|
+
* `output.lensCorrections` assumption). Works with `region`: a region develops the frame pixels its corrected pixels read
|
|
569
|
+
* (`region.nativeRect`, `raw` and `plan` describe that rectangle) and its pixels are the whole render's. All off (or omitted):
|
|
570
|
+
* the development is unchanged.
|
|
571
|
+
*/
|
|
572
|
+
lensCorrections?: SimulateCaptureLensCorrections;
|
|
550
573
|
};
|
|
551
574
|
/** Camera motion and shutter type. Default: still camera, global electronic shutter. */
|
|
552
575
|
motion?: SimulateCaptureMotion;
|
|
@@ -585,14 +608,14 @@ export interface SimulateCaptureOptions {
|
|
|
585
608
|
fast?: boolean;
|
|
586
609
|
/** Aborting cancels the running task; the promise rejects with a domain error and returns no partial image. */
|
|
587
610
|
signal?: AbortSignal;
|
|
588
|
-
/** Called after each committed RAW, development or JPEG tile. Cannot change output. */
|
|
611
|
+
/** Called after each committed RAW, development, detail or JPEG tile (see {@link SimulateCaptureProgress}). Cannot change output. */
|
|
589
612
|
onProgress?: (progress: SimulateCaptureProgress) => void;
|
|
590
613
|
}
|
|
591
614
|
/**
|
|
592
615
|
* Options reported in `diagnostics.options` (2.1), in this order, when they ran: the ones that change how much work
|
|
593
616
|
* a capture does. `motion.rotation` is a non-zero angular velocity; `sensor.temporalSampleCount` a count above 1.
|
|
594
617
|
*/
|
|
595
|
-
export declare const SIMULATE_CAPTURE_COST_OPTIONS: readonly ["lens.pupilSampling", "lens.projection", "lens.distortion", "lens.vignetting", "lens.psf", "lens.diffraction", "lens.defocus", "lens.catalogue", "sensor.antiAliasing", "sensor.pixelAperture.box", "sensor.temporalSampleCount", "motion.rotation", "motion.shutter.rolling", "output.borderHandling.mirror", "output.region", "output.whiteBalance.auto", "output.demosaic.ahd", "output.highlightMode.reconstruct", "output.colorEncoding.wide-gamut", "output.gamutMapping.perceptual", "output.diffractionCorrection", "output.sharpening", "output.format.jpeg", "output.format.png", "output.format.dng"];
|
|
618
|
+
export declare const SIMULATE_CAPTURE_COST_OPTIONS: readonly ["lens.pupilSampling", "lens.projection", "lens.distortion", "lens.vignetting", "lens.psf", "lens.diffraction", "lens.defocus", "lens.catalogue", "sensor.antiAliasing", "sensor.pixelAperture.box", "sensor.temporalSampleCount", "motion.rotation", "motion.shutter.rolling", "output.borderHandling.mirror", "output.region", "output.whiteBalance.auto", "output.demosaic.ahd", "output.highlightMode.reconstruct", "output.colorEncoding.wide-gamut", "output.gamutMapping.perceptual", "output.diffractionCorrection", "output.sharpening", "output.lensCorrections", "output.format.jpeg", "output.format.png", "output.format.dng"];
|
|
596
619
|
export type SimulateCaptureCostOption = typeof SIMULATE_CAPTURE_COST_OPTIONS[number];
|
|
597
620
|
/**
|
|
598
621
|
* The options that take the exact-or-fast flag (#395), in the path style of {@link SIMULATE_CAPTURE_COST_OPTIONS}: each accepts
|
|
@@ -610,8 +633,15 @@ export interface SimulateCaptureFastReport {
|
|
|
610
633
|
/** `engine-reference` when every option ran exact; `approximation-with-a-priori-bound` when any fast method ran (the WebGPU execution record's values). */
|
|
611
634
|
assurance: "engine-reference" | "approximation-with-a-priori-bound";
|
|
612
635
|
}
|
|
636
|
+
/**
|
|
637
|
+
* One progress event of `onProgress`. Stages run in this order: `raw`, `white-balance` (with auto white balance), `development`
|
|
638
|
+
* (rows), then, when requested, `diffraction-correction` and `sharpening` (#571: one event per output row of the whole image;
|
|
639
|
+
* each stage's last event has `completedTileCount === totalTileCount`), then `jpeg`. `output.lensCorrections` (#570) runs between
|
|
640
|
+
* `diffraction-correction` and `sharpening` and reports no stage of its own. {@link simulateCaptureFromParts}
|
|
641
|
+
* reports no `raw` stage: its RAW comes from the parts.
|
|
642
|
+
*/
|
|
613
643
|
export interface SimulateCaptureProgress {
|
|
614
|
-
stage: "raw" | "white-balance" | "development" | "jpeg";
|
|
644
|
+
stage: "raw" | "white-balance" | "development" | "diffraction-correction" | "sharpening" | "jpeg";
|
|
615
645
|
completedTileCount: number;
|
|
616
646
|
totalTileCount: number;
|
|
617
647
|
}
|
|
@@ -1214,11 +1244,13 @@ export interface ParsedDisplayView {
|
|
|
1214
1244
|
export declare function parseDisplayViewOption(value: unknown, frameWidth: number, frameHeight: number): ParsedDisplayView;
|
|
1215
1245
|
/** Internal: passed as the view of a "display-view" run to resolve the request without a view (`prepareDisplayView`, #387). */
|
|
1216
1246
|
export declare const DISPLAY_VIEW_WITHOUT_VIEW: unique symbol;
|
|
1247
|
+
/** Internal: what `runCapture` produces. The two `-from-parts` runs take the parts as `viewOption`. */
|
|
1248
|
+
type CaptureRun = "capture" | "ideal-reference" | "display-view" | "dng-from-parts" | "develop-from-parts";
|
|
1217
1249
|
/**
|
|
1218
1250
|
* Internal: the request path shared by {@link simulateCapture}, {@link simulateIdealReference} and the display view, whose renderer is
|
|
1219
1251
|
* passed in; for a display view the renderer's value is returned (a result, or a prepared view with DISPLAY_VIEW_WITHOUT_VIEW).
|
|
1220
1252
|
*/
|
|
1221
|
-
export declare function runCapture(options: SimulateCaptureOptions, run:
|
|
1253
|
+
export declare function runCapture(options: SimulateCaptureOptions, run: CaptureRun, viewOption?: unknown, renderView?: (context: DisplayViewRunContext) => Promise<unknown>): Promise<unknown>;
|
|
1222
1254
|
/** Chart preset ids accepted by `simulateCapture({ scene: { preset } })`. */
|
|
1223
1255
|
export declare const SIMULATE_CAPTURE_CHART_PRESETS: readonly ("composite" | "uniform" | "patches" | "slanted-edge" | "siemens-star" | "step-wedge" | "grey-ramp" | "checkerboard" | "point-grid" | "color-patches" | "dead-leaves" | "bar-groups" | "hyperbolic-wedge" | "zone-plate" | "slanted-squares" | "line-grid" | "fiducial")[];
|
|
1224
1256
|
export {};
|