@photivra/engine 2.18.0 → 2.20.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.
Files changed (335) hide show
  1. package/CHANGELOG.md +179 -1
  2. package/CITATION.cff +1 -1
  3. package/NODE_SUPPORT.md +7 -5
  4. package/README.md +6 -6
  5. package/SECURITY.md +1 -1
  6. package/THIRD_PARTY.md +14 -10
  7. package/dist/capture/dng-lens-correction-opcodes.d.ts +32 -0
  8. package/dist/capture/dng-lens-correction-opcodes.js +119 -0
  9. package/dist/capture/dng-lens-correction-opcodes.js.map +1 -0
  10. package/dist/capture/focus-control.js +2 -75
  11. package/dist/capture/focus-control.js.map +1 -1
  12. package/dist/capture/native-environment-lean.d.ts +1 -0
  13. package/dist/capture/native-environment-lean.js +2 -6
  14. package/dist/capture/native-environment-lean.js.map +1 -1
  15. package/dist/capture/native-environment-optical-stage.d.ts +1 -0
  16. package/dist/capture/native-environment-optical-stage.js +2 -5
  17. package/dist/capture/native-environment-optical-stage.js.map +1 -1
  18. package/dist/capture/native-environment-raw.js +1 -5
  19. package/dist/capture/native-environment-raw.js.map +1 -1
  20. package/dist/capture/native-raw-dng.d.ts +6 -0
  21. package/dist/capture/native-raw-dng.js +16 -2
  22. package/dist/capture/native-raw-dng.js.map +1 -1
  23. package/dist/capture/release-sequence.js +2 -47
  24. package/dist/capture/release-sequence.js.map +1 -1
  25. package/dist/capture/sensor-raw-producer.js +3 -5
  26. package/dist/capture/sensor-raw-producer.js.map +1 -1
  27. package/dist/color/white-balance.d.ts +2 -0
  28. package/dist/color/white-balance.js +3 -56
  29. package/dist/color/white-balance.js.map +1 -1
  30. package/dist/composition/image-formation-plan.d.ts +1 -0
  31. package/dist/composition/image-formation-plan.js +3 -49
  32. package/dist/composition/image-formation-plan.js.map +1 -1
  33. package/dist/core/evidence-provenance.js +1 -16
  34. package/dist/core/evidence-provenance.js.map +1 -1
  35. package/dist/core/record-validation.d.ts +54 -0
  36. package/dist/core/record-validation.js +176 -0
  37. package/dist/core/record-validation.js.map +1 -1
  38. package/dist/core/scientific-assurance.js +1 -18
  39. package/dist/core/scientific-assurance.js.map +1 -1
  40. package/dist/core/shared-helpers.d.ts +35 -0
  41. package/dist/core/shared-helpers.js +38 -0
  42. package/dist/core/shared-helpers.js.map +1 -0
  43. package/dist/core/spectral-composition.js +1 -36
  44. package/dist/core/spectral-composition.js.map +1 -1
  45. package/dist/core/spectral.js +1 -19
  46. package/dist/core/spectral.js.map +1 -1
  47. package/dist/core/version.d.ts +1 -1
  48. package/dist/core/version.js +1 -1
  49. package/dist/core/version.js.map +1 -1
  50. package/dist/equipment/exposure-capabilities.d.ts +1 -0
  51. package/dist/equipment/exposure-capabilities.js +2 -36
  52. package/dist/equipment/exposure-capabilities.js.map +1 -1
  53. package/dist/equipment/generic-lens-catalogue.d.ts +8 -2
  54. package/dist/equipment/generic-lens-catalogue.js +31 -2
  55. package/dist/equipment/generic-lens-catalogue.js.map +1 -1
  56. package/dist/equipment/generic-tier-assets.js +2 -3
  57. package/dist/equipment/generic-tier-assets.js.map +1 -1
  58. package/dist/equipment/generic-tier-presets.js +2 -3
  59. package/dist/equipment/generic-tier-presets.js.map +1 -1
  60. package/dist/equipment/iso-capabilities.js +2 -49
  61. package/dist/equipment/iso-capabilities.js.map +1 -1
  62. package/dist/equipment/metering-capabilities.js +1 -26
  63. package/dist/equipment/metering-capabilities.js.map +1 -1
  64. package/dist/equipment/release-capabilities.js +1 -53
  65. package/dist/equipment/release-capabilities.js.map +1 -1
  66. package/dist/exposure/auto-iso-slowest-shutter.js +1 -7
  67. package/dist/exposure/auto-iso-slowest-shutter.js.map +1 -1
  68. package/dist/exposure/exposure-duration-control.js +1 -16
  69. package/dist/exposure/exposure-duration-control.js.map +1 -1
  70. package/dist/exposure/exposure-mode-resolver.js +1 -17
  71. package/dist/exposure/exposure-mode-resolver.js.map +1 -1
  72. package/dist/exposure/filtered-exposure-time.d.ts +93 -0
  73. package/dist/exposure/filtered-exposure-time.js +129 -0
  74. package/dist/exposure/filtered-exposure-time.js.map +1 -0
  75. package/dist/exposure/flash-ttl.d.ts +1 -0
  76. package/dist/exposure/flash-ttl.js +1 -1
  77. package/dist/exposure/flash-ttl.js.map +1 -1
  78. package/dist/exposure/flash.js +1 -49
  79. package/dist/exposure/flash.js.map +1 -1
  80. package/dist/exposure/metering-scene-radiance.js +1 -25
  81. package/dist/exposure/metering-scene-radiance.js.map +1 -1
  82. package/dist/exposure/metering-target.js +1 -30
  83. package/dist/exposure/metering-target.js.map +1 -1
  84. package/dist/exposure/metering-temporal.js +1 -8
  85. package/dist/exposure/metering-temporal.js.map +1 -1
  86. package/dist/exposure/metering.js +1 -72
  87. package/dist/exposure/metering.js.map +1 -1
  88. package/dist/exposure/program-line.js +1 -45
  89. package/dist/exposure/program-line.js.map +1 -1
  90. package/dist/facade/develop-joined-parts.d.ts +29 -0
  91. package/dist/facade/develop-joined-parts.js +33 -0
  92. package/dist/facade/develop-joined-parts.js.map +1 -0
  93. package/dist/facade/display-view-gpu.d.ts +7 -4
  94. package/dist/facade/display-view-gpu.js +4 -4
  95. package/dist/facade/display-view-gpu.js.map +1 -1
  96. package/dist/facade/display-view-lens-signal.d.ts +1 -1
  97. package/dist/facade/display-view-lens-signal.js +5 -3
  98. package/dist/facade/display-view-lens-signal.js.map +1 -1
  99. package/dist/facade/display-view.d.ts +3 -1
  100. package/dist/facade/display-view.js +1 -1
  101. package/dist/facade/display-view.js.map +1 -1
  102. package/dist/facade/fast-methods.d.ts +50 -0
  103. package/dist/facade/fast-methods.js +50 -0
  104. package/dist/facade/fast-methods.js.map +1 -0
  105. package/dist/facade/fast-resolution.d.ts +12 -0
  106. package/dist/facade/fast-resolution.js +18 -0
  107. package/dist/facade/fast-resolution.js.map +1 -0
  108. package/dist/facade/generic-lens-capture.d.ts +6 -3
  109. package/dist/facade/generic-lens-capture.js +6 -3
  110. package/dist/facade/generic-lens-capture.js.map +1 -1
  111. package/dist/facade/simulate-capture.d.ts +88 -16
  112. package/dist/facade/simulate-capture.js +279 -153
  113. package/dist/facade/simulate-capture.js.map +1 -1
  114. package/dist/facade/simulate-display-view.d.ts +3 -2
  115. package/dist/facade/simulate-display-view.js +22 -12
  116. package/dist/facade/simulate-display-view.js.map +1 -1
  117. package/dist/gpu/chart-composite-gpu.js +1 -3
  118. package/dist/gpu/chart-composite-gpu.js.map +1 -1
  119. package/dist/gpu/chart-radiance-gpu.js +1 -5
  120. package/dist/gpu/chart-radiance-gpu.js.map +1 -1
  121. package/dist/gpu/display-view-quality-gpu.d.ts +13 -1
  122. package/dist/gpu/display-view-quality-gpu.js +4 -8
  123. package/dist/gpu/display-view-quality-gpu.js.map +1 -1
  124. package/dist/gpu/display-view-speed-gpu.js +3 -25
  125. package/dist/gpu/display-view-speed-gpu.js.map +1 -1
  126. package/dist/gpu/sensor-stage-gpu.js +1 -5
  127. package/dist/gpu/sensor-stage-gpu.js.map +1 -1
  128. package/dist/gpu/webgpu-runtime.d.ts +2 -0
  129. package/dist/gpu/webgpu-runtime.js +3 -0
  130. package/dist/gpu/webgpu-runtime.js.map +1 -1
  131. package/dist/index.d.ts +11 -1
  132. package/dist/index.js +8 -0
  133. package/dist/index.js.map +1 -1
  134. package/dist/motion/camera-rotation.js +1 -6
  135. package/dist/motion/camera-rotation.js.map +1 -1
  136. package/dist/motion/capture-rotation-inverse-mapping.d.ts +12 -0
  137. package/dist/motion/capture-rotation-inverse-mapping.js +2 -2
  138. package/dist/motion/capture-rotation-inverse-mapping.js.map +1 -1
  139. package/dist/motion/capture-rotation-temporal-quadrature.d.ts +1 -0
  140. package/dist/motion/capture-rotation-temporal-quadrature.js +1 -1
  141. package/dist/motion/capture-rotation-temporal-quadrature.js.map +1 -1
  142. package/dist/motion/capture-rotation-trajectory.js +2 -17
  143. package/dist/motion/capture-rotation-trajectory.js.map +1 -1
  144. package/dist/motion/capture-translation-parallax-temporal-quadrature.d.ts +1 -0
  145. package/dist/motion/capture-translation-parallax-temporal-quadrature.js +3 -14
  146. package/dist/motion/capture-translation-parallax-temporal-quadrature.js.map +1 -1
  147. package/dist/motion/extended-object-projection.js +5 -40
  148. package/dist/motion/extended-object-projection.js.map +1 -1
  149. package/dist/optics/aperture-diameter.d.ts +47 -0
  150. package/dist/optics/aperture-diameter.js +50 -0
  151. package/dist/optics/aperture-diameter.js.map +1 -0
  152. package/dist/optics/atmospheric-haze.js +1 -7
  153. package/dist/optics/atmospheric-haze.js.map +1 -1
  154. package/dist/optics/brown-conrady-distortion.js +1 -7
  155. package/dist/optics/brown-conrady-distortion.js.map +1 -1
  156. package/dist/optics/complex-pupil-psf.d.ts +1 -0
  157. package/dist/optics/complex-pupil-psf.js +2 -84
  158. package/dist/optics/complex-pupil-psf.js.map +1 -1
  159. package/dist/optics/detail-limit.d.ts +182 -0
  160. package/dist/optics/detail-limit.js +336 -0
  161. package/dist/optics/detail-limit.js.map +1 -0
  162. package/dist/optics/focus-state.js +1 -11
  163. package/dist/optics/focus-state.js.map +1 -1
  164. package/dist/optics/front-of-lens-filter.d.ts +5 -0
  165. package/dist/optics/front-of-lens-filter.js +3 -65
  166. package/dist/optics/front-of-lens-filter.js.map +1 -1
  167. package/dist/optics/generic-lens-psf.d.ts +18 -2
  168. package/dist/optics/generic-lens-psf.js +25 -2
  169. package/dist/optics/generic-lens-psf.js.map +1 -1
  170. package/dist/optics/generic-nd-filter-presets.d.ts +12 -0
  171. package/dist/optics/generic-nd-filter-presets.js +48 -0
  172. package/dist/optics/generic-nd-filter-presets.js.map +1 -0
  173. package/dist/optics/illumination-vignetting.js +1 -6
  174. package/dist/optics/illumination-vignetting.js.map +1 -1
  175. package/dist/optics/lens-psf-profile.d.ts +4 -1
  176. package/dist/optics/lens-psf-profile.js +12 -111
  177. package/dist/optics/lens-psf-profile.js.map +1 -1
  178. package/dist/optics/longitudinal-chromatic-aberration.js +1 -7
  179. package/dist/optics/longitudinal-chromatic-aberration.js.map +1 -1
  180. package/dist/optics/pupil-vignetting.js +1 -7
  181. package/dist/optics/pupil-vignetting.js.map +1 -1
  182. package/dist/optics/radial-distortion.js +1 -6
  183. package/dist/optics/radial-distortion.js.map +1 -1
  184. package/dist/optics/scene-to-sensor-irradiance.d.ts +13 -0
  185. package/dist/optics/scene-to-sensor-irradiance.js +11 -96
  186. package/dist/optics/scene-to-sensor-irradiance.js.map +1 -1
  187. package/dist/optics/stray-light.d.ts +1 -0
  188. package/dist/optics/stray-light.js +1 -1
  189. package/dist/optics/stray-light.js.map +1 -1
  190. package/dist/optics/zernike-wavefront.js +1 -7
  191. package/dist/optics/zernike-wavefront.js.map +1 -1
  192. package/dist/output/capture-geometry.js +1 -8
  193. package/dist/output/capture-geometry.js.map +1 -1
  194. package/dist/output/crop-to-match-focal-length.d.ts +62 -0
  195. package/dist/output/crop-to-match-focal-length.js +63 -0
  196. package/dist/output/crop-to-match-focal-length.js.map +1 -0
  197. package/dist/output/developed-lens-corrections.d.ts +62 -0
  198. package/dist/output/developed-lens-corrections.js +135 -0
  199. package/dist/output/developed-lens-corrections.js.map +1 -0
  200. package/dist/output/generic-lens-corrections.d.ts +5 -7
  201. package/dist/output/generic-lens-corrections.js +11 -10
  202. package/dist/output/generic-lens-corrections.js.map +1 -1
  203. package/dist/output/geometric-transforms.js +1 -4
  204. package/dist/output/geometric-transforms.js.map +1 -1
  205. package/dist/output/lens-corrections.d.ts +12 -2
  206. package/dist/output/lens-corrections.js +22 -7
  207. package/dist/output/lens-corrections.js.map +1 -1
  208. package/dist/output/native-capture-sdr.d.ts +2 -2
  209. package/dist/output/native-capture-sdr.js +3 -2
  210. package/dist/output/native-capture-sdr.js.map +1 -1
  211. package/dist/output/print-contrast-reference.js +1 -1
  212. package/dist/output/print-contrast-reference.js.map +1 -1
  213. package/dist/output/print-size-blur-noise.d.ts +110 -0
  214. package/dist/output/print-size-blur-noise.js +138 -0
  215. package/dist/output/print-size-blur-noise.js.map +1 -0
  216. package/dist/processing/development-detail.d.ts +29 -0
  217. package/dist/processing/development-detail.js +128 -107
  218. package/dist/processing/development-detail.js.map +1 -1
  219. package/dist/schema/illumination-temporal.js +3 -72
  220. package/dist/schema/illumination-temporal.js.map +1 -1
  221. package/dist/schema/illumination.d.ts +1 -0
  222. package/dist/schema/illumination.js +2 -65
  223. package/dist/schema/illumination.js.map +1 -1
  224. package/dist/schema/scene-radiance-temporal.js +2 -14
  225. package/dist/schema/scene-radiance-temporal.js.map +1 -1
  226. package/dist/schema/scene-radiance.js +2 -60
  227. package/dist/schema/scene-radiance.js.map +1 -1
  228. package/dist/schema/validation.d.ts +2 -0
  229. package/dist/schema/validation.js +2 -17
  230. package/dist/schema/validation.js.map +1 -1
  231. package/dist/sensor/accumulated-charge.js +2 -59
  232. package/dist/sensor/accumulated-charge.js.map +1 -1
  233. package/dist/sensor/architecture.js +1 -16
  234. package/dist/sensor/architecture.js.map +1 -1
  235. package/dist/sensor/camera-saturation-capacity.d.ts +1 -0
  236. package/dist/sensor/camera-saturation-capacity.js +3 -55
  237. package/dist/sensor/camera-saturation-capacity.js.map +1 -1
  238. package/dist/sensor/capture-color-sampling-binding.js +1 -26
  239. package/dist/sensor/capture-color-sampling-binding.js.map +1 -1
  240. package/dist/sensor/capture-mode-timing.js +1 -39
  241. package/dist/sensor/capture-mode-timing.js.map +1 -1
  242. package/dist/sensor/capture-mode.js +1 -23
  243. package/dist/sensor/capture-mode.js.map +1 -1
  244. package/dist/sensor/color-sampling.js +1 -26
  245. package/dist/sensor/color-sampling.js.map +1 -1
  246. package/dist/sensor/constant-rate-temporal-integration.js +2 -46
  247. package/dist/sensor/constant-rate-temporal-integration.js.map +1 -1
  248. package/dist/sensor/dark-current.js +2 -45
  249. package/dist/sensor/dark-current.js.map +1 -1
  250. package/dist/sensor/eqe-electron-rate.js +2 -41
  251. package/dist/sensor/eqe-electron-rate.js.map +1 -1
  252. package/dist/sensor/exposure-window.d.ts +7 -0
  253. package/dist/sensor/exposure-window.js +9 -24
  254. package/dist/sensor/exposure-window.js.map +1 -1
  255. package/dist/sensor/iso-gain.js +1 -7
  256. package/dist/sensor/iso-gain.js.map +1 -1
  257. package/dist/sensor/iso-signal-chain.js +1 -43
  258. package/dist/sensor/iso-signal-chain.js.map +1 -1
  259. package/dist/sensor/optical-stack.js +1 -25
  260. package/dist/sensor/optical-stack.js.map +1 -1
  261. package/dist/sensor/photon-energy.js +1 -26
  262. package/dist/sensor/photon-energy.js.map +1 -1
  263. package/dist/sensor/physical-charge-capacity.js +3 -77
  264. package/dist/sensor/physical-charge-capacity.js.map +1 -1
  265. package/dist/sensor/radiometry-readiness.js +2 -23
  266. package/dist/sensor/radiometry-readiness.js.map +1 -1
  267. package/dist/sensor/raw-readout.d.ts +3 -0
  268. package/dist/sensor/raw-readout.js +4 -66
  269. package/dist/sensor/raw-readout.js.map +1 -1
  270. package/dist/sensor/raw-reconstruction.js +2 -64
  271. package/dist/sensor/raw-reconstruction.js.map +1 -1
  272. package/dist/sensor/readout-exposure-linkage.js +1 -9
  273. package/dist/sensor/readout-exposure-linkage.js.map +1 -1
  274. package/dist/sensor/readout-timing.js +4 -79
  275. package/dist/sensor/readout-timing.js.map +1 -1
  276. package/dist/sensor/response-application-compatibility.d.ts +2 -0
  277. package/dist/sensor/response-application-compatibility.js +4 -35
  278. package/dist/sensor/response-application-compatibility.js.map +1 -1
  279. package/dist/sensor/response-operating-range.d.ts +1 -0
  280. package/dist/sensor/response-operating-range.js +3 -79
  281. package/dist/sensor/response-operating-range.js.map +1 -1
  282. package/dist/sensor/responsivity-photocurrent.js +4 -114
  283. package/dist/sensor/responsivity-photocurrent.js.map +1 -1
  284. package/dist/sensor/sampling-aperture.js +1 -25
  285. package/dist/sensor/sampling-aperture.js.map +1 -1
  286. package/dist/sensor/sensor-characteristics.d.ts +137 -0
  287. package/dist/sensor/sensor-characteristics.js +115 -0
  288. package/dist/sensor/sensor-characteristics.js.map +1 -0
  289. package/dist/sensor/spatial-sample-reduction.js +3 -24
  290. package/dist/sensor/spatial-sample-reduction.js.map +1 -1
  291. package/dist/sensor/spatial-sampling-quadrature.js +1 -3
  292. package/dist/sensor/spatial-sampling-quadrature.js.map +1 -1
  293. package/dist/sensor/spatio-spectral-reduction.js +1 -18
  294. package/dist/sensor/spatio-spectral-reduction.js.map +1 -1
  295. package/dist/sensor/spectral-coverage.d.ts +10 -1
  296. package/dist/sensor/spectral-coverage.js +1 -1
  297. package/dist/sensor/spectral-coverage.js.map +1 -1
  298. package/dist/sensor/spectral-quadrature.js +3 -41
  299. package/dist/sensor/spectral-quadrature.js.map +1 -1
  300. package/dist/sensor/spectral-response.js +1 -47
  301. package/dist/sensor/spectral-response.js.map +1 -1
  302. package/dist/sensor/temporal-photo-signal.d.ts +3 -0
  303. package/dist/sensor/temporal-photo-signal.js +5 -2
  304. package/dist/sensor/temporal-photo-signal.js.map +1 -1
  305. package/dist/stabilization/camera-shake.js +1 -6
  306. package/dist/stabilization/camera-shake.js.map +1 -1
  307. package/dist/stabilization/system.d.ts +9 -0
  308. package/dist/stabilization/system.js +7 -86
  309. package/dist/stabilization/system.js.map +1 -1
  310. package/docs/AGENT_GUIDE.md +5 -0
  311. package/docs/API_REFERENCE.md +116 -3
  312. package/docs/QUICK_START.md +178 -14
  313. package/docs/USAGE.md +111 -3
  314. package/docs/api/capture-native-raw-dng.md +6 -0
  315. package/docs/api/core-version.md +1 -1
  316. package/docs/api/equipment-generic-lens-catalogue.md +7 -2
  317. package/docs/api/exports.json +203 -3
  318. package/docs/api/exposure-filtered-exposure-time.md +105 -0
  319. package/docs/api/facade-develop-joined-parts.md +32 -0
  320. package/docs/api/facade-display-view-gpu.md +5 -2
  321. package/docs/api/facade-fast-methods.md +91 -0
  322. package/docs/api/facade-simulate-capture.md +72 -16
  323. package/docs/api/facade-simulate-display-view.md +3 -2
  324. package/docs/api/optics-aperture-diameter.md +51 -0
  325. package/docs/api/optics-detail-limit.md +203 -0
  326. package/docs/api/optics-generic-nd-filter-presets.md +34 -0
  327. package/docs/api/optics-lens-psf-profile.md +3 -1
  328. package/docs/api/output-crop-to-match-focal-length.md +67 -0
  329. package/docs/api/output-developed-lens-corrections.md +12 -0
  330. package/docs/api/output-generic-lens-corrections.md +3 -10
  331. package/docs/api/output-lens-corrections.md +11 -1
  332. package/docs/api/output-print-size-blur-noise.md +115 -0
  333. package/docs/api/sensor-sensor-characteristics.md +105 -0
  334. package/llms.txt +5 -0
  335. package/package.json +1 -1
@@ -0,0 +1,50 @@
1
+ /**
2
+ * The registry of every speed-versus-accuracy choice (#395, owner rule of 2.20.0): one entry per choice that has a fast and an
3
+ * exact (full) method, and per option record that accepts `fast` without a fast method yet. Every entry resolves through
4
+ * `resolveFast` and `fastFormatDefault` (fast-resolution.ts): an option record's `fast`, else the top-level `fast`, else the
5
+ * format default (fast for "srgb-8", "srgb-16" and the display view; exact for "dng", "jpeg", "png" and `simulateIdealReference`).
6
+ *
7
+ * Data only (a root export, so developers can read which choices exist), read by `test/fast-methods-registry.test.ts`, which
8
+ * fails when an option accepts `fast` without an entry here, an entry lacks its resolver or its report, or a format's default
9
+ * leaves the rule. Captures and display views do not import this module (tree-shaking leaves it out of their bundles). A new
10
+ * fast method adds its entry here and to docs/API_STYLE.md, "Exact and fast modes".
11
+ * @see docs/API_STYLE.md, "Exact and fast modes".
12
+ */
13
+ /** One speed-versus-accuracy choice of {@link SIMULATE_CAPTURE_FAST_METHODS} (2.20.0). */
14
+ export interface SimulateCaptureFastMethod {
15
+ /** A short id: the option path and, where one option has several fast methods, the method. */
16
+ id: string;
17
+ /**
18
+ * The request path whose record takes the `fast` override (`allowKeys` path in simulate-capture.ts), or "fast" when only the
19
+ * top-level flag sets it (a choice with no option record of its own).
20
+ */
21
+ override: string;
22
+ /** "fast-and-exact": both methods exist; "exact-only": the record takes `fast`, but there is no fast method yet (reports false). */
23
+ methods: "fast-and-exact" | "exact-only";
24
+ /** Where it applies. */
25
+ runs: readonly ("simulateCapture" | "simulateDisplayView" | "prepareDisplayView")[];
26
+ /** The fast method and the exact one, in words (empty for exact-only). */
27
+ fast: string;
28
+ exact: string;
29
+ /** Always true: no choice keeps its own default (the test checks it). */
30
+ followsFormatDefault: true;
31
+ /**
32
+ * The resolver call in the source (`resolveFast(<record flag>, fastTop)`, or `fastTop` itself for a top-level choice), which the
33
+ * test finds in the named file.
34
+ */
35
+ resolver: {
36
+ file: string;
37
+ call: string;
38
+ };
39
+ /**
40
+ * How the result reports it: the `diagnostics.fast.applied` key (true where the fast method ran), an assumption id the fast
41
+ * method adds, or another result field. At least one; the test finds each assumption id in the source.
42
+ */
43
+ report: {
44
+ applied?: string;
45
+ assumption?: string;
46
+ field?: string;
47
+ };
48
+ }
49
+ /** 2.20.0: every speed-versus-accuracy choice of the capture facade and the display view (see the module comment). */
50
+ export declare const SIMULATE_CAPTURE_FAST_METHODS: readonly SimulateCaptureFastMethod[];
@@ -0,0 +1,50 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ const CAPTURE = "src/facade/simulate-capture.ts", VIEW = "src/facade/simulate-display-view.ts";
3
+ /** 2.20.0: every speed-versus-accuracy choice of the capture facade and the display view (see the module comment). */
4
+ export const SIMULATE_CAPTURE_FAST_METHODS = /* @__PURE__ */ Object.freeze([
5
+ { id: "lens.catalogue/field-grid", override: "lens.catalogue", methods: "fast-and-exact", runs: ["simulateCapture"],
6
+ fast: "#568: the PSF blended over a field grid and tabulated expected electrons, verified per CFA phase against the exact chain",
7
+ exact: "the environment PSF quadrature with the PSF resolved at each query point", followsFormatDefault: true,
8
+ resolver: { file: CAPTURE, call: "resolveFast(catalogueFast, fastTop)" }, report: { applied: "lens.catalogue", assumption: "fast.lens.catalogue" } },
9
+ { id: "lens.catalogue/cats-eye", override: "lens.catalogue", methods: "fast-and-exact", runs: ["simulateCapture", "simulateDisplayView", "prepareDisplayView"],
10
+ fast: "#567: with lens.defocus, the lens's bokeh without its cat's eye (the axis kernel everywhere)",
11
+ exact: "the cat's eye shaped at each field point (fast wides and normals)", followsFormatDefault: true,
12
+ resolver: { file: CAPTURE, call: "resolveFast(catalogueFast, fastTop)" }, report: { applied: "lens.catalogue", assumption: "fast.lens.catalogue.catsEye" } },
13
+ { id: "lens.catalogue/view-psf-zones", override: "lens.catalogue", methods: "fast-and-exact", runs: ["simulateDisplayView", "prepareDisplayView"],
14
+ fast: "#569 (H1): 64 field zones along the longer side, each with the PSF at its centre",
15
+ exact: "one zone per site: the PSF at each site centre", followsFormatDefault: true,
16
+ resolver: { file: CAPTURE, call: "resolveFast(catalogueFast, fastTop)" }, report: { applied: "lens.catalogue", assumption: "view.lensPsf" } },
17
+ { id: "lens.diffraction/rolling-shutter-taps", override: "lens.diffraction", methods: "fast-and-exact", runs: ["simulateCapture"],
18
+ fast: "#565: under rolling-shutter rotation, each PSF tap reads the scene at its own source point",
19
+ exact: "each tap reads the scene at its site-lattice point (ties on chart boundaries resolve as on the lattice)", followsFormatDefault: true,
20
+ resolver: { file: CAPTURE, call: "resolveFast(diffractionFast, fastTop)" }, report: { applied: "lens.diffraction", assumption: "fast.lens.diffraction" } },
21
+ { id: "output.demosaic.ahd/view-low-signal-correction", override: "output.demosaic", methods: "fast-and-exact", runs: ["simulateDisplayView", "prepareDisplayView"],
22
+ fast: "(H3) 2048 draws per correction state, applied where a pixel's linear noise exceeds 0.01",
23
+ exact: "8192 draws per state, at the same 0.01 threshold", followsFormatDefault: true,
24
+ resolver: { file: CAPTURE, call: "resolveFast(demosaicFast, fastTop)" }, report: { applied: "output.demosaic.ahd", assumption: "view.demosaic" } },
25
+ { id: "view.uniform-pixel-sampling", override: "fast", methods: "fast-and-exact", runs: ["simulateDisplayView", "prepareDisplayView"],
26
+ fast: "(H2) a quarter of the samples per axis in display pixels whose pilot finds no detail",
27
+ exact: "the full samples per axis in every display pixel", followsFormatDefault: true,
28
+ resolver: { file: CAPTURE, call: "uniformSampling: fastTop" }, report: { assumption: "view.estimation" } },
29
+ { id: "prepareDisplayView.gpu", override: "fast", methods: "fast-and-exact", runs: ["prepareDisplayView"],
30
+ fast: "gpu \"auto\": WebGPU float32 where a conforming device supports the request (a bounded approximation), else the CPU reference",
31
+ exact: "gpu \"off\": the CPU reference; an explicit gpu wins", followsFormatDefault: true,
32
+ resolver: { file: VIEW, call: "parsePrepareDisplayViewOptions(prepareOptions, (options as { fast?: unknown } | null | undefined)?.fast !== false)" },
33
+ report: { field: "diagnostics.fast.execution" } },
34
+ { id: "sensor.midGrey", override: "fast", methods: "fast-and-exact", runs: ["simulateCapture", "simulateDisplayView", "prepareDisplayView"],
35
+ fast: "#535: the mid-gray noise figure is not computed (about 0.3 ms)", exact: "result.sensor.midGrey is computed", followsFormatDefault: true,
36
+ resolver: { file: CAPTURE, call: "fastTop ? undefined : 0" }, report: { field: "sensor.midGrey" } },
37
+ { id: "lens.diffraction", override: "lens.diffraction", methods: "exact-only", runs: ["simulateCapture", "simulateDisplayView", "prepareDisplayView"],
38
+ fast: "", exact: "the diffraction kernels (a fast method only under rolling-shutter rotation, above)", followsFormatDefault: true,
39
+ resolver: { file: CAPTURE, call: "resolveFast(diffractionFast, fastTop)" }, report: { applied: "lens.diffraction" } },
40
+ { id: "sensor.antiAliasing", override: "sensor.antiAliasing", methods: "exact-only", runs: ["simulateCapture", "simulateDisplayView", "prepareDisplayView"],
41
+ fast: "", exact: "the point-splitting filter", followsFormatDefault: true,
42
+ resolver: { file: CAPTURE, call: "fastInUse" }, report: { applied: "sensor.antiAliasing" } },
43
+ { id: "sensor.pixelAperture.box", override: "sensor.pixelAperture", methods: "exact-only", runs: ["simulateCapture", "simulateDisplayView", "prepareDisplayView"],
44
+ fast: "", exact: "the N × N midpoint rule", followsFormatDefault: true,
45
+ resolver: { file: CAPTURE, call: "fastInUse" }, report: { applied: "sensor.pixelAperture.box" } },
46
+ { id: "output.demosaic.ahd", override: "output.demosaic", methods: "exact-only", runs: ["simulateCapture"],
47
+ fast: "", exact: "the AHD demosaic of the capture (a fast method only in the display view's correction, above)", followsFormatDefault: true,
48
+ resolver: { file: CAPTURE, call: "resolveFast(demosaicFast, fastTop)" }, report: { applied: "output.demosaic.ahd" } }
49
+ ]);
50
+ //# sourceMappingURL=fast-methods.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fast-methods.js","sourceRoot":"","sources":["../../src/facade/fast-methods.ts"],"names":[],"mappings":"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","sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\n/**\n * The registry of every speed-versus-accuracy choice (#395, owner rule of 2.20.0): one entry per choice that has a fast and an\n * exact (full) method, and per option record that accepts `fast` without a fast method yet. Every entry resolves through\n * `resolveFast` and `fastFormatDefault` (fast-resolution.ts): an option record's `fast`, else the top-level `fast`, else the\n * format default (fast for \"srgb-8\", \"srgb-16\" and the display view; exact for \"dng\", \"jpeg\", \"png\" and `simulateIdealReference`).\n *\n * Data only (a root export, so developers can read which choices exist), read by `test/fast-methods-registry.test.ts`, which\n * fails when an option accepts `fast` without an entry here, an entry lacks its resolver or its report, or a format's default\n * leaves the rule. Captures and display views do not import this module (tree-shaking leaves it out of their bundles). A new\n * fast method adds its entry here and to docs/API_STYLE.md, \"Exact and fast modes\".\n * @see docs/API_STYLE.md, \"Exact and fast modes\".\n */\n\n/** One speed-versus-accuracy choice of {@link SIMULATE_CAPTURE_FAST_METHODS} (2.20.0). */\nexport interface SimulateCaptureFastMethod {\n /** A short id: the option path and, where one option has several fast methods, the method. */\n id: string;\n /**\n * The request path whose record takes the `fast` override (`allowKeys` path in simulate-capture.ts), or \"fast\" when only the\n * top-level flag sets it (a choice with no option record of its own).\n */\n override: string;\n /** \"fast-and-exact\": both methods exist; \"exact-only\": the record takes `fast`, but there is no fast method yet (reports false). */\n methods: \"fast-and-exact\" | \"exact-only\";\n /** Where it applies. */\n runs: readonly (\"simulateCapture\" | \"simulateDisplayView\" | \"prepareDisplayView\")[];\n /** The fast method and the exact one, in words (empty for exact-only). */\n fast: string;\n exact: string;\n /** Always true: no choice keeps its own default (the test checks it). */\n followsFormatDefault: true;\n /**\n * The resolver call in the source (`resolveFast(<record flag>, fastTop)`, or `fastTop` itself for a top-level choice), which the\n * test finds in the named file.\n */\n resolver: { file: string; call: string };\n /**\n * How the result reports it: the `diagnostics.fast.applied` key (true where the fast method ran), an assumption id the fast\n * method adds, or another result field. At least one; the test finds each assumption id in the source.\n */\n report: { applied?: string; assumption?: string; field?: string };\n}\n\nconst CAPTURE = \"src/facade/simulate-capture.ts\", VIEW = \"src/facade/simulate-display-view.ts\";\n\n/** 2.20.0: every speed-versus-accuracy choice of the capture facade and the display view (see the module comment). */\nexport const SIMULATE_CAPTURE_FAST_METHODS: readonly SimulateCaptureFastMethod[] = /* @__PURE__ */ Object.freeze([\n { id: \"lens.catalogue/field-grid\", override: \"lens.catalogue\", methods: \"fast-and-exact\", runs: [\"simulateCapture\"],\n fast: \"#568: the PSF blended over a field grid and tabulated expected electrons, verified per CFA phase against the exact chain\",\n exact: \"the environment PSF quadrature with the PSF resolved at each query point\", followsFormatDefault: true,\n resolver: { file: CAPTURE, call: \"resolveFast(catalogueFast, fastTop)\" }, report: { applied: \"lens.catalogue\", assumption: \"fast.lens.catalogue\" } },\n { id: \"lens.catalogue/cats-eye\", override: \"lens.catalogue\", methods: \"fast-and-exact\", runs: [\"simulateCapture\", \"simulateDisplayView\", \"prepareDisplayView\"],\n fast: \"#567: with lens.defocus, the lens's bokeh without its cat's eye (the axis kernel everywhere)\",\n exact: \"the cat's eye shaped at each field point (fast wides and normals)\", followsFormatDefault: true,\n resolver: { file: CAPTURE, call: \"resolveFast(catalogueFast, fastTop)\" }, report: { applied: \"lens.catalogue\", assumption: \"fast.lens.catalogue.catsEye\" } },\n { id: \"lens.catalogue/view-psf-zones\", override: \"lens.catalogue\", methods: \"fast-and-exact\", runs: [\"simulateDisplayView\", \"prepareDisplayView\"],\n fast: \"#569 (H1): 64 field zones along the longer side, each with the PSF at its centre\",\n exact: \"one zone per site: the PSF at each site centre\", followsFormatDefault: true,\n resolver: { file: CAPTURE, call: \"resolveFast(catalogueFast, fastTop)\" }, report: { applied: \"lens.catalogue\", assumption: \"view.lensPsf\" } },\n { id: \"lens.diffraction/rolling-shutter-taps\", override: \"lens.diffraction\", methods: \"fast-and-exact\", runs: [\"simulateCapture\"],\n fast: \"#565: under rolling-shutter rotation, each PSF tap reads the scene at its own source point\",\n exact: \"each tap reads the scene at its site-lattice point (ties on chart boundaries resolve as on the lattice)\", followsFormatDefault: true,\n resolver: { file: CAPTURE, call: \"resolveFast(diffractionFast, fastTop)\" }, report: { applied: \"lens.diffraction\", assumption: \"fast.lens.diffraction\" } },\n { id: \"output.demosaic.ahd/view-low-signal-correction\", override: \"output.demosaic\", methods: \"fast-and-exact\", runs: [\"simulateDisplayView\", \"prepareDisplayView\"],\n fast: \"(H3) 2048 draws per correction state, applied where a pixel's linear noise exceeds 0.01\",\n exact: \"8192 draws per state, at the same 0.01 threshold\", followsFormatDefault: true,\n resolver: { file: CAPTURE, call: \"resolveFast(demosaicFast, fastTop)\" }, report: { applied: \"output.demosaic.ahd\", assumption: \"view.demosaic\" } },\n { id: \"view.uniform-pixel-sampling\", override: \"fast\", methods: \"fast-and-exact\", runs: [\"simulateDisplayView\", \"prepareDisplayView\"],\n fast: \"(H2) a quarter of the samples per axis in display pixels whose pilot finds no detail\",\n exact: \"the full samples per axis in every display pixel\", followsFormatDefault: true,\n resolver: { file: CAPTURE, call: \"uniformSampling: fastTop\" }, report: { assumption: \"view.estimation\" } },\n { id: \"prepareDisplayView.gpu\", override: \"fast\", methods: \"fast-and-exact\", runs: [\"prepareDisplayView\"],\n fast: \"gpu \\\"auto\\\": WebGPU float32 where a conforming device supports the request (a bounded approximation), else the CPU reference\",\n exact: \"gpu \\\"off\\\": the CPU reference; an explicit gpu wins\", followsFormatDefault: true,\n resolver: { file: VIEW, call: \"parsePrepareDisplayViewOptions(prepareOptions, (options as { fast?: unknown } | null | undefined)?.fast !== false)\" },\n report: { field: \"diagnostics.fast.execution\" } },\n { id: \"sensor.midGrey\", override: \"fast\", methods: \"fast-and-exact\", runs: [\"simulateCapture\", \"simulateDisplayView\", \"prepareDisplayView\"],\n fast: \"#535: the mid-gray noise figure is not computed (about 0.3 ms)\", exact: \"result.sensor.midGrey is computed\", followsFormatDefault: true,\n resolver: { file: CAPTURE, call: \"fastTop ? undefined : 0\" }, report: { field: \"sensor.midGrey\" } },\n { id: \"lens.diffraction\", override: \"lens.diffraction\", methods: \"exact-only\", runs: [\"simulateCapture\", \"simulateDisplayView\", \"prepareDisplayView\"],\n fast: \"\", exact: \"the diffraction kernels (a fast method only under rolling-shutter rotation, above)\", followsFormatDefault: true,\n resolver: { file: CAPTURE, call: \"resolveFast(diffractionFast, fastTop)\" }, report: { applied: \"lens.diffraction\" } },\n { id: \"sensor.antiAliasing\", override: \"sensor.antiAliasing\", methods: \"exact-only\", runs: [\"simulateCapture\", \"simulateDisplayView\", \"prepareDisplayView\"],\n fast: \"\", exact: \"the point-splitting filter\", followsFormatDefault: true,\n resolver: { file: CAPTURE, call: \"fastInUse\" }, report: { applied: \"sensor.antiAliasing\" } },\n { id: \"sensor.pixelAperture.box\", override: \"sensor.pixelAperture\", methods: \"exact-only\", runs: [\"simulateCapture\", \"simulateDisplayView\", \"prepareDisplayView\"],\n fast: \"\", exact: \"the N × N midpoint rule\", followsFormatDefault: true,\n resolver: { file: CAPTURE, call: \"fastInUse\" }, report: { applied: \"sensor.pixelAperture.box\" } },\n { id: \"output.demosaic.ahd\", override: \"output.demosaic\", methods: \"exact-only\", runs: [\"simulateCapture\"],\n fast: \"\", exact: \"the AHD demosaic of the capture (a fast method only in the display view's correction, above)\", followsFormatDefault: true,\n resolver: { file: CAPTURE, call: \"resolveFast(demosaicFast, fastTop)\" }, report: { applied: \"output.demosaic.ahd\" } }\n] as const satisfies readonly SimulateCaptureFastMethod[]);\n"]}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * The one exact-or-fast resolver (#395, 2.20.0) that every speed-versus-accuracy choice of the capture facade and the display
3
+ * view goes through: an option record's `fast`, else the request's top-level `fast`, else the format default. The registry of
4
+ * the choices that use it is `fast-methods.ts` (not loaded by captures); docs/API_STYLE.md, "Exact and fast modes".
5
+ */
6
+ /**
7
+ * The format default of the top-level `fast` (owner rule, 2.20.0): fast for the sRGB sample formats (`output.format` "srgb-8"
8
+ * and "srgb-16") and the display view; exact (full quality) for the exports ("dng", "jpeg", "png") and the ideal reference.
9
+ */
10
+ export declare function fastFormatDefault(format: string, run: "capture" | "display-view" | "ideal-reference"): boolean;
11
+ /** Record `fast` > top-level `fast` (already resolved against {@link fastFormatDefault}). */
12
+ export declare function resolveFast(record: boolean | undefined, top: boolean): boolean;
@@ -0,0 +1,18 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ /**
3
+ * The one exact-or-fast resolver (#395, 2.20.0) that every speed-versus-accuracy choice of the capture facade and the display
4
+ * view goes through: an option record's `fast`, else the request's top-level `fast`, else the format default. The registry of
5
+ * the choices that use it is `fast-methods.ts` (not loaded by captures); docs/API_STYLE.md, "Exact and fast modes".
6
+ */
7
+ /**
8
+ * The format default of the top-level `fast` (owner rule, 2.20.0): fast for the sRGB sample formats (`output.format` "srgb-8"
9
+ * and "srgb-16") and the display view; exact (full quality) for the exports ("dng", "jpeg", "png") and the ideal reference.
10
+ */
11
+ export function fastFormatDefault(format, run) {
12
+ return run === "display-view" || run !== "ideal-reference" && format.startsWith("srgb");
13
+ }
14
+ /** Record `fast` > top-level `fast` (already resolved against {@link fastFormatDefault}). */
15
+ export function resolveFast(record, top) {
16
+ return record ?? top;
17
+ }
18
+ //# sourceMappingURL=fast-resolution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fast-resolution.js","sourceRoot":"","sources":["../../src/facade/fast-resolution.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC;;;;GAIG;AAEH;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAc,EAAE,GAAmD;IACnG,OAAO,GAAG,KAAK,cAAc,IAAI,GAAG,KAAK,iBAAiB,IAAI,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AAC1F,CAAC;AAED,6FAA6F;AAC7F,MAAM,UAAU,WAAW,CAAC,MAA2B,EAAE,GAAY;IACnE,OAAO,MAAM,IAAI,GAAG,CAAC;AACvB,CAAC","sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\n/**\n * The one exact-or-fast resolver (#395, 2.20.0) that every speed-versus-accuracy choice of the capture facade and the display\n * view goes through: an option record's `fast`, else the request's top-level `fast`, else the format default. The registry of\n * the choices that use it is `fast-methods.ts` (not loaded by captures); docs/API_STYLE.md, \"Exact and fast modes\".\n */\n\n/**\n * The format default of the top-level `fast` (owner rule, 2.20.0): fast for the sRGB sample formats (`output.format` \"srgb-8\"\n * and \"srgb-16\") and the display view; exact (full quality) for the exports (\"dng\", \"jpeg\", \"png\") and the ideal reference.\n */\nexport function fastFormatDefault(format: string, run: \"capture\" | \"display-view\" | \"ideal-reference\"): boolean {\n return run === \"display-view\" || run !== \"ideal-reference\" && format.startsWith(\"srgb\");\n}\n\n/** Record `fast` > top-level `fast` (already resolved against {@link fastFormatDefault}). */\nexport function resolveFast(record: boolean | undefined, top: boolean): boolean {\n return record ?? top;\n}\n"]}
@@ -1,7 +1,10 @@
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) and their DNG opcodes (`output.dng.lensCorrectionOpcodes`, #587), which need a catalogue lens.
4
5
  */
5
- export { GENERIC_LENS_EVIDENCE, genericLensDistortionProfile, genericLensVignettingProfile, resolveGenericLens, simulateGenericLensFocusError } from "../equipment/generic-lens-catalogue.js";
6
- export { createGenericLensPsfProfile, genericLensPsfKernelRadius, GENERIC_LENS_PSF_MAXIMUM_COMBINED_RADIUS_SITES } from "../optics/generic-lens-psf.js";
6
+ export { GENERIC_LENS_EVIDENCE, genericLensDispersion, genericLensDistortionProfile, genericLensVignettingProfile, resolveGenericLens, simulateGenericLensFocusError } from "../equipment/generic-lens-catalogue.js";
7
+ export { createGenericLensPsfProfile, genericLensBokehKernel, 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";
10
+ export { createDngLensCorrectionOpcodes } from "../capture/dng-lens-correction-opcodes.js";
@@ -1,9 +1,12 @@
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) and their DNG opcodes (`output.dng.lensCorrectionOpcodes`, #587), which need a catalogue lens.
5
6
  */
6
- export { GENERIC_LENS_EVIDENCE, genericLensDistortionProfile, genericLensVignettingProfile, resolveGenericLens, simulateGenericLensFocusError } from "../equipment/generic-lens-catalogue.js";
7
- export { createGenericLensPsfProfile, genericLensPsfKernelRadius, GENERIC_LENS_PSF_MAXIMUM_COMBINED_RADIUS_SITES } from "../optics/generic-lens-psf.js";
7
+ export { GENERIC_LENS_EVIDENCE, genericLensDispersion, genericLensDistortionProfile, genericLensVignettingProfile, resolveGenericLens, simulateGenericLensFocusError } from "../equipment/generic-lens-catalogue.js";
8
+ export { createGenericLensPsfProfile, genericLensBokehKernel, 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";
11
+ export { createDngLensCorrectionOpcodes } from "../capture/dng-lens-correction-opcodes.js";
9
12
  //# 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;;;GAGG;AACH,OAAO,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,4BAA4B,EAAE,kBAAkB,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AAC9L,OAAO,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,8CAA8C,EAAE,MAAM,+BAA+B,CAAC;AACxJ,OAAO,EAAE,qCAAqC,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,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.\n */\nexport { GENERIC_LENS_EVIDENCE, 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\";\n"]}
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,sBAAsB,EAAE,0BAA0B,EAAE,8CAA8C,EAAE,MAAM,+BAA+B,CAAC;AAChL,OAAO,EAAE,qCAAqC,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,4BAA4B,CAAC;AACxI,OAAO,EAAE,4BAA4B,EAAE,iCAAiC,EAAE,8BAA8B,EAAE,MAAM,yCAAyC,CAAC;AAC1J,OAAO,EAAE,8BAA8B,EAAE,MAAM,2CAA2C,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) and their DNG opcodes (`output.dng.lensCorrectionOpcodes`, #587), which need a catalogue lens.\n */\nexport { GENERIC_LENS_EVIDENCE, genericLensDispersion, genericLensDistortionProfile, genericLensVignettingProfile, resolveGenericLens, simulateGenericLensFocusError } from \"../equipment/generic-lens-catalogue.js\";\nexport { createGenericLensPsfProfile, genericLensBokehKernel, 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\";\nexport { createDngLensCorrectionOpcodes } from \"../capture/dng-lens-correction-opcodes.js\";\n"]}
@@ -25,6 +25,7 @@ import { type DefocusDiscSiteKernel, type ResolvedDefocusDisc } from "../optics/
25
25
  import { type DefocusBokehOptions } from "../optics/defocus-bokeh-kernel.js";
26
26
  import { type AntiAliasingPointSplitComponent } from "../sensor/optical-stack.js";
27
27
  import { type NativeRawDng } from "../capture/native-raw-dng.js";
28
+ import { type SimulateCaptureSensorCharacteristics, type SimulateCaptureSensorReport } from "../sensor/sensor-characteristics.js";
28
29
  import { type ChartScene, type ResolvedChartScene } from "./chart-scenes.js";
29
30
  import { type ChartMaterialLayerScene, type ResolvedChartMaterialLayers } from "./chart-material-layers.js";
30
31
  import { type ChartSizeOption, type CaptureIlluminant, type CallerMaterialScene, type CallerRadianceScene, type CallerReflectanceScene, type ResolvedCallerScene, type PlanarSceneRadianceProvider, type ResolvedCaptureIlluminant } from "./scene-radiance.js";
@@ -157,7 +158,12 @@ export type SimulateCaptureColorEncoding = "srgb" | "display-p3" | "rec2020";
157
158
  * edge-directed method that reduces zipper and false colour on sharp edges.
158
159
  */
159
160
  export type SimulateCaptureDemosaic = "bilinear" | "ahd";
160
- /** `lens.catalogue` as a record (#568): the lens id as `kind` and the `fast` override (see {@link SimulateCaptureOptions.fast}). */
161
+ /**
162
+ * `lens.catalogue` as a record (#568): the lens id as `kind` and the `fast` override (see {@link SimulateCaptureOptions.fast}).
163
+ * Fast: the tabulated fast method (#568), and with `lens.defocus` the lens's bokeh without its cat's eye (#567; fast wides and
164
+ * normals only), whose field-varying PSF needs a finer fast grid (measured 2.2–3.4× slower). Exact: the per-site PSF with the
165
+ * cat's eye. Blades and spherical aberration always apply (they cost nothing).
166
+ */
161
167
  export interface SimulateCaptureLensCatalogueRecord {
162
168
  kind: string;
163
169
  fast?: boolean;
@@ -186,6 +192,11 @@ export type SimulateCaptureLensDistortion = {
186
192
  * accepted as a deprecated alias until 3.0.0, and giving both is an error.
187
193
  */
188
194
  export type SimulateCaptureLensDiffraction = "circular-aperture" | {
195
+ /**
196
+ * #565: in focus with camera rotation and `motion.shutter: "rolling"`, exact reads each PSF tap's scene point at its
197
+ * site-lattice point, as every other path does, so a tap exactly on a chart boundary resolves as on the lattice (about 1.2×
198
+ * the time); fast keeps each tap's own point, which can resolve such a tie to the other material (docs/QUICK_START.md, "Optics").
199
+ */
189
200
  kind: "circular-aperture";
190
201
  kernelRadiusSamples?: number;
191
202
  fast?: boolean;
@@ -253,6 +264,18 @@ export interface SimulateCaptureDiffractionCorrection {
253
264
  /** FIR radius R in pixels, 1–16. Default: the Airy pattern's third dark ring at the design wavelength, within 1–16. */
254
265
  kernelRadiusPixels?: number;
255
266
  }
267
+ /**
268
+ * `output.lensCorrections` (#570): which of the catalogue lens's generic corrections (`createGenericLensCorrectionProfile`) the
269
+ * development applies. Each is off unless set to true.
270
+ */
271
+ export interface SimulateCaptureLensCorrections {
272
+ /** Radial distortion r_d = r(1 + k1ρ²), inverted by resampling: it stretches the corners and lowers their resolution. */
273
+ distortion?: boolean;
274
+ /** Lateral colour: each channel rescaled by 1/(1 + L·D(λ_c)) into register; axial (longitudinal) colour stays. */
275
+ lateralColor?: boolean;
276
+ /** Vignetting: a gain 1/E(ρ) at each pixel's source point; corner noise rises with the signal, the SNR does not. */
277
+ vignetting?: boolean;
278
+ }
256
279
  /** `diagnostics.detail` (#552): what the development detail stages did. Present only when one ran. */
257
280
  export interface SimulateCaptureDetailDiagnostics {
258
281
  diffractionCorrection?: {
@@ -314,7 +337,8 @@ export interface SimulateCaptureOptions {
314
337
  * distance beyond the focal length (no minimum focus distance; `subjectDistanceM` must be at least twice the focal length, as for
315
338
  * every lens). Works in `simulateCapture` and the display view. Not combinable with `prime`, `catalogue` or `focalLengthMm`.
316
339
  * 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. Default off.
340
+ * narrow the range: `fNumber` must lie in it, and shutter priority and program choose apertures only in it (program limits its
341
+ * line to a range that does not hold f/4–f/16, #583). Default off.
318
342
  */
319
343
  ideal?: {
320
344
  focalLengthMm: number;
@@ -327,9 +351,9 @@ export interface SimulateCaptureOptions {
327
351
  * factor and it replaces the tier lens's focal length and f-number range (the transmission is kept). The capture renders the
328
352
  * lens's character, all labelled approximations: its PSF (diffraction with the lens's Seidel aberrations, axial and lateral
329
353
  * colour, at the resolved f-number and focus) through the environment PSF quadrature, its radial distortion, its vignetting
330
- * and, for the fisheyes, the equisolid projection. Flare, focus breathing and bokeh shape are not rendered. Not combinable
354
+ * and, for the fisheyes, the equisolid projection. Flare and focus breathing are not rendered. Not combinable
331
355
  * with `prime`, `focalLengthMm`, `projection`, `distortion`, `vignetting`, `psf`, `diffraction` or `pupilSampling` (the
332
- * lens sets them); `defocus` convolves the disc into the lens's PSF. The display view renders it with the PSF taken per field zone (#569; docs/DISPLAY_VIEW.md). Default off.
356
+ * lens sets them); `defocus` convolves the lens's bokeh kernel (#567) into its PSF. The display view renders it with the PSF taken per field zone (#569; docs/DISPLAY_VIEW.md). Default off.
333
357
  * #568: the record form `{ kind: <lens id>, fast }` overrides the top-level `fast` flag for this option; the fast method
334
358
  * blends the PSF between exactly resolved kernels on a field grid and tabulates each site's expected signal
335
359
  * (docs/LENS_CATALOGUE.md, "Fast method").
@@ -485,7 +509,7 @@ export interface SimulateCaptureOptions {
485
509
  exposureCompensationStops?: number;
486
510
  /** Default "scene-illuminant". */
487
511
  whiteBalance?: SimulateCaptureWhiteBalance;
488
- /** JPEG constant quantization step 1-255 (not a manufacturer 'quality'). Default 2. */
512
+ /** JPEG constant quantization step 1-255 (not a manufacturer 'quality'). Default 1 (2.20.0; 2 before), the full-quality export. */
489
513
  jpegQuantizationStep?: number;
490
514
  /** PNG only. Default "srgb". */
491
515
  colorEncoding?: SimulateCaptureColorEncoding;
@@ -500,9 +524,15 @@ export interface SimulateCaptureOptions {
500
524
  demosaic?: SimulateCaptureDemosaic | SimulateCaptureDemosaicRecord;
501
525
  /** Default "margin". */
502
526
  borderHandling?: SimulateCaptureBorderHandling;
503
- /** DNG only: optional capture-event time (YYYY-MM-DDTHH:mm:ss.sssZ); without it no date tags are written. */
527
+ /**
528
+ * DNG only: optional capture-event time (YYYY-MM-DDTHH:mm:ss.sssZ); without it no date tags are written. Opt-in (#587), with
529
+ * `lens.catalogue`: `lensCorrectionOpcodes` writes the selected corrections of {@link SimulateCaptureLensCorrections} into the DNG as
530
+ * optional DNG opcodes in OpcodeList3 (FixVignetteRadial, WarpRectilinear with the zoom-to-fill; docs/NATIVE_RAW_AND_PRINT.md), for RAW editors
531
+ * that apply them; the RAW codes are unchanged. Whole frame only (no `region`). All off (or omitted): the same DNG bytes as without it.
532
+ */
504
533
  dng?: {
505
534
  capturedAtUtc?: string;
535
+ lensCorrectionOpcodes?: SimulateCaptureLensCorrections;
506
536
  };
507
537
  /**
508
538
  * Opt-in (2.4) text written into the file for formats "jpeg", "png" and "dng": the caller's description,
@@ -547,10 +577,21 @@ export interface SimulateCaptureOptions {
547
577
  * (not the wide-gamut or perceptual PNG paths); not combinable with `region`. The DNG's RAW codes are not changed. Default off.
548
578
  */
549
579
  sharpening?: SimulateCaptureSharpening;
580
+ /**
581
+ * Opt-in (#570), with `lens.catalogue`: the lens's generic corrections (see {@link SimulateCaptureLensCorrections}) on the
582
+ * developed linear colour, after demosaic, colour, white balance and `diffractionCorrection`, before the tone curve; for the JPEG,
583
+ * PNG and samples. The RAW and the DNG are never corrected. To keep the output size with no missing pixels, the corrected image is
584
+ * magnified by the smallest factor 1/m ≥ 1 that keeps every pixel's source inside the frame (recorded in the
585
+ * `output.lensCorrections` assumption). Works with `region`: a region develops the frame pixels its corrected pixels read
586
+ * (`region.nativeRect`, `raw` and `plan` describe that rectangle) and its pixels are the whole render's. All off (or omitted):
587
+ * the development is unchanged.
588
+ */
589
+ lensCorrections?: SimulateCaptureLensCorrections;
550
590
  };
551
591
  /** Camera motion and shutter type. Default: still camera, global electronic shutter. */
552
592
  motion?: SimulateCaptureMotion;
553
- sensor?: {
593
+ /** #555: plus the sensor characteristics ({@link SimulateCaptureSensorCharacteristics}), each off by default. */
594
+ sensor?: SimulateCaptureSensorCharacteristics & {
554
595
  /**
555
596
  * Pixel pitch in micrometres, 0.5–1000. Default 6. The simulated sensor is output width × pitch wide. 2.5: above 100 µm the
556
597
  * capture is a downsized view of a whole frame (for example 36 mm / 48 pixels = 750 µm), recorded in the assumption
@@ -577,22 +618,26 @@ export interface SimulateCaptureOptions {
577
618
  pixelAperture?: SimulateCapturePixelAperture;
578
619
  };
579
620
  /**
580
- * Exact or fast (#395). `false` or omitted: every option runs its exact method, the engine reference. `true`: each option
581
- * listed in {@link SIMULATE_CAPTURE_FAST_OPTIONS} runs its fast method where it has one, a measured, bounded approximation of
582
- * the exact one; an option without a fast method runs exact. An option's own record `fast` overrides this for that option
583
- * only. `diagnostics.fast` reports what was requested and what ran. `lens.catalogue` has a fast method (#568); the other options run exact.
621
+ * Exact or fast (#395). `false`: every option runs its exact method, the engine reference. `true`: each option listed in
622
+ * {@link SIMULATE_CAPTURE_FAST_OPTIONS} runs its fast method where it has one, a measured, bounded approximation of the exact
623
+ * one; an option without a fast method runs exact. An option's own record `fast` overrides this for that option only.
624
+ * Omitted (2.20.0), the format decides: fast for `output.format` "srgb-8" and "srgb-16" and for the display view, exact for
625
+ * "dng", "jpeg" and "png" (exports) and for `simulateIdealReference`. `diagnostics.fast` reports the resolved value, where it
626
+ * came from and what ran. Fast methods: `lens.catalogue` (#568, #567) and `lens.diffraction` under rolling-shutter rotation
627
+ * (#565); in the display view also its catalogue PSF zones, its sampling of uniform pixels and its AHD low-signal correction
628
+ * (docs/DISPLAY_VIEW.md). The exact result also carries `result.sensor.midGrey` (#535). Calculators should pass `fast: false`.
584
629
  */
585
630
  fast?: boolean;
586
631
  /** Aborting cancels the running task; the promise rejects with a domain error and returns no partial image. */
587
632
  signal?: AbortSignal;
588
- /** Called after each committed RAW, development or JPEG tile. Cannot change output. */
633
+ /** Called after each committed RAW, development, detail or JPEG tile (see {@link SimulateCaptureProgress}). Cannot change output. */
589
634
  onProgress?: (progress: SimulateCaptureProgress) => void;
590
635
  }
591
636
  /**
592
637
  * Options reported in `diagnostics.options` (2.1), in this order, when they ran: the ones that change how much work
593
638
  * a capture does. `motion.rotation` is a non-zero angular velocity; `sensor.temporalSampleCount` a count above 1.
594
639
  */
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"];
640
+ 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
641
  export type SimulateCaptureCostOption = typeof SIMULATE_CAPTURE_COST_OPTIONS[number];
597
642
  /**
598
643
  * The options that take the exact-or-fast flag (#395), in the path style of {@link SIMULATE_CAPTURE_COST_OPTIONS}: each accepts
@@ -603,15 +648,24 @@ export declare const SIMULATE_CAPTURE_FAST_OPTIONS: readonly ["lens.diffraction"
603
648
  export type SimulateCaptureFastOption = typeof SIMULATE_CAPTURE_FAST_OPTIONS[number];
604
649
  /** `diagnostics.fast` of a capture or display view (#395): what was asked for and what ran. */
605
650
  export interface SimulateCaptureFastReport {
606
- /** True when `fast: true` was given at the top level or in any option's record. */
651
+ /** 2.20.0: the resolved top-level value (`fast`, else the format default), or true when any option's record sets `fast: true`. */
607
652
  requested: boolean;
653
+ /** 2.20.0: where the top-level value came from: the request's `fast`, or the format default (see {@link SimulateCaptureOptions.fast}). */
654
+ defaultedFrom: "request" | "format";
608
655
  /** Each fast-capable option that ran, in {@link SIMULATE_CAPTURE_FAST_OPTIONS} order: true where its fast method ran. */
609
656
  applied: Readonly<Partial<Record<SimulateCaptureFastOption, boolean>>>;
610
657
  /** `engine-reference` when every option ran exact; `approximation-with-a-priori-bound` when any fast method ran (the WebGPU execution record's values). */
611
658
  assurance: "engine-reference" | "approximation-with-a-priori-bound";
612
659
  }
660
+ /**
661
+ * One progress event of `onProgress`. Stages run in this order: `raw`, `white-balance` (with auto white balance), `development`
662
+ * (rows), then, when requested, `diffraction-correction` and `sharpening` (#571: one event per output row of the whole image;
663
+ * each stage's last event has `completedTileCount === totalTileCount`), then `jpeg`. `output.lensCorrections` (#570) runs between
664
+ * `diffraction-correction` and `sharpening` and reports no stage of its own. {@link simulateCaptureFromParts}
665
+ * reports no `raw` stage: its RAW comes from the parts.
666
+ */
613
667
  export interface SimulateCaptureProgress {
614
- stage: "raw" | "white-balance" | "development" | "jpeg";
668
+ stage: "raw" | "white-balance" | "development" | "diffraction-correction" | "sharpening" | "jpeg";
615
669
  completedTileCount: number;
616
670
  totalTileCount: number;
617
671
  }
@@ -823,6 +877,8 @@ export interface SimulateCaptureResult {
823
877
  limitations: readonly string[];
824
878
  };
825
879
  assumptions: readonly SimulateCaptureAssumption[];
880
+ /** #555, #535: the sensor characteristics used, the calculated dynamic range and (when the request resolves to exact) the mid-grey noise figure. */
881
+ sensor: SimulateCaptureSensorReport;
826
882
  }
827
883
  export declare const FACADE_EVIDENCE: readonly EvidenceProvenance[];
828
884
  /**
@@ -872,6 +928,12 @@ export interface SimulateCaptureDngPart {
872
928
  height: number;
873
929
  };
874
930
  };
931
+ /**
932
+ * 2.20.0: true when a fast method ran for this part (`Object.values(result.diagnostics.fast.applied).includes(true)`). The join
933
+ * refuses such a part unless its own request resolves to fast too (a DNG, JPEG or PNG is exact by default): render the parts with
934
+ * the same `fast` as the join, or with `fast: false`.
935
+ */
936
+ fast?: boolean;
875
937
  }
876
938
  /**
877
939
  * Writes the whole-frame DNG of `options` (`output.format: "dng"`, no `output.region`) from the packed RAW of region renders of
@@ -1026,6 +1088,8 @@ export interface DisplayViewResult {
1026
1088
  autoIso?: SimulateCaptureAutoIsoReport;
1027
1089
  };
1028
1090
  scene: SimulateCaptureResult["scene"];
1091
+ /** #555, #535: as in the capture result. */
1092
+ sensor: SimulateCaptureSensorReport;
1029
1093
  /**
1030
1094
  * Work done: real pixels sampled, real-site expectations evaluated, scene queries, display pixels sampled in full (detail) or with
1031
1095
  * a quarter of the samples per axis (uniform), display pixels whose value includes the AHD low-signal correction, and wall-clock
@@ -1164,6 +1228,12 @@ export interface DisplayViewRunContext {
1164
1228
  readoutProfile: ReadoutProfile;
1165
1229
  regimeId: string;
1166
1230
  }>;
1231
+ sensor: SimulateCaptureSensorReport;
1232
+ /** 2.20.0: the view's own fast methods, resolved: the AHD low-signal correction's draws and threshold (`output.demosaic.ahd`) and the quarter sampling of uniform pixels (top-level `fast`). */
1233
+ viewFast: {
1234
+ ahd: boolean;
1235
+ uniformSampling: boolean;
1236
+ };
1167
1237
  resolvedIso: number;
1168
1238
  /** #516: how the ISO was chosen, reported in the view's `exposure`. */
1169
1239
  isoReport: {
@@ -1214,11 +1284,13 @@ export interface ParsedDisplayView {
1214
1284
  export declare function parseDisplayViewOption(value: unknown, frameWidth: number, frameHeight: number): ParsedDisplayView;
1215
1285
  /** Internal: passed as the view of a "display-view" run to resolve the request without a view (`prepareDisplayView`, #387). */
1216
1286
  export declare const DISPLAY_VIEW_WITHOUT_VIEW: unique symbol;
1287
+ /** Internal: what `runCapture` produces. The two `-from-parts` runs take the parts as `viewOption`. */
1288
+ type CaptureRun = "capture" | "ideal-reference" | "display-view" | "dng-from-parts" | "develop-from-parts";
1217
1289
  /**
1218
1290
  * Internal: the request path shared by {@link simulateCapture}, {@link simulateIdealReference} and the display view, whose renderer is
1219
1291
  * passed in; for a display view the renderer's value is returned (a result, or a prepared view with DISPLAY_VIEW_WITHOUT_VIEW).
1220
1292
  */
1221
- export declare function runCapture(options: SimulateCaptureOptions, run: "capture" | "ideal-reference" | "display-view" | "dng-from-parts", viewOption?: unknown, renderView?: (context: DisplayViewRunContext) => Promise<unknown>): Promise<unknown>;
1293
+ export declare function runCapture(options: SimulateCaptureOptions, run: CaptureRun, viewOption?: unknown, renderView?: (context: DisplayViewRunContext) => Promise<unknown>): Promise<unknown>;
1222
1294
  /** Chart preset ids accepted by `simulateCapture({ scene: { preset } })`. */
1223
1295
  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
1296
  export {};