@photivra/engine 1.5.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1085) hide show
  1. package/CHANGELOG.md +414 -6
  2. package/CITATION.cff +1 -1
  3. package/NODE_SUPPORT.md +64 -12
  4. package/README.md +301 -182
  5. package/SECURITY.md +37 -28
  6. package/THIRD_PARTY.md +148 -4
  7. package/dist/camera/equivalent-focal-length.d.ts +13 -14
  8. package/dist/camera/equivalent-focal-length.js +15 -13
  9. package/dist/camera/equivalent-focal-length.js.map +1 -1
  10. package/dist/camera/field-of-view.d.ts +30 -19
  11. package/dist/camera/field-of-view.js +67 -18
  12. package/dist/camera/field-of-view.js.map +1 -1
  13. package/dist/camera/lens-projection.d.ts +170 -0
  14. package/dist/camera/lens-projection.js +444 -0
  15. package/dist/camera/lens-projection.js.map +1 -0
  16. package/dist/camera/projected-object-size.d.ts +10 -11
  17. package/dist/camera/projected-object-size.js +12 -10
  18. package/dist/camera/projected-object-size.js.map +1 -1
  19. package/dist/capture/capture-export-metadata.d.ts +9 -10
  20. package/dist/capture/capture-export-metadata.js +8 -5
  21. package/dist/capture/capture-export-metadata.js.map +1 -1
  22. package/dist/capture/dng-import.d.ts +91 -0
  23. package/dist/capture/dng-import.js +343 -0
  24. package/dist/capture/dng-import.js.map +1 -0
  25. package/dist/capture/environment-raw-producer.d.ts +37 -17
  26. package/dist/capture/environment-raw-producer.js +43 -19
  27. package/dist/capture/environment-raw-producer.js.map +1 -1
  28. package/dist/capture/export-jpeg.d.ts +35 -4
  29. package/dist/capture/export-jpeg.js +133 -47
  30. package/dist/capture/export-jpeg.js.map +1 -1
  31. package/dist/capture/export-tiff.d.ts +48 -24
  32. package/dist/capture/export-tiff.js +91 -31
  33. package/dist/capture/export-tiff.js.map +1 -1
  34. package/dist/capture/focus-control.d.ts +42 -65
  35. package/dist/capture/focus-control.js +56 -75
  36. package/dist/capture/focus-control.js.map +1 -1
  37. package/dist/capture/host-yield-cadence.d.ts +25 -0
  38. package/dist/capture/host-yield-cadence.js +25 -0
  39. package/dist/capture/host-yield-cadence.js.map +1 -0
  40. package/dist/capture/linear-encoding.d.ts +14 -12
  41. package/dist/capture/linear-encoding.js +14 -13
  42. package/dist/capture/linear-encoding.js.map +1 -1
  43. package/dist/capture/lossless-jpeg.d.ts +27 -0
  44. package/dist/capture/lossless-jpeg.js +237 -0
  45. package/dist/capture/lossless-jpeg.js.map +1 -0
  46. package/dist/capture/native-environment-lean.d.ts +227 -0
  47. package/dist/capture/native-environment-lean.js +974 -0
  48. package/dist/capture/native-environment-lean.js.map +1 -0
  49. package/dist/capture/native-environment-optical-stage.d.ts +97 -0
  50. package/dist/capture/native-environment-optical-stage.js +340 -0
  51. package/dist/capture/native-environment-optical-stage.js.map +1 -0
  52. package/dist/capture/native-environment-raw.d.ts +140 -6
  53. package/dist/capture/native-environment-raw.js +435 -34
  54. package/dist/capture/native-environment-raw.js.map +1 -1
  55. package/dist/capture/native-raw-development.d.ts +116 -9
  56. package/dist/capture/native-raw-development.js +221 -62
  57. package/dist/capture/native-raw-development.js.map +1 -1
  58. package/dist/capture/native-raw-dng.d.ts +60 -0
  59. package/dist/capture/native-raw-dng.js +167 -0
  60. package/dist/capture/native-raw-dng.js.map +1 -0
  61. package/dist/capture/native-raw.d.ts +65 -12
  62. package/dist/capture/native-raw.js +81 -19
  63. package/dist/capture/native-raw.js.map +1 -1
  64. package/dist/capture/packed-sensor-raw.d.ts +160 -0
  65. package/dist/capture/packed-sensor-raw.js +221 -0
  66. package/dist/capture/packed-sensor-raw.js.map +1 -0
  67. package/dist/capture/photographic-export.d.ts +58 -35
  68. package/dist/capture/photographic-export.js +177 -70
  69. package/dist/capture/photographic-export.js.map +1 -1
  70. package/dist/capture/raw-development-kernel.d.ts +52 -0
  71. package/dist/capture/raw-development-kernel.js +88 -0
  72. package/dist/capture/raw-development-kernel.js.map +1 -0
  73. package/dist/capture/raw-frame-limits.d.ts +7 -7
  74. package/dist/capture/raw-frame-limits.js +7 -6
  75. package/dist/capture/raw-frame-limits.js.map +1 -1
  76. package/dist/capture/raw-frame-reconstruction.d.ts +8 -9
  77. package/dist/capture/raw-frame-reconstruction.js +9 -8
  78. package/dist/capture/raw-frame-reconstruction.js.map +1 -1
  79. package/dist/capture/raw-white-level.d.ts +55 -0
  80. package/dist/capture/raw-white-level.js +165 -0
  81. package/dist/capture/raw-white-level.js.map +1 -0
  82. package/dist/capture/release-sequence.d.ts +5 -7
  83. package/dist/capture/release-sequence.js +15 -13
  84. package/dist/capture/release-sequence.js.map +1 -1
  85. package/dist/capture/sensor-raw-frame.d.ts +5 -6
  86. package/dist/capture/sensor-raw-frame.js +26 -9
  87. package/dist/capture/sensor-raw-frame.js.map +1 -1
  88. package/dist/capture/sensor-raw-producer.d.ts +21 -13
  89. package/dist/capture/sensor-raw-producer.js +86 -25
  90. package/dist/capture/sensor-raw-producer.js.map +1 -1
  91. package/dist/capture/simulated-capture.d.ts +15 -16
  92. package/dist/capture/simulated-capture.js +22 -12
  93. package/dist/capture/simulated-capture.js.map +1 -1
  94. package/dist/color/camera-color-matrix.d.ts +69 -0
  95. package/dist/color/camera-color-matrix.js +132 -0
  96. package/dist/color/camera-color-matrix.js.map +1 -0
  97. package/dist/color/capture-color.d.ts +17 -10
  98. package/dist/color/capture-color.js +50 -17
  99. package/dist/color/capture-color.js.map +1 -1
  100. package/dist/color/chromatic-adaptation.d.ts +63 -0
  101. package/dist/color/chromatic-adaptation.js +91 -0
  102. package/dist/color/chromatic-adaptation.js.map +1 -0
  103. package/dist/color/color-difference.d.ts +104 -0
  104. package/dist/color/color-difference.js +205 -0
  105. package/dist/color/color-difference.js.map +1 -0
  106. package/dist/color/color-matching-functions.d.ts +168 -0
  107. package/dist/color/color-matching-functions.js +309 -0
  108. package/dist/color/color-matching-functions.js.map +1 -0
  109. package/dist/color/colorimetry-math.d.ts +52 -0
  110. package/dist/color/colorimetry-math.js +144 -0
  111. package/dist/color/colorimetry-math.js.map +1 -0
  112. package/dist/color/gamut-mapping.d.ts +54 -0
  113. package/dist/color/gamut-mapping.js +107 -0
  114. package/dist/color/gamut-mapping.js.map +1 -0
  115. package/dist/color/illuminants.d.ts +182 -0
  116. package/dist/color/illuminants.js +434 -0
  117. package/dist/color/illuminants.js.map +1 -0
  118. package/dist/color/rgb-color-spaces.d.ts +79 -0
  119. package/dist/color/rgb-color-spaces.js +115 -0
  120. package/dist/color/rgb-color-spaces.js.map +1 -0
  121. package/dist/color/sensor-color-development.d.ts +33 -11
  122. package/dist/color/sensor-color-development.js +104 -30
  123. package/dist/color/sensor-color-development.js.map +1 -1
  124. package/dist/color/srgb-icc.d.ts +9 -2
  125. package/dist/color/srgb-icc.js +16 -5
  126. package/dist/color/srgb-icc.js.map +1 -1
  127. package/dist/color/srgb-transfer.d.ts +1 -2
  128. package/dist/color/srgb-transfer.js +1 -1
  129. package/dist/color/srgb-transfer.js.map +1 -1
  130. package/dist/color/white-balance.d.ts +68 -19
  131. package/dist/color/white-balance.js +168 -35
  132. package/dist/color/white-balance.js.map +1 -1
  133. package/dist/composition/image-formation-plan.d.ts +152 -128
  134. package/dist/composition/image-formation-plan.js +292 -138
  135. package/dist/composition/image-formation-plan.js.map +1 -1
  136. package/dist/composition/plan-consumer.d.ts +6 -7
  137. package/dist/composition/plan-consumer.js +14 -11
  138. package/dist/composition/plan-consumer.js.map +1 -1
  139. package/dist/core/calculation-result.d.ts +21 -14
  140. package/dist/core/calculation-result.js +209 -11
  141. package/dist/core/calculation-result.js.map +1 -1
  142. package/dist/core/canonical-json.d.ts +13 -8
  143. package/dist/core/canonical-json.js +34 -15
  144. package/dist/core/canonical-json.js.map +1 -1
  145. package/dist/core/configuration-error.d.ts +5 -4
  146. package/dist/core/configuration-error.js +5 -3
  147. package/dist/core/configuration-error.js.map +1 -1
  148. package/dist/core/evidence-provenance.d.ts +12 -12
  149. package/dist/core/evidence-provenance.js +10 -9
  150. package/dist/core/evidence-provenance.js.map +1 -1
  151. package/dist/core/image-formation.d.ts +11 -10
  152. package/dist/core/image-formation.js +11 -9
  153. package/dist/core/image-formation.js.map +1 -1
  154. package/dist/core/owned-data.d.ts +9 -17
  155. package/dist/core/owned-data.js +9 -16
  156. package/dist/core/owned-data.js.map +1 -1
  157. package/dist/core/portable-math.d.ts +15 -0
  158. package/dist/core/portable-math.js +56 -0
  159. package/dist/core/portable-math.js.map +1 -0
  160. package/dist/core/record-validation.d.ts +48 -9
  161. package/dist/core/record-validation.js +93 -19
  162. package/dist/core/record-validation.js.map +1 -1
  163. package/dist/core/scientific-assurance.d.ts +16 -14
  164. package/dist/core/scientific-assurance.js +22 -18
  165. package/dist/core/scientific-assurance.js.map +1 -1
  166. package/dist/core/spectral-composition.d.ts +13 -14
  167. package/dist/core/spectral-composition.js +30 -27
  168. package/dist/core/spectral-composition.js.map +1 -1
  169. package/dist/core/spectral.d.ts +5 -6
  170. package/dist/core/spectral.js +9 -7
  171. package/dist/core/spectral.js.map +1 -1
  172. package/dist/core/validation.d.ts +3 -6
  173. package/dist/core/validation.js +3 -5
  174. package/dist/core/validation.js.map +1 -1
  175. package/dist/core/version.d.ts +6 -6
  176. package/dist/core/version.js +6 -5
  177. package/dist/core/version.js.map +1 -1
  178. package/dist/equipment/exposure-capabilities.d.ts +10 -10
  179. package/dist/equipment/exposure-capabilities.js +40 -30
  180. package/dist/equipment/exposure-capabilities.js.map +1 -1
  181. package/dist/equipment/generic-tier-assets.d.ts +13 -6
  182. package/dist/equipment/generic-tier-assets.js +34 -15
  183. package/dist/equipment/generic-tier-assets.js.map +1 -1
  184. package/dist/equipment/generic-tier-presets.d.ts +5 -6
  185. package/dist/equipment/generic-tier-presets.js +15 -13
  186. package/dist/equipment/generic-tier-presets.js.map +1 -1
  187. package/dist/equipment/iso-capabilities.d.ts +21 -22
  188. package/dist/equipment/iso-capabilities.js +49 -44
  189. package/dist/equipment/iso-capabilities.js.map +1 -1
  190. package/dist/equipment/metering-capabilities.d.ts +5 -6
  191. package/dist/equipment/metering-capabilities.js +22 -19
  192. package/dist/equipment/metering-capabilities.js.map +1 -1
  193. package/dist/equipment/release-capabilities.d.ts +3 -4
  194. package/dist/equipment/release-capabilities.js +18 -14
  195. package/dist/equipment/release-capabilities.js.map +1 -1
  196. package/dist/exposure/exposure-duration-control.d.ts +19 -17
  197. package/dist/exposure/exposure-duration-control.js +27 -23
  198. package/dist/exposure/exposure-duration-control.js.map +1 -1
  199. package/dist/exposure/exposure-mode-resolver.d.ts +42 -39
  200. package/dist/exposure/exposure-mode-resolver.js +127 -82
  201. package/dist/exposure/exposure-mode-resolver.js.map +1 -1
  202. package/dist/exposure/exposure.d.ts +17 -16
  203. package/dist/exposure/exposure.js +22 -15
  204. package/dist/exposure/exposure.js.map +1 -1
  205. package/dist/exposure/flash-ttl.d.ts +135 -0
  206. package/dist/exposure/flash-ttl.js +193 -0
  207. package/dist/exposure/flash-ttl.js.map +1 -0
  208. package/dist/exposure/flash.d.ts +144 -36
  209. package/dist/exposure/flash.js +259 -59
  210. package/dist/exposure/flash.js.map +1 -1
  211. package/dist/exposure/metering-scene-radiance.d.ts +10 -10
  212. package/dist/exposure/metering-scene-radiance.js +42 -23
  213. package/dist/exposure/metering-scene-radiance.js.map +1 -1
  214. package/dist/exposure/metering-target.d.ts +8 -8
  215. package/dist/exposure/metering-target.js +30 -20
  216. package/dist/exposure/metering-target.js.map +1 -1
  217. package/dist/exposure/metering-temporal.d.ts +16 -15
  218. package/dist/exposure/metering-temporal.js +41 -19
  219. package/dist/exposure/metering-temporal.js.map +1 -1
  220. package/dist/exposure/metering.d.ts +64 -17
  221. package/dist/exposure/metering.js +159 -30
  222. package/dist/exposure/metering.js.map +1 -1
  223. package/dist/exposure/program-line.d.ts +5 -5
  224. package/dist/exposure/program-line.js +20 -13
  225. package/dist/exposure/program-line.js.map +1 -1
  226. package/dist/facade/camera-preset.d.ts +8 -0
  227. package/dist/facade/camera-preset.js +102 -0
  228. package/dist/facade/camera-preset.js.map +1 -0
  229. package/dist/facade/chart-radiance-batch.d.ts +57 -0
  230. package/dist/facade/chart-radiance-batch.js +121 -0
  231. package/dist/facade/chart-radiance-batch.js.map +1 -0
  232. package/dist/facade/chart-scenes.d.ts +177 -0
  233. package/dist/facade/chart-scenes.js +232 -0
  234. package/dist/facade/chart-scenes.js.map +1 -0
  235. package/dist/facade/diffraction-provider.d.ts +30 -0
  236. package/dist/facade/diffraction-provider.js +127 -0
  237. package/dist/facade/diffraction-provider.js.map +1 -0
  238. package/dist/facade/host-yield.d.ts +7 -0
  239. package/dist/facade/host-yield.js +19 -0
  240. package/dist/facade/host-yield.js.map +1 -0
  241. package/dist/facade/scene-radiance.d.ts +117 -0
  242. package/dist/facade/scene-radiance.js +205 -0
  243. package/dist/facade/scene-radiance.js.map +1 -0
  244. package/dist/facade/simulate-capture.d.ts +363 -0
  245. package/dist/facade/simulate-capture.js +1281 -0
  246. package/dist/facade/simulate-capture.js.map +1 -0
  247. package/dist/gpu/chart-radiance-gpu.d.ts +17 -0
  248. package/dist/gpu/chart-radiance-gpu.js +176 -0
  249. package/dist/gpu/chart-radiance-gpu.js.map +1 -0
  250. package/dist/gpu/image-kernel-accelerator.d.ts +132 -0
  251. package/dist/gpu/image-kernel-accelerator.js +720 -0
  252. package/dist/gpu/image-kernel-accelerator.js.map +1 -0
  253. package/dist/gpu/image-kernel-execution.d.ts +92 -0
  254. package/dist/gpu/image-kernel-execution.js +84 -0
  255. package/dist/gpu/image-kernel-execution.js.map +1 -0
  256. package/dist/gpu/sensor-stage-gpu.d.ts +44 -0
  257. package/dist/gpu/sensor-stage-gpu.js +317 -0
  258. package/dist/gpu/sensor-stage-gpu.js.map +1 -0
  259. package/dist/gpu/temporal-sum-gpu.d.ts +23 -0
  260. package/dist/gpu/temporal-sum-gpu.js +150 -0
  261. package/dist/gpu/temporal-sum-gpu.js.map +1 -0
  262. package/dist/gpu/webgpu-runtime.d.ts +63 -0
  263. package/dist/gpu/webgpu-runtime.js +215 -0
  264. package/dist/gpu/webgpu-runtime.js.map +1 -0
  265. package/dist/gpu/wgsl-chart-kernel.d.ts +30 -0
  266. package/dist/gpu/wgsl-chart-kernel.js +165 -0
  267. package/dist/gpu/wgsl-chart-kernel.js.map +1 -0
  268. package/dist/gpu/wgsl-kernels.d.ts +53 -0
  269. package/dist/gpu/wgsl-kernels.js +365 -0
  270. package/dist/gpu/wgsl-kernels.js.map +1 -0
  271. package/dist/gpu/wgsl-sensor-kernel.d.ts +64 -0
  272. package/dist/gpu/wgsl-sensor-kernel.js +409 -0
  273. package/dist/gpu/wgsl-sensor-kernel.js.map +1 -0
  274. package/dist/index.d.ts +91 -25
  275. package/dist/index.js +60 -15
  276. package/dist/index.js.map +1 -1
  277. package/dist/motion/camera-rotation.d.ts +92 -40
  278. package/dist/motion/camera-rotation.js +84 -47
  279. package/dist/motion/camera-rotation.js.map +1 -1
  280. package/dist/motion/capture-rotation-inverse-mapping.d.ts +37 -34
  281. package/dist/motion/capture-rotation-inverse-mapping.js +32 -24
  282. package/dist/motion/capture-rotation-inverse-mapping.js.map +1 -1
  283. package/dist/motion/capture-rotation-temporal-quadrature.d.ts +39 -35
  284. package/dist/motion/capture-rotation-temporal-quadrature.js +37 -28
  285. package/dist/motion/capture-rotation-temporal-quadrature.js.map +1 -1
  286. package/dist/motion/capture-rotation-trajectory.d.ts +32 -28
  287. package/dist/motion/capture-rotation-trajectory.js +36 -26
  288. package/dist/motion/capture-rotation-trajectory.js.map +1 -1
  289. package/dist/motion/capture-translation-parallax-temporal-quadrature.d.ts +23 -21
  290. package/dist/motion/capture-translation-parallax-temporal-quadrature.js +33 -14
  291. package/dist/motion/capture-translation-parallax-temporal-quadrature.js.map +1 -1
  292. package/dist/motion/extended-object-projection.d.ts +19 -16
  293. package/dist/motion/extended-object-projection.js +38 -18
  294. package/dist/motion/extended-object-projection.js.map +1 -1
  295. package/dist/motion/projected-motion.d.ts +18 -17
  296. package/dist/motion/projected-motion.js +25 -17
  297. package/dist/motion/projected-motion.js.map +1 -1
  298. package/dist/motion/temporal-exposure-sum.d.ts +55 -0
  299. package/dist/motion/temporal-exposure-sum.js +141 -0
  300. package/dist/motion/temporal-exposure-sum.js.map +1 -0
  301. package/dist/motion/video-sequence.d.ts +111 -0
  302. package/dist/motion/video-sequence.js +179 -0
  303. package/dist/motion/video-sequence.js.map +1 -0
  304. package/dist/optics/aperture.d.ts +14 -15
  305. package/dist/optics/aperture.js +13 -11
  306. package/dist/optics/aperture.js.map +1 -1
  307. package/dist/optics/atmospheric-haze.d.ts +83 -0
  308. package/dist/optics/atmospheric-haze.js +113 -0
  309. package/dist/optics/atmospheric-haze.js.map +1 -0
  310. package/dist/optics/brown-conrady-distortion.d.ts +116 -0
  311. package/dist/optics/brown-conrady-distortion.js +291 -0
  312. package/dist/optics/brown-conrady-distortion.js.map +1 -0
  313. package/dist/optics/circle-of-confusion.d.ts +10 -10
  314. package/dist/optics/circle-of-confusion.js +15 -11
  315. package/dist/optics/circle-of-confusion.js.map +1 -1
  316. package/dist/optics/complex-pupil-psf.d.ts +64 -33
  317. package/dist/optics/complex-pupil-psf.js +190 -98
  318. package/dist/optics/complex-pupil-psf.js.map +1 -1
  319. package/dist/optics/depth-of-field.d.ts +25 -15
  320. package/dist/optics/depth-of-field.js +67 -27
  321. package/dist/optics/depth-of-field.js.map +1 -1
  322. package/dist/optics/diffraction-psf-profile.d.ts +118 -0
  323. package/dist/optics/diffraction-psf-profile.js +252 -0
  324. package/dist/optics/diffraction-psf-profile.js.map +1 -0
  325. package/dist/optics/diffraction.d.ts +14 -13
  326. package/dist/optics/diffraction.js +14 -10
  327. package/dist/optics/diffraction.js.map +1 -1
  328. package/dist/optics/focus-breathing.d.ts +88 -27
  329. package/dist/optics/focus-breathing.js +114 -23
  330. package/dist/optics/focus-breathing.js.map +1 -1
  331. package/dist/optics/focus-state.d.ts +18 -18
  332. package/dist/optics/focus-state.js +21 -15
  333. package/dist/optics/focus-state.js.map +1 -1
  334. package/dist/optics/front-of-lens-filter.d.ts +45 -14
  335. package/dist/optics/front-of-lens-filter.js +259 -88
  336. package/dist/optics/front-of-lens-filter.js.map +1 -1
  337. package/dist/optics/illumination-vignetting.d.ts +16 -17
  338. package/dist/optics/illumination-vignetting.js +40 -17
  339. package/dist/optics/illumination-vignetting.js.map +1 -1
  340. package/dist/optics/irradiance-convolution.d.ts +59 -0
  341. package/dist/optics/irradiance-convolution.js +138 -0
  342. package/dist/optics/irradiance-convolution.js.map +1 -0
  343. package/dist/optics/lateral-chromatic-aberration.d.ts +33 -30
  344. package/dist/optics/lateral-chromatic-aberration.js +33 -23
  345. package/dist/optics/lateral-chromatic-aberration.js.map +1 -1
  346. package/dist/optics/lens-psf-kernels.d.ts +89 -0
  347. package/dist/optics/lens-psf-kernels.js +175 -0
  348. package/dist/optics/lens-psf-kernels.js.map +1 -0
  349. package/dist/optics/lens-psf-profile.d.ts +78 -46
  350. package/dist/optics/lens-psf-profile.js +335 -124
  351. package/dist/optics/lens-psf-profile.js.map +1 -1
  352. package/dist/optics/longitudinal-chromatic-aberration.d.ts +102 -0
  353. package/dist/optics/longitudinal-chromatic-aberration.js +210 -0
  354. package/dist/optics/longitudinal-chromatic-aberration.js.map +1 -0
  355. package/dist/optics/polygon-diffraction.d.ts +80 -23
  356. package/dist/optics/polygon-diffraction.js +130 -25
  357. package/dist/optics/polygon-diffraction.js.map +1 -1
  358. package/dist/optics/profile-contract.d.ts +5 -6
  359. package/dist/optics/profile-contract.js +14 -11
  360. package/dist/optics/profile-contract.js.map +1 -1
  361. package/dist/optics/psf-foundation.d.ts +23 -23
  362. package/dist/optics/psf-foundation.js +24 -21
  363. package/dist/optics/psf-foundation.js.map +1 -1
  364. package/dist/optics/pupil-vignetting.d.ts +118 -0
  365. package/dist/optics/pupil-vignetting.js +264 -0
  366. package/dist/optics/pupil-vignetting.js.map +1 -0
  367. package/dist/optics/radial-distortion.d.ts +34 -33
  368. package/dist/optics/radial-distortion.js +37 -30
  369. package/dist/optics/radial-distortion.js.map +1 -1
  370. package/dist/optics/scene-to-sensor-irradiance.d.ts +47 -33
  371. package/dist/optics/scene-to-sensor-irradiance.js +73 -45
  372. package/dist/optics/scene-to-sensor-irradiance.js.map +1 -1
  373. package/dist/optics/scene-to-sensor-quadrature.d.ts +23 -18
  374. package/dist/optics/scene-to-sensor-quadrature.js +16 -11
  375. package/dist/optics/scene-to-sensor-quadrature.js.map +1 -1
  376. package/dist/optics/sensor-aperture-rays.d.ts +20 -4
  377. package/dist/optics/sensor-aperture-rays.js +32 -14
  378. package/dist/optics/sensor-aperture-rays.js.map +1 -1
  379. package/dist/optics/sensor-environment-query.d.ts +81 -16
  380. package/dist/optics/sensor-environment-query.js +145 -12
  381. package/dist/optics/sensor-environment-query.js.map +1 -1
  382. package/dist/optics/sensor-psf-quadrature.d.ts +12 -10
  383. package/dist/optics/sensor-psf-quadrature.js +18 -11
  384. package/dist/optics/sensor-psf-quadrature.js.map +1 -1
  385. package/dist/optics/sensor-psf-support.d.ts +8 -6
  386. package/dist/optics/sensor-psf-support.js +8 -5
  387. package/dist/optics/sensor-psf-support.js.map +1 -1
  388. package/dist/optics/stray-light.d.ts +22 -19
  389. package/dist/optics/stray-light.js +18 -12
  390. package/dist/optics/stray-light.js.map +1 -1
  391. package/dist/optics/thin-lens.d.ts +10 -9
  392. package/dist/optics/thin-lens.js +12 -8
  393. package/dist/optics/thin-lens.js.map +1 -1
  394. package/dist/optics/zernike-wavefront.d.ts +154 -0
  395. package/dist/optics/zernike-wavefront.js +352 -0
  396. package/dist/optics/zernike-wavefront.js.map +1 -0
  397. package/dist/output/capture-corrected-sdr.d.ts +16 -8
  398. package/dist/output/capture-corrected-sdr.js +16 -8
  399. package/dist/output/capture-corrected-sdr.js.map +1 -1
  400. package/dist/output/capture-geometry.d.ts +34 -36
  401. package/dist/output/capture-geometry.js +52 -32
  402. package/dist/output/capture-geometry.js.map +1 -1
  403. package/dist/output/capture-sdr.d.ts +7 -6
  404. package/dist/output/capture-sdr.js +11 -8
  405. package/dist/output/capture-sdr.js.map +1 -1
  406. package/dist/output/crop.d.ts +22 -6
  407. package/dist/output/crop.js +40 -6
  408. package/dist/output/crop.js.map +1 -1
  409. package/dist/output/geometric-transforms.d.ts +60 -23
  410. package/dist/output/geometric-transforms.js +111 -24
  411. package/dist/output/geometric-transforms.js.map +1 -1
  412. package/dist/output/lens-corrections.d.ts +27 -19
  413. package/dist/output/lens-corrections.js +29 -13
  414. package/dist/output/lens-corrections.js.map +1 -1
  415. package/dist/output/native-capture-sdr.d.ts +71 -16
  416. package/dist/output/native-capture-sdr.js +190 -33
  417. package/dist/output/native-capture-sdr.js.map +1 -1
  418. package/dist/output/png-encoder.d.ts +65 -0
  419. package/dist/output/png-encoder.js +461 -0
  420. package/dist/output/png-encoder.js.map +1 -0
  421. package/dist/output/print-contrast-reference.d.ts +10 -9
  422. package/dist/output/print-contrast-reference.js +10 -8
  423. package/dist/output/print-contrast-reference.js.map +1 -1
  424. package/dist/output/print-detail.d.ts +18 -17
  425. package/dist/output/print-detail.js +12 -10
  426. package/dist/output/print-detail.js.map +1 -1
  427. package/dist/output/print-jpeg.d.ts +26 -5
  428. package/dist/output/print-jpeg.js +117 -50
  429. package/dist/output/print-jpeg.js.map +1 -1
  430. package/dist/output/print-plan.d.ts +19 -19
  431. package/dist/output/print-plan.js +11 -10
  432. package/dist/output/print-plan.js.map +1 -1
  433. package/dist/output/print-region-statistics.d.ts +14 -15
  434. package/dist/output/print-region-statistics.js +11 -11
  435. package/dist/output/print-region-statistics.js.map +1 -1
  436. package/dist/output/sdr-rendering.d.ts +48 -10
  437. package/dist/output/sdr-rendering.js +114 -25
  438. package/dist/output/sdr-rendering.js.map +1 -1
  439. package/dist/output/subject-framing-crop.d.ts +6 -10
  440. package/dist/output/subject-framing-crop.js +23 -13
  441. package/dist/output/subject-framing-crop.js.map +1 -1
  442. package/dist/processing/demosaic.d.ts +90 -0
  443. package/dist/processing/demosaic.js +275 -0
  444. package/dist/processing/demosaic.js.map +1 -0
  445. package/dist/processing/denoise.d.ts +68 -0
  446. package/dist/processing/denoise.js +214 -0
  447. package/dist/processing/denoise.js.map +1 -0
  448. package/dist/processing/focus-stacking.d.ts +17 -0
  449. package/dist/processing/focus-stacking.js +80 -0
  450. package/dist/processing/focus-stacking.js.map +1 -0
  451. package/dist/processing/hdr.d.ts +54 -0
  452. package/dist/processing/hdr.js +172 -0
  453. package/dist/processing/hdr.js.map +1 -0
  454. package/dist/processing/image-ops.d.ts +66 -0
  455. package/dist/processing/image-ops.js +192 -0
  456. package/dist/processing/image-ops.js.map +1 -0
  457. package/dist/processing/panorama.d.ts +51 -0
  458. package/dist/processing/panorama.js +305 -0
  459. package/dist/processing/panorama.js.map +1 -0
  460. package/dist/processing/processing-task.d.ts +85 -0
  461. package/dist/processing/processing-task.js +164 -0
  462. package/dist/processing/processing-task.js.map +1 -0
  463. package/dist/processing/tone-mapping.d.ts +69 -0
  464. package/dist/processing/tone-mapping.js +310 -0
  465. package/dist/processing/tone-mapping.js.map +1 -0
  466. package/dist/schema/camera.d.ts +5 -4
  467. package/dist/schema/illumination-spectral.d.ts +13 -19
  468. package/dist/schema/illumination-spectral.js +23 -19
  469. package/dist/schema/illumination-spectral.js.map +1 -1
  470. package/dist/schema/illumination-temporal.d.ts +12 -15
  471. package/dist/schema/illumination-temporal.js +43 -28
  472. package/dist/schema/illumination-temporal.js.map +1 -1
  473. package/dist/schema/illumination.d.ts +5 -4
  474. package/dist/schema/illumination.js +55 -20
  475. package/dist/schema/illumination.js.map +1 -1
  476. package/dist/schema/scene-radiance-temporal.d.ts +9 -11
  477. package/dist/schema/scene-radiance-temporal.js +26 -23
  478. package/dist/schema/scene-radiance-temporal.js.map +1 -1
  479. package/dist/schema/scene-radiance.d.ts +17 -17
  480. package/dist/schema/scene-radiance.js +56 -34
  481. package/dist/schema/scene-radiance.js.map +1 -1
  482. package/dist/schema/scene.d.ts +14 -13
  483. package/dist/schema/validation.d.ts +0 -1
  484. package/dist/schema/validation.js +17 -15
  485. package/dist/schema/validation.js.map +1 -1
  486. package/dist/sensor/accumulated-charge.d.ts +45 -64
  487. package/dist/sensor/accumulated-charge.js +41 -47
  488. package/dist/sensor/accumulated-charge.js.map +1 -1
  489. package/dist/sensor/architecture.d.ts +22 -25
  490. package/dist/sensor/architecture.js +17 -16
  491. package/dist/sensor/architecture.js.map +1 -1
  492. package/dist/sensor/camera-saturation-capacity.d.ts +21 -28
  493. package/dist/sensor/camera-saturation-capacity.js +36 -34
  494. package/dist/sensor/camera-saturation-capacity.js.map +1 -1
  495. package/dist/sensor/capture-color-sampling-binding.d.ts +46 -51
  496. package/dist/sensor/capture-color-sampling-binding.js +39 -41
  497. package/dist/sensor/capture-color-sampling-binding.js.map +1 -1
  498. package/dist/sensor/capture-mode-timing.d.ts +8 -9
  499. package/dist/sensor/capture-mode-timing.js +24 -21
  500. package/dist/sensor/capture-mode-timing.js.map +1 -1
  501. package/dist/sensor/capture-mode.d.ts +28 -30
  502. package/dist/sensor/capture-mode.js +33 -31
  503. package/dist/sensor/capture-mode.js.map +1 -1
  504. package/dist/sensor/color-sampling.d.ts +30 -33
  505. package/dist/sensor/color-sampling.js +32 -37
  506. package/dist/sensor/color-sampling.js.map +1 -1
  507. package/dist/sensor/constant-rate-temporal-integration.d.ts +19 -23
  508. package/dist/sensor/constant-rate-temporal-integration.js +28 -26
  509. package/dist/sensor/constant-rate-temporal-integration.js.map +1 -1
  510. package/dist/sensor/dark-current.d.ts +53 -49
  511. package/dist/sensor/dark-current.js +87 -46
  512. package/dist/sensor/dark-current.js.map +1 -1
  513. package/dist/sensor/environment-photo-signal.d.ts +71 -30
  514. package/dist/sensor/environment-photo-signal.js +127 -46
  515. package/dist/sensor/environment-photo-signal.js.map +1 -1
  516. package/dist/sensor/eqe-electron-rate.d.ts +14 -13
  517. package/dist/sensor/eqe-electron-rate.js +34 -14
  518. package/dist/sensor/eqe-electron-rate.js.map +1 -1
  519. package/dist/sensor/eqe-local-exposure.d.ts +24 -24
  520. package/dist/sensor/eqe-local-exposure.js +15 -11
  521. package/dist/sensor/eqe-local-exposure.js.map +1 -1
  522. package/dist/sensor/eqe-temporal-exposure.d.ts +11 -11
  523. package/dist/sensor/eqe-temporal-exposure.js +15 -10
  524. package/dist/sensor/eqe-temporal-exposure.js.map +1 -1
  525. package/dist/sensor/exposure-window.d.ts +48 -34
  526. package/dist/sensor/exposure-window.js +77 -36
  527. package/dist/sensor/exposure-window.js.map +1 -1
  528. package/dist/sensor/fixed-pattern-noise.d.ts +108 -0
  529. package/dist/sensor/fixed-pattern-noise.js +166 -0
  530. package/dist/sensor/fixed-pattern-noise.js.map +1 -0
  531. package/dist/sensor/iso-gain.d.ts +44 -0
  532. package/dist/sensor/iso-gain.js +119 -0
  533. package/dist/sensor/iso-gain.js.map +1 -0
  534. package/dist/sensor/iso-signal-chain.d.ts +25 -48
  535. package/dist/sensor/iso-signal-chain.js +52 -66
  536. package/dist/sensor/iso-signal-chain.js.map +1 -1
  537. package/dist/sensor/local-exposure-binding.d.ts +21 -21
  538. package/dist/sensor/local-exposure-binding.js +22 -18
  539. package/dist/sensor/local-exposure-binding.js.map +1 -1
  540. package/dist/sensor/optical-stack.d.ts +36 -40
  541. package/dist/sensor/optical-stack.js +34 -37
  542. package/dist/sensor/optical-stack.js.map +1 -1
  543. package/dist/sensor/photon-energy.d.ts +22 -28
  544. package/dist/sensor/photon-energy.js +42 -34
  545. package/dist/sensor/photon-energy.js.map +1 -1
  546. package/dist/sensor/physical-charge-capacity.d.ts +20 -30
  547. package/dist/sensor/physical-charge-capacity.js +35 -36
  548. package/dist/sensor/physical-charge-capacity.js.map +1 -1
  549. package/dist/sensor/pixel-pitch.d.ts +2 -3
  550. package/dist/sensor/pixel-pitch.js +4 -2
  551. package/dist/sensor/pixel-pitch.js.map +1 -1
  552. package/dist/sensor/radiometry-readiness.d.ts +13 -15
  553. package/dist/sensor/radiometry-readiness.js +20 -17
  554. package/dist/sensor/radiometry-readiness.js.map +1 -1
  555. package/dist/sensor/raw-readout.d.ts +173 -83
  556. package/dist/sensor/raw-readout.js +425 -160
  557. package/dist/sensor/raw-readout.js.map +1 -1
  558. package/dist/sensor/raw-reconstruction.d.ts +112 -44
  559. package/dist/sensor/raw-reconstruction.js +200 -47
  560. package/dist/sensor/raw-reconstruction.js.map +1 -1
  561. package/dist/sensor/readout-exposure-linkage.d.ts +103 -34
  562. package/dist/sensor/readout-exposure-linkage.js +125 -27
  563. package/dist/sensor/readout-exposure-linkage.js.map +1 -1
  564. package/dist/sensor/readout-timing.d.ts +43 -44
  565. package/dist/sensor/readout-timing.js +38 -30
  566. package/dist/sensor/readout-timing.js.map +1 -1
  567. package/dist/sensor/response-application-compatibility.d.ts +21 -28
  568. package/dist/sensor/response-application-compatibility.js +35 -34
  569. package/dist/sensor/response-application-compatibility.js.map +1 -1
  570. package/dist/sensor/response-operating-range.d.ts +26 -35
  571. package/dist/sensor/response-operating-range.js +40 -39
  572. package/dist/sensor/response-operating-range.js.map +1 -1
  573. package/dist/sensor/responsivity-photocurrent.d.ts +21 -29
  574. package/dist/sensor/responsivity-photocurrent.js +57 -40
  575. package/dist/sensor/responsivity-photocurrent.js.map +1 -1
  576. package/dist/sensor/sampling-aperture.d.ts +21 -25
  577. package/dist/sensor/sampling-aperture.js +29 -28
  578. package/dist/sensor/sampling-aperture.js.map +1 -1
  579. package/dist/sensor/scene-eqe-temporal-exposure.d.ts +14 -12
  580. package/dist/sensor/scene-eqe-temporal-exposure.js +13 -8
  581. package/dist/sensor/scene-eqe-temporal-exposure.js.map +1 -1
  582. package/dist/sensor/sensor-geometry.d.ts +28 -32
  583. package/dist/sensor/sensor-geometry.js +35 -20
  584. package/dist/sensor/sensor-geometry.js.map +1 -1
  585. package/dist/sensor/signal-noise.d.ts +14 -16
  586. package/dist/sensor/signal-noise.js +15 -13
  587. package/dist/sensor/signal-noise.js.map +1 -1
  588. package/dist/sensor/spatial-sample-reduction.d.ts +45 -60
  589. package/dist/sensor/spatial-sample-reduction.js +39 -48
  590. package/dist/sensor/spatial-sample-reduction.js.map +1 -1
  591. package/dist/sensor/spatial-sampling-quadrature.d.ts +46 -54
  592. package/dist/sensor/spatial-sampling-quadrature.js +31 -36
  593. package/dist/sensor/spatial-sampling-quadrature.js.map +1 -1
  594. package/dist/sensor/spatio-spectral-reduction.d.ts +32 -42
  595. package/dist/sensor/spatio-spectral-reduction.js +24 -29
  596. package/dist/sensor/spatio-spectral-reduction.js.map +1 -1
  597. package/dist/sensor/spectral-coverage.d.ts +6 -9
  598. package/dist/sensor/spectral-coverage.js +9 -6
  599. package/dist/sensor/spectral-coverage.js.map +1 -1
  600. package/dist/sensor/spectral-quadrature.d.ts +46 -60
  601. package/dist/sensor/spectral-quadrature.js +38 -48
  602. package/dist/sensor/spectral-quadrature.js.map +1 -1
  603. package/dist/sensor/spectral-response.d.ts +53 -41
  604. package/dist/sensor/spectral-response.js +80 -47
  605. package/dist/sensor/spectral-response.js.map +1 -1
  606. package/dist/sensor/stochastic-seed.d.ts +50 -0
  607. package/dist/sensor/stochastic-seed.js +123 -0
  608. package/dist/sensor/stochastic-seed.js.map +1 -0
  609. package/dist/sensor/temporal-eqe-sum.d.ts +2 -4
  610. package/dist/sensor/temporal-eqe-sum.js +5 -6
  611. package/dist/sensor/temporal-eqe-sum.js.map +1 -1
  612. package/dist/sensor/temporal-photo-signal.d.ts +5 -6
  613. package/dist/sensor/temporal-photo-signal.js +11 -10
  614. package/dist/sensor/temporal-photo-signal.js.map +1 -1
  615. package/dist/sensor/temporal-sample-binding.d.ts +1 -2
  616. package/dist/sensor/temporal-sample-binding.js +3 -3
  617. package/dist/sensor/temporal-sample-binding.js.map +1 -1
  618. package/dist/simulation/poc-simulation.d.ts +16 -16
  619. package/dist/simulation/poc-simulation.js +20 -15
  620. package/dist/simulation/poc-simulation.js.map +1 -1
  621. package/dist/stabilization/camera-shake.d.ts +42 -18
  622. package/dist/stabilization/camera-shake.js +43 -20
  623. package/dist/stabilization/camera-shake.js.map +1 -1
  624. package/dist/stabilization/system.d.ts +44 -41
  625. package/dist/stabilization/system.js +196 -108
  626. package/dist/stabilization/system.js.map +1 -1
  627. package/docs/AGENT_GUIDE.md +183 -0
  628. package/docs/API_REFERENCE.md +777 -2
  629. package/docs/QUICK_START.md +663 -0
  630. package/docs/USAGE.md +1719 -714
  631. package/docs/api/camera-equivalent-focal-length.md +6 -7
  632. package/docs/api/camera-field-of-view.md +16 -8
  633. package/docs/api/camera-lens-projection.md +246 -0
  634. package/docs/api/camera-projected-object-size.md +6 -5
  635. package/docs/api/capture-capture-export-metadata.md +10 -10
  636. package/docs/api/capture-dng-import.md +134 -0
  637. package/docs/api/capture-environment-raw-producer.md +17 -11
  638. package/docs/api/capture-export-jpeg.md +16 -0
  639. package/docs/api/capture-focus-control.md +25 -47
  640. package/docs/api/capture-linear-encoding.md +21 -12
  641. package/docs/api/capture-lossless-jpeg.md +49 -0
  642. package/docs/api/capture-native-environment-optical-stage.md +75 -0
  643. package/docs/api/capture-native-environment-raw.md +161 -4
  644. package/docs/api/capture-native-raw-development.md +69 -8
  645. package/docs/api/capture-native-raw-dng.md +84 -0
  646. package/docs/api/capture-native-raw.md +21 -10
  647. package/docs/api/capture-packed-sensor-raw.md +156 -0
  648. package/docs/api/capture-photographic-export.md +69 -31
  649. package/docs/api/capture-raw-frame-reconstruction.md +8 -8
  650. package/docs/api/capture-raw-white-level.md +37 -0
  651. package/docs/api/capture-release-sequence.md +6 -7
  652. package/docs/api/capture-sensor-raw-frame.md +6 -6
  653. package/docs/api/capture-sensor-raw-producer.md +17 -11
  654. package/docs/api/capture-simulated-capture.md +15 -15
  655. package/docs/api/color-camera-color-matrix.md +103 -0
  656. package/docs/api/color-capture-color.md +22 -11
  657. package/docs/api/color-chromatic-adaptation.md +82 -0
  658. package/docs/api/color-color-difference.md +134 -0
  659. package/docs/api/color-color-matching-functions.md +259 -0
  660. package/docs/api/color-colorimetry-math.md +54 -0
  661. package/docs/api/color-gamut-mapping.md +72 -0
  662. package/docs/api/color-illuminants.md +280 -0
  663. package/docs/api/color-rgb-color-spaces.md +151 -0
  664. package/docs/api/color-sensor-color-development.md +27 -0
  665. package/docs/api/color-srgb-icc.md +2 -4
  666. package/docs/api/color-white-balance.md +95 -19
  667. package/docs/api/composition-image-formation-plan.md +124 -95
  668. package/docs/api/composition-plan-consumer.md +7 -7
  669. package/docs/api/core-calculation-result.md +18 -14
  670. package/docs/api/core-configuration-error.md +1 -1
  671. package/docs/api/core-image-formation.md +7 -7
  672. package/docs/api/core-scientific-assurance.md +12 -10
  673. package/docs/api/core-spectral-composition.md +14 -14
  674. package/docs/api/core-spectral.md +6 -6
  675. package/docs/api/core-validation.md +3 -3
  676. package/docs/api/core-version.md +7 -6
  677. package/docs/api/equipment-exposure-capabilities.md +11 -10
  678. package/docs/api/equipment-generic-tier-assets.md +7 -2
  679. package/docs/api/equipment-generic-tier-presets.md +6 -6
  680. package/docs/api/equipment-iso-capabilities.md +18 -18
  681. package/docs/api/equipment-metering-capabilities.md +6 -6
  682. package/docs/api/equipment-release-capabilities.md +4 -4
  683. package/docs/api/exports.json +2253 -3
  684. package/docs/api/exposure-exposure-duration-control.md +9 -9
  685. package/docs/api/exposure-exposure-mode-resolver.md +35 -31
  686. package/docs/api/exposure-exposure.md +10 -10
  687. package/docs/api/exposure-flash-ttl.md +182 -0
  688. package/docs/api/exposure-flash.md +183 -28
  689. package/docs/api/exposure-metering-scene-radiance.md +11 -10
  690. package/docs/api/exposure-metering-target.md +9 -8
  691. package/docs/api/exposure-metering-temporal.md +8 -8
  692. package/docs/api/exposure-metering.md +69 -9
  693. package/docs/api/exposure-program-line.md +6 -5
  694. package/docs/api/facade-chart-radiance-batch.md +96 -0
  695. package/docs/api/facade-chart-scenes.md +240 -0
  696. package/docs/api/facade-scene-radiance.md +122 -0
  697. package/docs/api/facade-simulate-capture.md +397 -0
  698. package/docs/api/gpu-image-kernel-accelerator.md +157 -0
  699. package/docs/api/gpu-image-kernel-execution.md +152 -0
  700. package/docs/api/motion-camera-rotation.md +43 -26
  701. package/docs/api/motion-capture-rotation-inverse-mapping.md +24 -23
  702. package/docs/api/motion-capture-rotation-temporal-quadrature.md +22 -22
  703. package/docs/api/motion-capture-rotation-trajectory.md +15 -15
  704. package/docs/api/motion-capture-translation-parallax-temporal-quadrature.md +15 -14
  705. package/docs/api/motion-extended-object-projection.md +10 -8
  706. package/docs/api/motion-projected-motion.md +8 -8
  707. package/docs/api/motion-temporal-exposure-sum.md +98 -0
  708. package/docs/api/motion-video-sequence.md +159 -0
  709. package/docs/api/optics-aperture.md +8 -8
  710. package/docs/api/optics-atmospheric-haze.md +104 -0
  711. package/docs/api/optics-brown-conrady-distortion.md +123 -0
  712. package/docs/api/optics-circle-of-confusion.md +5 -4
  713. package/docs/api/optics-complex-pupil-psf.md +57 -16
  714. package/docs/api/optics-depth-of-field.md +12 -6
  715. package/docs/api/optics-diffraction-psf-profile.md +96 -0
  716. package/docs/api/optics-diffraction.md +8 -7
  717. package/docs/api/optics-focus-breathing.md +104 -16
  718. package/docs/api/optics-focus-state.md +9 -10
  719. package/docs/api/optics-front-of-lens-filter.md +72 -14
  720. package/docs/api/optics-illumination-vignetting.md +10 -10
  721. package/docs/api/optics-irradiance-convolution.md +95 -0
  722. package/docs/api/optics-lateral-chromatic-aberration.md +22 -21
  723. package/docs/api/optics-lens-psf-kernels.md +72 -0
  724. package/docs/api/optics-lens-psf-profile.md +48 -26
  725. package/docs/api/optics-longitudinal-chromatic-aberration.md +128 -0
  726. package/docs/api/optics-polygon-diffraction.md +78 -13
  727. package/docs/api/optics-profile-contract.md +4 -4
  728. package/docs/api/optics-psf-foundation.md +12 -12
  729. package/docs/api/optics-pupil-vignetting.md +132 -0
  730. package/docs/api/optics-radial-distortion.md +12 -12
  731. package/docs/api/optics-scene-to-sensor-irradiance.md +25 -14
  732. package/docs/api/optics-scene-to-sensor-quadrature.md +15 -12
  733. package/docs/api/optics-sensor-aperture-rays.md +3 -2
  734. package/docs/api/optics-sensor-environment-query.md +52 -9
  735. package/docs/api/optics-sensor-psf-quadrature.md +13 -10
  736. package/docs/api/optics-stray-light.md +12 -11
  737. package/docs/api/optics-thin-lens.md +4 -3
  738. package/docs/api/optics-zernike-wavefront.md +229 -0
  739. package/docs/api/output-capture-corrected-sdr.md +10 -7
  740. package/docs/api/output-capture-geometry.md +35 -36
  741. package/docs/api/output-capture-sdr.md +4 -4
  742. package/docs/api/output-crop.md +7 -4
  743. package/docs/api/output-geometric-transforms.md +65 -19
  744. package/docs/api/output-lens-corrections.md +17 -15
  745. package/docs/api/output-native-capture-sdr.md +26 -13
  746. package/docs/api/output-png-encoder.md +105 -0
  747. package/docs/api/output-print-contrast-reference.md +8 -8
  748. package/docs/api/output-print-detail.md +14 -14
  749. package/docs/api/output-print-jpeg.md +22 -5
  750. package/docs/api/output-print-plan.md +18 -18
  751. package/docs/api/output-print-region-statistics.md +14 -14
  752. package/docs/api/output-sdr-rendering.md +52 -10
  753. package/docs/api/output-subject-framing-crop.md +5 -6
  754. package/docs/api/processing-demosaic.md +120 -0
  755. package/docs/api/processing-denoise.md +148 -0
  756. package/docs/api/processing-focus-stacking.md +41 -0
  757. package/docs/api/processing-hdr.md +113 -0
  758. package/docs/api/processing-panorama.md +82 -0
  759. package/docs/api/processing-processing-task.md +107 -0
  760. package/docs/api/processing-tone-mapping.md +142 -0
  761. package/docs/api/schema-camera.md +6 -4
  762. package/docs/api/schema-illumination-spectral.md +10 -11
  763. package/docs/api/schema-illumination-temporal.md +13 -15
  764. package/docs/api/schema-illumination.md +4 -4
  765. package/docs/api/schema-scene-radiance-temporal.md +10 -11
  766. package/docs/api/schema-scene-radiance.md +18 -17
  767. package/docs/api/schema-scene.md +9 -9
  768. package/docs/api/schema-validation.md +1 -1
  769. package/docs/api/sensor-accumulated-charge.md +12 -20
  770. package/docs/api/sensor-architecture.md +15 -16
  771. package/docs/api/sensor-camera-saturation-capacity.md +9 -11
  772. package/docs/api/sensor-capture-color-sampling-binding.md +47 -51
  773. package/docs/api/sensor-capture-mode-timing.md +9 -9
  774. package/docs/api/sensor-capture-mode.md +29 -30
  775. package/docs/api/sensor-color-sampling.md +31 -33
  776. package/docs/api/sensor-constant-rate-temporal-integration.md +10 -11
  777. package/docs/api/sensor-dark-current.md +30 -14
  778. package/docs/api/sensor-environment-photo-signal.md +13 -6
  779. package/docs/api/sensor-eqe-electron-rate.md +9 -8
  780. package/docs/api/sensor-eqe-local-exposure.md +18 -17
  781. package/docs/api/sensor-eqe-temporal-exposure.md +12 -11
  782. package/docs/api/sensor-exposure-window.md +24 -24
  783. package/docs/api/sensor-fixed-pattern-noise.md +104 -0
  784. package/docs/api/sensor-iso-gain.md +63 -0
  785. package/docs/api/sensor-iso-signal-chain.md +13 -22
  786. package/docs/api/sensor-local-exposure-binding.md +12 -13
  787. package/docs/api/sensor-optical-stack.md +37 -40
  788. package/docs/api/sensor-photon-energy.md +10 -11
  789. package/docs/api/sensor-physical-charge-capacity.md +8 -13
  790. package/docs/api/sensor-pixel-pitch.md +1 -1
  791. package/docs/api/sensor-radiometry-readiness.md +9 -9
  792. package/docs/api/sensor-raw-readout.md +118 -52
  793. package/docs/api/sensor-raw-reconstruction.md +97 -20
  794. package/docs/api/sensor-readout-exposure-linkage.md +120 -24
  795. package/docs/api/sensor-readout-timing.md +33 -35
  796. package/docs/api/sensor-response-application-compatibility.md +9 -11
  797. package/docs/api/sensor-response-operating-range.md +14 -18
  798. package/docs/api/sensor-responsivity-photocurrent.md +9 -12
  799. package/docs/api/sensor-sampling-aperture.md +22 -25
  800. package/docs/api/sensor-scene-eqe-temporal-exposure.md +9 -8
  801. package/docs/api/sensor-sensor-geometry.md +23 -24
  802. package/docs/api/sensor-signal-noise.md +10 -10
  803. package/docs/api/sensor-spatial-sample-reduction.md +27 -30
  804. package/docs/api/sensor-spatial-sampling-quadrature.md +37 -39
  805. package/docs/api/sensor-spatio-spectral-reduction.md +27 -29
  806. package/docs/api/sensor-spectral-coverage.md +5 -5
  807. package/docs/api/sensor-spectral-quadrature.md +33 -35
  808. package/docs/api/sensor-spectral-response.md +28 -16
  809. package/docs/api/sensor-temporal-photo-signal.md +6 -6
  810. package/docs/api/simulation-poc-simulation.md +17 -16
  811. package/docs/api/stabilization-camera-shake.md +29 -10
  812. package/docs/api/stabilization-system.md +25 -21
  813. package/docs/examples/production-request.json +3821 -2157
  814. package/docs/examples/simulate-capture.mjs +14 -0
  815. package/llms.txt +35 -0
  816. package/package.json +32 -11
  817. package/AGENTS.md +0 -674
  818. package/CONTRIBUTING.md +0 -76
  819. package/DCO +0 -33
  820. package/dist/camera/equivalent-focal-length.d.ts.map +0 -1
  821. package/dist/camera/field-of-view.d.ts.map +0 -1
  822. package/dist/camera/projected-object-size.d.ts.map +0 -1
  823. package/dist/capture/capture-export-metadata.d.ts.map +0 -1
  824. package/dist/capture/environment-raw-producer.d.ts.map +0 -1
  825. package/dist/capture/export-jpeg.d.ts.map +0 -1
  826. package/dist/capture/export-tiff.d.ts.map +0 -1
  827. package/dist/capture/focus-control.d.ts.map +0 -1
  828. package/dist/capture/linear-encoding.d.ts.map +0 -1
  829. package/dist/capture/native-environment-raw.d.ts.map +0 -1
  830. package/dist/capture/native-raw-development.d.ts.map +0 -1
  831. package/dist/capture/native-raw.d.ts.map +0 -1
  832. package/dist/capture/photographic-export.d.ts.map +0 -1
  833. package/dist/capture/raw-frame-limits.d.ts.map +0 -1
  834. package/dist/capture/raw-frame-reconstruction.d.ts.map +0 -1
  835. package/dist/capture/release-sequence.d.ts.map +0 -1
  836. package/dist/capture/sensor-raw-frame.d.ts.map +0 -1
  837. package/dist/capture/sensor-raw-producer.d.ts.map +0 -1
  838. package/dist/capture/simulated-capture.d.ts.map +0 -1
  839. package/dist/color/capture-color.d.ts.map +0 -1
  840. package/dist/color/sensor-color-development.d.ts.map +0 -1
  841. package/dist/color/srgb-icc.d.ts.map +0 -1
  842. package/dist/color/srgb-transfer.d.ts.map +0 -1
  843. package/dist/color/white-balance.d.ts.map +0 -1
  844. package/dist/composition/image-formation-plan.d.ts.map +0 -1
  845. package/dist/composition/plan-consumer.d.ts.map +0 -1
  846. package/dist/core/calculation-result.d.ts.map +0 -1
  847. package/dist/core/canonical-json.d.ts.map +0 -1
  848. package/dist/core/configuration-error.d.ts.map +0 -1
  849. package/dist/core/evidence-provenance.d.ts.map +0 -1
  850. package/dist/core/image-formation.d.ts.map +0 -1
  851. package/dist/core/owned-data.d.ts.map +0 -1
  852. package/dist/core/record-validation.d.ts.map +0 -1
  853. package/dist/core/scientific-assurance.d.ts.map +0 -1
  854. package/dist/core/spectral-composition.d.ts.map +0 -1
  855. package/dist/core/spectral.d.ts.map +0 -1
  856. package/dist/core/validation.d.ts.map +0 -1
  857. package/dist/core/version.d.ts.map +0 -1
  858. package/dist/equipment/exposure-capabilities.d.ts.map +0 -1
  859. package/dist/equipment/generic-tier-assets.d.ts.map +0 -1
  860. package/dist/equipment/generic-tier-presets.d.ts.map +0 -1
  861. package/dist/equipment/iso-capabilities.d.ts.map +0 -1
  862. package/dist/equipment/metering-capabilities.d.ts.map +0 -1
  863. package/dist/equipment/release-capabilities.d.ts.map +0 -1
  864. package/dist/exposure/exposure-duration-control.d.ts.map +0 -1
  865. package/dist/exposure/exposure-mode-resolver.d.ts.map +0 -1
  866. package/dist/exposure/exposure.d.ts.map +0 -1
  867. package/dist/exposure/flash.d.ts.map +0 -1
  868. package/dist/exposure/metering-scene-radiance.d.ts.map +0 -1
  869. package/dist/exposure/metering-target.d.ts.map +0 -1
  870. package/dist/exposure/metering-temporal.d.ts.map +0 -1
  871. package/dist/exposure/metering.d.ts.map +0 -1
  872. package/dist/exposure/program-line.d.ts.map +0 -1
  873. package/dist/index.d.ts.map +0 -1
  874. package/dist/motion/camera-rotation.d.ts.map +0 -1
  875. package/dist/motion/capture-rotation-inverse-mapping.d.ts.map +0 -1
  876. package/dist/motion/capture-rotation-temporal-quadrature.d.ts.map +0 -1
  877. package/dist/motion/capture-rotation-trajectory.d.ts.map +0 -1
  878. package/dist/motion/capture-translation-parallax-temporal-quadrature.d.ts.map +0 -1
  879. package/dist/motion/extended-object-projection.d.ts.map +0 -1
  880. package/dist/motion/projected-motion.d.ts.map +0 -1
  881. package/dist/optics/aperture.d.ts.map +0 -1
  882. package/dist/optics/circle-of-confusion.d.ts.map +0 -1
  883. package/dist/optics/complex-pupil-psf.d.ts.map +0 -1
  884. package/dist/optics/depth-of-field.d.ts.map +0 -1
  885. package/dist/optics/diffraction.d.ts.map +0 -1
  886. package/dist/optics/focus-breathing.d.ts.map +0 -1
  887. package/dist/optics/focus-state.d.ts.map +0 -1
  888. package/dist/optics/front-of-lens-filter.d.ts.map +0 -1
  889. package/dist/optics/illumination-vignetting.d.ts.map +0 -1
  890. package/dist/optics/lateral-chromatic-aberration.d.ts.map +0 -1
  891. package/dist/optics/lens-psf-profile.d.ts.map +0 -1
  892. package/dist/optics/polygon-diffraction.d.ts.map +0 -1
  893. package/dist/optics/profile-contract.d.ts.map +0 -1
  894. package/dist/optics/psf-foundation.d.ts.map +0 -1
  895. package/dist/optics/radial-distortion.d.ts.map +0 -1
  896. package/dist/optics/scene-to-sensor-irradiance.d.ts.map +0 -1
  897. package/dist/optics/scene-to-sensor-quadrature.d.ts.map +0 -1
  898. package/dist/optics/sensor-aperture-rays.d.ts.map +0 -1
  899. package/dist/optics/sensor-environment-query.d.ts.map +0 -1
  900. package/dist/optics/sensor-psf-quadrature.d.ts.map +0 -1
  901. package/dist/optics/sensor-psf-support.d.ts.map +0 -1
  902. package/dist/optics/stray-light.d.ts.map +0 -1
  903. package/dist/optics/thin-lens.d.ts.map +0 -1
  904. package/dist/output/capture-corrected-sdr.d.ts.map +0 -1
  905. package/dist/output/capture-geometry.d.ts.map +0 -1
  906. package/dist/output/capture-sdr.d.ts.map +0 -1
  907. package/dist/output/crop.d.ts.map +0 -1
  908. package/dist/output/geometric-transforms.d.ts.map +0 -1
  909. package/dist/output/lens-corrections.d.ts.map +0 -1
  910. package/dist/output/native-capture-sdr.d.ts.map +0 -1
  911. package/dist/output/print-contrast-reference.d.ts.map +0 -1
  912. package/dist/output/print-detail.d.ts.map +0 -1
  913. package/dist/output/print-jpeg.d.ts.map +0 -1
  914. package/dist/output/print-plan.d.ts.map +0 -1
  915. package/dist/output/print-region-statistics.d.ts.map +0 -1
  916. package/dist/output/sdr-rendering.d.ts.map +0 -1
  917. package/dist/output/subject-framing-crop.d.ts.map +0 -1
  918. package/dist/schema/camera.d.ts.map +0 -1
  919. package/dist/schema/camera.js +0 -3
  920. package/dist/schema/camera.js.map +0 -1
  921. package/dist/schema/illumination-spectral.d.ts.map +0 -1
  922. package/dist/schema/illumination-temporal.d.ts.map +0 -1
  923. package/dist/schema/illumination.d.ts.map +0 -1
  924. package/dist/schema/scene-radiance-temporal.d.ts.map +0 -1
  925. package/dist/schema/scene-radiance.d.ts.map +0 -1
  926. package/dist/schema/scene.d.ts.map +0 -1
  927. package/dist/schema/scene.js +0 -3
  928. package/dist/schema/scene.js.map +0 -1
  929. package/dist/schema/validation.d.ts.map +0 -1
  930. package/dist/sensor/accumulated-charge.d.ts.map +0 -1
  931. package/dist/sensor/architecture.d.ts.map +0 -1
  932. package/dist/sensor/camera-saturation-capacity.d.ts.map +0 -1
  933. package/dist/sensor/capture-color-sampling-binding.d.ts.map +0 -1
  934. package/dist/sensor/capture-mode-timing.d.ts.map +0 -1
  935. package/dist/sensor/capture-mode.d.ts.map +0 -1
  936. package/dist/sensor/color-sampling.d.ts.map +0 -1
  937. package/dist/sensor/constant-rate-temporal-integration.d.ts.map +0 -1
  938. package/dist/sensor/dark-current.d.ts.map +0 -1
  939. package/dist/sensor/environment-photo-signal.d.ts.map +0 -1
  940. package/dist/sensor/eqe-electron-rate.d.ts.map +0 -1
  941. package/dist/sensor/eqe-local-exposure.d.ts.map +0 -1
  942. package/dist/sensor/eqe-temporal-exposure.d.ts.map +0 -1
  943. package/dist/sensor/exposure-window.d.ts.map +0 -1
  944. package/dist/sensor/iso-signal-chain.d.ts.map +0 -1
  945. package/dist/sensor/local-exposure-binding.d.ts.map +0 -1
  946. package/dist/sensor/optical-stack.d.ts.map +0 -1
  947. package/dist/sensor/photon-energy.d.ts.map +0 -1
  948. package/dist/sensor/physical-charge-capacity.d.ts.map +0 -1
  949. package/dist/sensor/pixel-pitch.d.ts.map +0 -1
  950. package/dist/sensor/radiometry-readiness.d.ts.map +0 -1
  951. package/dist/sensor/raw-readout.d.ts.map +0 -1
  952. package/dist/sensor/raw-reconstruction.d.ts.map +0 -1
  953. package/dist/sensor/readout-exposure-linkage.d.ts.map +0 -1
  954. package/dist/sensor/readout-timing.d.ts.map +0 -1
  955. package/dist/sensor/response-application-compatibility.d.ts.map +0 -1
  956. package/dist/sensor/response-operating-range.d.ts.map +0 -1
  957. package/dist/sensor/responsivity-photocurrent.d.ts.map +0 -1
  958. package/dist/sensor/sampling-aperture.d.ts.map +0 -1
  959. package/dist/sensor/scene-eqe-temporal-exposure.d.ts.map +0 -1
  960. package/dist/sensor/sensor-geometry.d.ts.map +0 -1
  961. package/dist/sensor/signal-noise.d.ts.map +0 -1
  962. package/dist/sensor/spatial-sample-reduction.d.ts.map +0 -1
  963. package/dist/sensor/spatial-sampling-quadrature.d.ts.map +0 -1
  964. package/dist/sensor/spatio-spectral-reduction.d.ts.map +0 -1
  965. package/dist/sensor/spectral-coverage.d.ts.map +0 -1
  966. package/dist/sensor/spectral-quadrature.d.ts.map +0 -1
  967. package/dist/sensor/spectral-response.d.ts.map +0 -1
  968. package/dist/sensor/temporal-eqe-sum.d.ts.map +0 -1
  969. package/dist/sensor/temporal-photo-signal.d.ts.map +0 -1
  970. package/dist/sensor/temporal-sample-binding.d.ts.map +0 -1
  971. package/dist/simulation/poc-simulation.d.ts.map +0 -1
  972. package/dist/stabilization/camera-shake.d.ts.map +0 -1
  973. package/dist/stabilization/system.d.ts.map +0 -1
  974. package/docs/API_STYLE.md +0 -235
  975. package/docs/ARCHITECTURE.md +0 -356
  976. package/docs/AUTOMATION_COORDINATION.md +0 -190
  977. package/docs/CAPTURE_COLOR.md +0 -25
  978. package/docs/CAPTURE_CORRECTED_SDR.md +0 -25
  979. package/docs/CAPTURE_EXPORT_METADATA.md +0 -27
  980. package/docs/CAPTURE_SDR.md +0 -22
  981. package/docs/DENSE_PUPIL_QUALIFICATION.md +0 -121
  982. package/docs/DEVELOPERS.md +0 -68
  983. package/docs/DIGITAL_OPTICS_FOUNDATION.md +0 -69
  984. package/docs/ENVIRONMENT_RAW_CAPTURE.md +0 -208
  985. package/docs/EXPORT_ACCEPTANCE.md +0 -133
  986. package/docs/GENERIC_TIER_PRESETS.md +0 -269
  987. package/docs/GEOMETRIC_PREPARATION_REUSE.md +0 -141
  988. package/docs/IMAGE_FORMATION.md +0 -247
  989. package/docs/LINEAR_CAPTURE_ENCODING.md +0 -25
  990. package/docs/MOTION_AND_SIGNAL.md +0 -250
  991. package/docs/NATIVE_CAPTURE_SDR.md +0 -70
  992. package/docs/NATIVE_CAPTURE_SDR_REVIEW.md +0 -37
  993. package/docs/NATIVE_CAPTURE_SDR_VALIDATION.md +0 -34
  994. package/docs/NATIVE_RAW_AND_PRINT.md +0 -54
  995. package/docs/NUMERICAL_CORRECTNESS.md +0 -191
  996. package/docs/PERFORMANCE_BASELINE.md +0 -56
  997. package/docs/PHOTOGRAPHIC_EXPORT.md +0 -206
  998. package/docs/PHYSICS_FOUNDATION.md +0 -426
  999. package/docs/POC_API.md +0 -278
  1000. package/docs/POC_PROJECTION_PLATFORM_REFERENCE.md +0 -12
  1001. package/docs/POC_PROJECTION_REUSE.md +0 -124
  1002. package/docs/PRINT_195_196_REVIEW.md +0 -93
  1003. package/docs/PRINT_196_ENGINE_ACCEPTANCE.md +0 -45
  1004. package/docs/PRINT_CONTRAST_REFERENCE.md +0 -43
  1005. package/docs/PRINT_DETAIL_ASSESSMENT.md +0 -81
  1006. package/docs/PRINT_DETAIL_JPEG_EVIDENCE.md +0 -36
  1007. package/docs/PRINT_DETAIL_SDR_EVIDENCE.md +0 -29
  1008. package/docs/PRINT_DETAIL_VALIDATION.md +0 -36
  1009. package/docs/PRINT_PLANNING.md +0 -75
  1010. package/docs/PRINT_REGION_STATISTICS.md +0 -38
  1011. package/docs/PROCESSED_OUTPUT.md +0 -157
  1012. package/docs/PRODUCTION_COMPOSITION.md +0 -373
  1013. package/docs/PRODUCTION_ENVIRONMENT_CAPTURE.md +0 -131
  1014. package/docs/PROVENANCE.md +0 -115
  1015. package/docs/PSF_FOUNDATION.md +0 -165
  1016. package/docs/RAW_FRAME_ENVELOPE.md +0 -56
  1017. package/docs/RAW_FRAME_RECONSTRUCTION.md +0 -30
  1018. package/docs/RELEASE_1_0.md +0 -66
  1019. package/docs/RELEASE_1_0_1.md +0 -61
  1020. package/docs/RELEASE_1_1_0.md +0 -25
  1021. package/docs/RELEASE_1_2_0.md +0 -51
  1022. package/docs/RELEASE_1_3_0.md +0 -15
  1023. package/docs/RELEASE_1_4_0.md +0 -23
  1024. package/docs/RELEASE_1_5_0.md +0 -105
  1025. package/docs/RELEASE_AUDIT.md +0 -39
  1026. package/docs/SCENE_RADIANCE_AND_ILLUMINATION.md +0 -298
  1027. package/docs/SCENE_SENSOR_QUADRATURE.md +0 -98
  1028. package/docs/SCENE_SENSOR_TEMPORAL_EXPOSURE.md +0 -86
  1029. package/docs/SCIENTIFIC_ASSURANCE.md +0 -280
  1030. package/docs/SCIENTIFIC_CONFORMANCE.md +0 -83
  1031. package/docs/SDR_RENDERING.md +0 -33
  1032. package/docs/SENSOR_APERTURE_RAYS.md +0 -23
  1033. package/docs/SENSOR_ENVIRONMENT_QUERY.md +0 -86
  1034. package/docs/SENSOR_EQE_LOCAL_EXPOSURE.md +0 -104
  1035. package/docs/SENSOR_EQE_TEMPORAL_EXPOSURE.md +0 -74
  1036. package/docs/SENSOR_PSF_QUADRATURE.md +0 -90
  1037. package/docs/SENSOR_RAW_FRAME.md +0 -20
  1038. package/docs/SENSOR_RAW_PRODUCER.md +0 -77
  1039. package/docs/SEPARABLE_EMISSION_DRAFT.md +0 -103
  1040. package/docs/SIGNAL_CONFORMANCE.md +0 -23
  1041. package/docs/SIMULATED_CAPTURE.md +0 -65
  1042. package/docs/STABILIZATION.md +0 -234
  1043. package/docs/TEMPORAL_PHOTO_RAW.md +0 -83
  1044. package/docs/TIER_ACCEPTANCE.md +0 -129
  1045. package/docs/TIER_PRESET_ACCEPTANCE.md +0 -59
  1046. package/docs/V1_COMPOSITION_MAP.md +0 -123
  1047. package/docs/V1_HELPER_REUSE_REVIEW.md +0 -60
  1048. package/docs/V1_PERFORMANCE_DISPOSITION.md +0 -88
  1049. package/docs/benchmarks/2026-10-01-main-baseline.json +0 -694
  1050. package/docs/benchmarks/2026-10-02-geometric-preparation-reuse.json +0 -2190
  1051. package/docs/benchmarks/2026-10-02-poc-projection-reuse.json +0 -2423
  1052. package/docs/benchmarks/2026-10-02-v1-environment-gc-profile.json +0 -210
  1053. package/docs/benchmarks/2026-10-02-v1-environment-ordinary.json +0 -187
  1054. package/docs/benchmarks/2026-10-02-v1-geometry-gc-profile.json +0 -756
  1055. package/docs/benchmarks/2026-10-02-v1-geometry-ordinary-1.json +0 -711
  1056. package/docs/benchmarks/2026-10-02-v1-geometry-ordinary-2.json +0 -711
  1057. package/docs/benchmarks/2026-10-02-v1-poc-gc-profile.json +0 -885
  1058. package/docs/benchmarks/2026-10-02-v1-poc-ordinary-1.json +0 -868
  1059. package/docs/benchmarks/2026-10-02-v1-poc-ordinary-2.json +0 -868
  1060. package/docs/licenses/castleCSF-MIT.txt +0 -21
  1061. package/docs/validation/dense-pupil-2026-10-06/pilot.jsonl +0 -6
  1062. package/docs/validation/documentation-fragments.json +0 -212
  1063. package/docs/validation/native-capture-sdr-darwin-arm64-node26-review.jsonl +0 -4
  1064. package/docs/validation/native-capture-sdr-darwin-arm64.jsonl +0 -3
  1065. package/docs/validation/native-raw-print-2026-10-04/fractional-asymmetric-crop.jpg +0 -0
  1066. package/docs/validation/native-raw-print-2026-10-04/gray-ramp.jpg +0 -0
  1067. package/docs/validation/native-raw-print-2026-10-04/linear-area-checker.jpg +0 -0
  1068. package/docs/validation/native-raw-print-2026-10-04/manifest.json +0 -218
  1069. package/docs/validation/native-raw-print-2026-10-04/megapixel-native.jpg +0 -0
  1070. package/docs/validation/native-raw-print-2026-10-04/native-color.jpg +0 -0
  1071. package/docs/validation/native-raw-print-2026-10-04/photivra-native-full-megapixel-validation.json +0 -9
  1072. package/docs/validation/native-raw-print-2026-10-04/photivra-native-full-megapixel.json +0 -29
  1073. package/docs/validation/native-raw-print-2026-10-04/photivra-native-full-megapixel.json.codes.u16le.gz +0 -0
  1074. package/docs/validation/native-raw-print-2026-10-04/photivra-native-full-megapixel.json.jpg +0 -0
  1075. package/docs/validation/native-raw-print-2026-10-04/photivra-native-full-megapixel.json.rgb.gz +0 -0
  1076. package/docs/validation/native-raw-print-2026-10-04/srgb.icc +0 -0
  1077. package/docs/validation/native-raw-print-2026-10-04/validation.json +0 -41
  1078. package/docs/validation/print-196-candidate-capabilities.json +0 -28
  1079. package/docs/validation/print-196-candidate-evidence.json +0 -356
  1080. package/docs/validation/print-196-engine-acceptance.json +0 -81
  1081. package/docs/validation/print-detail-capabilities.json +0 -103
  1082. package/docs/validation/print-detail-jpeg-evidence.json +0 -116
  1083. package/docs/validation/print-detail-sdr-evidence.json +0 -81
  1084. package/docs/validation/release-audit-inventory.json +0 -1306
  1085. package/docs/validation/tier-acceptance-report-v1.json +0 -2538
@@ -1 +1 @@
1
- {"version":3,"file":"photographic-export.js","sourceRoot":"","sources":["../../src/capture/photographic-export.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC;;;;;;;GAOG;AACH,+DAA+D;AAE/D,OAAO,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAE/F,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAA2B,MAAM,gCAAgC,CAAC;AAC5F,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B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AC,CAAC,IAAI,KAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,SAAS,KAAG,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,KAAK,KAAG,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;YAAC,YAAY,GAAC,IAAI,CAAC;YAAC,MAAM;QAAC,CAAC;QACrI,MAAM,IAAI,GAAC,UAAU,GAAC,CAAC,CAAC,KAAK,CAAC;QAC9B,YAAY,CAAC,IAAI,CAAC,CAAC,GAAC,CAAC,CAAC,CAAC,IAAI,GAAC,IAAI,CAAC,EAAC,CAAC,CAAC,CAAC,SAAS,GAAC,CAAC,CAAC,SAAS,GAAC,CAAC,CAAC,CAAC,IAAI,GAAC,CAAC,CAAC,IAAI,CAAC,GAAC,CAAC,GAAC,EAAE,CAAC,GAAC,CAAC,IAAI,GAAC,IAAI,CAAC,CAAC,CAAC;IAChG,CAAC;IACD,OAAO,EAAC,KAAK,EAAC,UAAU,EAAC,UAAU,EAAC,YAAY,EAAC,CAAC;AACpD,CAAC","sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\n/**\n * Paired photographic export: writes one simulated RAW capture as a lossless DNG and, from the same RAW,\n * develops and writes a baseline JPEG.\n *\n * The JPEG path reconstructs colour from the CFA (colour filter array) mosaic, applies an approximate\n * camera colour profile and white balance (WB), optional lens correction, orientation and crop, and SDR\n * rendering. The DNG keeps the native RAW codes unchanged.\n * @see docs/PHOTOGRAPHIC_EXPORT.md for equations, coordinate/unit conventions, blockers and support\n * limits.\n */\n// This product includes DNG technology under license by Adobe.\n\nimport { requireAllowlistedRecord, requirePublicOpaqueId } from \"../core/record-validation.js\";\n\nimport { stringifyCanonicalJson } from \"../core/canonical-json.js\";\nimport { InvalidConfigurationError } from \"../core/configuration-error.js\";\nimport { parseEvidenceList, type EvidenceProvenance } from \"../core/evidence-provenance.js\";\nimport { LINEAR_CAPTURE_RGB_PROFILE, resolveCaptureColorModel } from \"../color/capture-color.js\";\nimport { invertSensorColorMatrix, prepareSensorColorDevelopment, sensorColorReferenceWhite, type RawHighlightMode } from \"../color/sensor-color-development.js\";\nimport { ICC_D50_WHITE_XYZ } from \"../color/srgb-icc.js\";\nimport { chromaticAdaptationMatrix } from \"../color/chromatic-adaptation.js\";\nimport { createRawPixelDeveloper, type RawDevelopmentSource } from \"./raw-development-kernel.js\";\nimport type { RawHighlightDiagnostics } from \"./native-raw-development.js\";\nimport { calculateSdrRendering, parseSdrRenderingProfile, type SdrRenderingProfile, type SdrRenderingResult } from \"../output/sdr-rendering.js\";\nimport { transformOrientedRasterPointToNative, transformOrientedRasterRectToNative, type RasterRect } from \"../output/capture-geometry.js\";\nimport { resolveRawFrameReconstruction, parseRawFrameReconstructionInput, type RawFrameReconstructionInput, type RawFrameReconstruction } from \"./raw-frame-reconstruction.js\";\nimport { createCaptureExportMetadataPair, type CaptureExportMetadataInput, type CaptureExportMetadataPair } from \"./capture-export-metadata.js\";\nimport { encodeExportJpeg } from \"./export-jpeg.js\";\nimport { packExportTiff, exportTiffAscii as ascii, exportTiffNumbers as numbers, exportTiffRationals as rationals,\n exportTiffBytes as rawBytes, exportTiffDoubles as doubles, packExportJpegExif, type ExportTiffTag } from \"./export-tiff.js\";\nimport { calculateCaptureCorrectedSdr, parseCaptureCorrectionChoice,\n type CaptureCorrectedSdrInput, type CaptureCorrectedSdrResult } from \"../output/capture-corrected-sdr.js\";\nimport { resolveLensCorrectionPlan, type ResolvedLensCorrectionPlan } from \"../output/lens-corrections.js\";\nimport { parseSimulatedCapture } from \"./simulated-capture.js\";\nimport { approximationResult, type CalculationResult } from \"../core/calculation-result.js\";\n\nexport const PHOTOGRAPHIC_EXPORT_SCHEMA_VERSION = \"0.1.0\" as const;\n/**\n * Version of the RAW and processed pipeline, recorded in XMP.\n *\n * 0.2.0: development scales to the effective white level, handles saturation, and fixes WB for colour\n * matrices that are not white-normalized. DNG output fixes WhiteLevel, AsShotNeutral and BlackLevel/CFA\n * phase, and adds the DNG 1.4 tags ForwardMatrix1, BaselineExposure, NoiseProfile and AnalogBalance.\n */\nexport const PHOTOGRAPHIC_EXPORT_PIPELINE_VERSION = \"0.2.0\" as const;\n/** Version of the `processed-sensor-raw-sdr` model (0.2.0: scaling to effective white, saturation and WB fixes). */\nexport const PROCESSED_SENSOR_RAW_MODEL_VERSION = \"0.2.0\" as const;\ntype Matrix = readonly (readonly number[])[];\n/** Explicit, approximate conversion from normalized camera channels to scene XYZ (D65). Never guessed from RGB or CFA channel names. */\nexport interface ExportSensorColorProfile {\n schemaVersion: \"0.1.0\";\n profileId: string;\n profileVersion: string;\n colorSamplingProfileId: string;\n channelIds: readonly [\"red\", \"green\", \"blue\"];\n scientificStatus: \"approximation\";\n referenceIlluminant: \"D65\";\n normalizedCameraChannelsToXyz: Matrix;\n evidence: readonly EvidenceProvenance[];\n limitations: readonly string[];\n}\n/** Optional export settings. The engine uses no files, clocks, randomness, network or external encoder. */\nexport interface PhotographicExportInput {\n reconstruction: RawFrameReconstructionInput;\n colorProfile: ExportSensorColorProfile;\n whiteBalance: \"not-required\" | \"apply-resolved-sensor-gains\";\n rendering: SdrRenderingProfile;\n metadata: Omit<CaptureExportMetadataInput, \"capture\">;\n /** Public scene ID and version declared by the caller. They must match the committed scene state. */\n sceneProfile: { id: string; version: string; sceneStateId: string };\n /** JPEG constant quantization step, 1..255. It is not an imitation of a manufacturer's \"quality\" scale. */\n jpegQuantizationStep: number;\n /** Optional lens correction in native optical coordinates, applied after colour. JPEG only; the RAW records it as information. */\n correction?: CaptureCorrectedSdrInput[\"correction\"];\n /** How RAW highlights are handled before WB; default `clip`. See `prepareSensorColorDevelopment`. */\n highlightMode?: RawHighlightMode;\n}\n/** Options for {@link createPhotographicExportPair}. */\nexport interface PhotographicExportOptions {\n /** Aborting rejects with a domain error at the next step. No partial pair is returned. */\n signal?: AbortSignal;\n}\n/** Explicit RAW development settings (after the ADC), shared by the preview and the file output. */\nexport type ProcessedSensorRawInput = Pick<PhotographicExportInput,\n \"reconstruction\" | \"colorProfile\" | \"whiteBalance\" | \"rendering\" | \"correction\" | \"highlightMode\">;\n/**\n * Processing record for the preview and JPEG, derived from the exact attached native RAW.\n *\n * Each step (reconstruction, colour, WB, correction, rendering) reports its input and output domains and\n * its own clipping and cost diagnostics. The output view is oriented and cropped SDR. The native default\n * crop and the physical capture history are unchanged. The returned arrays are the pixels before file\n * encoding, not a decoded (lossy) JPEG.\n */\nexport interface ProcessedSensorRawResult {\n inputDomain: \"post-adc-native-sensor-raw\";\n colorProfile: ExportSensorColorProfile;\n whiteBalancePolicy: ProcessedSensorRawInput[\"whiteBalance\"];\n outputDomain: \"output-referred-srgb-d65-sdr\";\n physicalCaptureModified: false;\n displayAdaptationApplied: false;\n whiteBalance: \"applied-here\" | \"not-required\";\n source: CalculationResult<RawFrameReconstruction>;\n rendering: CalculationResult<SdrRenderingResult>;\n nativeDefaultCrop: RasterRect;\n processedOutputView: PhotographicExportPair[\"processedOutputView\"];\n correction: CalculationResult<CaptureCorrectedSdrResult> | null;\n rawCorrectionIntent: CalculationResult<ResolvedLensCorrectionPlan> | null;\n /** RAW saturation handled before WB, over the developed image. */\n highlight: RawHighlightDiagnostics;\n}\n/** The byte arrays belong to the caller and can be changed. IDs and hashes refer to the exact bytes as first returned. */\nexport interface PhotographicExportPair {\n schemaVersion: typeof PHOTOGRAPHIC_EXPORT_SCHEMA_VERSION;\n metadata: CaptureExportMetadataPair;\n simulationHashAlgorithm: \"sha-256\";\n simulationHash: string;\n rawDataUniqueId: string;\n uniqueCameraModel: string;\n source: CalculationResult<RawFrameReconstruction>;\n rendering: CalculationResult<SdrRenderingResult>;\n nativeDefaultCrop: RasterRect;\n /** The JPEG's rectangle in the oriented output. It never replaces the RAW's default crop. */\n processedOutputView: { rect: RasterRect; pixelWidth: number; pixelHeight: number };\n correction: CalculationResult<CaptureCorrectedSdrResult> | null;\n rawCorrectionIntent: CalculationResult<ResolvedLensCorrectionPlan> | null;\n /** RAW saturation handled before WB in the JPEG development. */\n highlight: RawHighlightDiagnostics;\n imageDataPairing: \"jpeg-generated-from-exact-attached-raw\";\n dng: { mediaType: \"image/dng\"; bytes: Uint8Array; sha256: string };\n jpeg: { mediaType: \"image/jpeg\"; bytes: Uint8Array; sha256: string };\n interoperability: \"independent-decode-required-editor-validation-pending\";\n}\nfunction object(value: unknown, keys: readonly string[]): Record<string, unknown> {\n return requireAllowlistedRecord(value, keys, \"Invalid photographic export fields.\");\n}\nfunction id(value: unknown): string {\n return requirePublicOpaqueId(value, \"Invalid public export profile identity.\");\n}\n/** Validates the separately supplied numeric colour-profile evidence, and ties the approximate profile to the exact CFA profile. */\nexport function parseExportSensorColorProfile(value: unknown): ExportSensorColorProfile {\n const r=object(value,[\"schemaVersion\",\"profileId\",\"profileVersion\",\"colorSamplingProfileId\",\"channelIds\",\"scientificStatus\",\"referenceIlluminant\",\"normalizedCameraChannelsToXyz\",\"evidence\",\"limitations\"]);\n const m=r.normalizedCameraChannelsToXyz;\n if (r.schemaVersion!==\"0.1.0\" || r.scientificStatus!==\"approximation\" || r.referenceIlluminant!==\"D65\" || JSON.stringify(r.channelIds)!=='[\"red\",\"green\",\"blue\"]' ||\n !Array.isArray(m) || m.length!==3 || m.some((row) => !Array.isArray(row) || row.length!==3 || Array.from(row).some((v) => typeof v!==\"number\" || !Number.isFinite(v) || Math.abs(v)>100)) ||\n !Array.isArray(r.limitations) || r.limitations.length===0 || r.limitations.length>16 || Array.from(r.limitations).some((s) => typeof s!==\"string\" || s.length===0 || s.length>512)) throw new InvalidConfigurationError(\"Unsupported sensor color interpretation.\");\n const matrix=(m as number[][]).map((row) => [...row]); invertSensorColorMatrix(matrix);\n const evidence=parseEvidenceList(r.evidence,\"exportColor.evidence\");\n if (evidence.some((e) => e.reuseStatus===\"factual-reference-only\")) throw new InvalidConfigurationError(\"Embedded numeric color profiles require reusable or owned evidence.\");\n return { schemaVersion:\"0.1.0\",profileId:id(r.profileId),profileVersion:id(r.profileVersion),colorSamplingProfileId:id(r.colorSamplingProfileId),\n channelIds:[\"red\",\"green\",\"blue\"],scientificStatus:\"approximation\",referenceIlluminant:\"D65\",normalizedCameraChannelsToXyz:matrix,evidence,limitations:[...r.limitations] as string[] };\n}\n/** Quick geometry and layout checks, run after the RAW is revalidated and before any pixel work. */\nexport function validateProcessedSensorRawEnvelope(reconstruction: Pick<RawFrameReconstructionInput, \"region\"> & { rawFrame: Pick<RawFrameReconstructionInput[\"rawFrame\"], \"capture\"> }, corrected: boolean): { local: RasterRect; nativeDefaultCrop: RasterRect } {\n const frame=reconstruction.rawFrame, capture=frame.capture, g=capture.resolvedGeometry,\n active=g.activeCapture.nativeRect, crop=g.output.cropRect, raster=g.output.raster, region=reconstruction.region;\n if (raster.pixelWidth!==crop.width || raster.pixelHeight!==crop.height) throw new InvalidConfigurationError(\"Initial paired export requires 1:1 output crop sampling; resampling is unsupported.\");\n const local=transformOrientedRasterRectToNative({ rect:crop,nativeRaster:g.activeCapture.raster,orientation:capture.geometry.orientation });\n const nativeDefaultCrop={ ...local,x:local.x+active.x,y:local.y+active.y };\n if (nativeDefaultCrop.x<region.x || nativeDefaultCrop.y<region.y || nativeDefaultCrop.x+nativeDefaultCrop.width>region.x+region.width ||\n nativeDefaultCrop.y+nativeDefaultCrop.height>region.y+region.height) throw new InvalidConfigurationError(\"Reconstruction does not cover the exact declared final native crop.\");\n if (corrected && (active.x<region.x || active.y<region.y || active.x+active.width>region.x+region.width ||\n active.y+active.height>region.y+region.height)) throw new InvalidConfigurationError(\"Corrected export requires reconstruction of the full active native RAW area.\");\n return {local,nativeDefaultCrop};\n}\nfunction requireDngTopology(frame: RawFrameReconstructionInput[\"rawFrame\"]): void {\n const layout=frame.colorSamplingProfile.layout;\n if (layout.kind!==\"periodic-mosaic\" || layout.repeatWidthSites!==2 || layout.repeatHeightSites!==2 || ![\"red\",\"green\",\"green\",\"blue\"].every((ch) => layout.siteChannelIds.includes(ch)) ||\n layout.siteChannelIds.filter((ch) => ch===\"red\").length!==1 || layout.siteChannelIds.filter((ch) => ch===\"blue\").length!==1 ||\n layout.siteChannelIds.filter((ch) => ch===\"green\").length!==2) throw new InvalidConfigurationError(\"Initial DNG profile supports explicitly registered 2x2 RGB Bayer topology only.\");\n}\n/**\n * Revalidates one attached RAW snapshot and the explicit processing settings.\n *\n * Crop sampling and reconstruction coverage problems fail here, before per-pixel work. Passing this\n * check does not prove kernel support at the edges, correction support or that the file can be encoded;\n * those are still checked during execution. The input is copied. No file or display code runs.\n */\nexport function parseProcessedSensorRawInput(value: unknown): ProcessedSensorRawInput {\n const r=object(value,[\"reconstruction\",\"colorProfile\",\"whiteBalance\",\"rendering\",\"correction\",\"highlightMode\"]);\n if (r.highlightMode!==undefined && r.highlightMode!==\"clip\" && r.highlightMode!==\"reconstruct\") throw new InvalidConfigurationError(\"Unsupported RAW highlight mode.\");\n const reconstruction=parseRawFrameReconstructionInput(r.reconstruction), colorProfile=parseExportSensorColorProfile(r.colorProfile), rendering=parseSdrRenderingProfile(r.rendering);\n const intent=reconstruction.rawFrame.capture.whiteBalanceIntent;\n if (colorProfile.colorSamplingProfileId!==reconstruction.rawFrame.colorSamplingProfile.profileId ||\n reconstruction.phaseProfiles.some((p) => JSON.stringify(p.profile.kernels.map((k) => k.outputChannelId))!==JSON.stringify(colorProfile.channelIds)) ||\n (r.whiteBalance!==\"not-required\" && r.whiteBalance!==\"apply-resolved-sensor-gains\") ||\n ((r.whiteBalance===\"not-required\") !== (intent===null))) throw new InvalidConfigurationError(\"Processed RAW color/WB/rendering identities are inconsistent.\");\n const correction=r.correction===undefined ? undefined : parseCaptureCorrectionChoice(r.correction,\n reconstruction.rawFrame.capture,[\"photivra-export-developed\"]);\n if (correction?.resampler.antialias!==undefined && correction.resampler.antialias!==\"none\") {\n throw new InvalidConfigurationError(\"RAW-derived processing has no source prefilter; prefiltered declarations are unsupported.\");\n }\n validateProcessedSensorRawEnvelope(reconstruction,correction!==undefined);\n return { reconstruction,colorProfile,whiteBalance:r.whiteBalance,rendering,...(correction===undefined ? {} : {correction}),\n ...(r.highlightMode===undefined ? {} : {highlightMode:r.highlightMode}) };\n}\n/** Adds file metadata and encoding checks to the shared RAW processing settings. */\nexport function parsePhotographicExportInput(value: unknown): PhotographicExportInput {\n const r=object(value,[\"reconstruction\",\"colorProfile\",\"whiteBalance\",\"rendering\",\"metadata\",\"sceneProfile\",\"jpegQuantizationStep\",\"correction\",\"highlightMode\"]);\n const processed=parseProcessedSensorRawInput({reconstruction:r.reconstruction,colorProfile:r.colorProfile,whiteBalance:r.whiteBalance,rendering:r.rendering,\n ...(r.correction===undefined ? {} : {correction:r.correction}),...(r.highlightMode===undefined ? {} : {highlightMode:r.highlightMode})});\n requireDngTopology(processed.reconstruction.rawFrame);\n if (processed.rendering.bitDepth!==8) throw new InvalidConfigurationError(\"Initial JPEG export requires 8-bit SDR.\");\n const meta=object(r.metadata,[\"workflow\",\"capturedAtUtc\",\"raw\",\"jpeg\"]);\n const metadata=createCaptureExportMetadataPair({ ...meta, capture:processed.reconstruction.rawFrame.capture } as unknown as CaptureExportMetadataInput);\n const scene=object(r.sceneProfile,[\"id\",\"version\",\"sceneStateId\"]), sceneProfile={id:id(scene.id),version:id(scene.version),sceneStateId:id(scene.sceneStateId)};\n if (sceneProfile.sceneStateId!==processed.reconstruction.rawFrame.capture.sceneStateId || !Number.isInteger(r.jpegQuantizationStep) ||\n (r.jpegQuantizationStep as number)<1 || (r.jpegQuantizationStep as number)>255) throw new InvalidConfigurationError(\"Export scene identity or encoder settings are inconsistent.\");\n return { ...processed,sceneProfile,metadata:{ workflow:metadata.shared.workflow,capturedAtUtc:metadata.shared.capturedAtUtc,\n raw:{ documentId:metadata.raw.documentId,instanceId:metadata.raw.instanceId }, jpeg:{ documentId:metadata.jpeg.documentId,instanceId:metadata.jpeg.instanceId } },\n jpegQuantizationStep:r.jpegQuantizationStep as number };\n}\nfunction canonical(value: unknown): string {\n return stringifyCanonicalJson(value, {\n undefinedObjectProperties: \"reject\",\n nonFiniteNumberMessage: \"Export hash requires finite canonical JSON.\",\n unsupportedValueMessage: \"Export hash requires finite canonical JSON.\"\n });\n}\n\nfunction requireWebCrypto(): void {\n if (!globalThis.crypto?.subtle) throw new InvalidConfigurationError(\"Paired export requires Web Crypto SHA-256 (crypto.subtle). Browsers expose it only in secure contexts (HTTPS or localhost); Node.js 22+ provides it globally.\");\n}\nasync function hash(value: Uint8Array | string): Promise<string> {\n requireWebCrypto();\n const data=typeof value===\"string\" ? new TextEncoder().encode(value) : new Uint8Array(value);\n const result=await globalThis.crypto.subtle.digest(\"SHA-256\",data);\n return Array.from(new Uint8Array(result),(v) => v.toString(16).padStart(2,\"0\")).join(\"\");\n}\nfunction xmp(pair: CaptureExportMetadataPair, role: \"raw\" | \"jpeg\", simulationHash: string, color: ExportSensorColorProfile, mode: string, scene: PhotographicExportInput[\"sceneProfile\"], corrected?: { choice: NonNullable<PhotographicExportInput[\"correction\"]>; rect: RasterRect; clippingEvents: number }): Uint8Array {\n const s=pair.shared, artifact=pair[role];\n const values: Record<string,string>={ \"xmp:CreatorTool\":s.creatorTool,\"xmpMM:DocumentID\":\"uuid:\"+artifact.documentId,\"xmpMM:InstanceID\":\"uuid:\"+artifact.instanceId,\n \"Iptc4xmpExt:DigitalImageGUID\":\"urn:uuid:\"+artifact.documentId,\"Iptc4xmpExt:DigitalSourceType\":s.digitalSourceTypeUri,\n \"photivra:SchemaVersion\":\"1.0\",\"photivra:SimulatedCapture\":\"True\",\"photivra:CaptureID\":s.captureId,\"photivra:OutputRole\":role,\n \"photivra:EngineVersion\":s.engineApiVersion,\"photivra:CaptureContractVersion\":s.captureContractVersion,\"photivra:RawPipelineVersion\":PHOTOGRAPHIC_EXPORT_PIPELINE_VERSION,\n \"photivra:SceneID\":scene.id,\"photivra:SceneVersion\":scene.version,\"photivra:SensorProfileID\":color.profileId,\"photivra:CaptureMode\":mode,\"photivra:RawSampleModel\":\"post_adc_pre_demosaic\",\n \"photivra:DeterministicSeed\":String(s.noise.seedUint32),\"photivra:SimulationHashAlgorithm\":\"sha-256\",\"photivra:SimulationHash\":simulationHash,\n \"photivra:SceneTime\":String(s.sceneTimeSeconds) };\n if (corrected) {\n values[\"photivra:CorrectionProfileID\"]=corrected.choice.profile.id;\n values[\"photivra:CorrectionProfileVersion\"]=corrected.choice.profile.version;\n values[\"photivra:CorrectionSelectionKind\"]=corrected.choice.selectionKind;\n values[\"photivra:CorrectionSelections\"]=canonical(corrected.choice.selections);\n values[\"photivra:CorrectionDisposition\"]=role===\"raw\" ? \"informational-intent-only\" : \"processed-view\";\n values[\"photivra:ProcessedOutputRect\"]=canonical(corrected.rect);\n values[\"photivra:ProcessedIlluminationClippingEvents\"]=String(corrected.clippingEvents);\n }\n if (role===\"jpeg\") values[\"photivra:ProcessedPipelineVersion\"]=PHOTOGRAPHIC_EXPORT_PIPELINE_VERSION;\n if (s.focus.kind===\"finite\") values[\"photivra:FocusDistanceMeters\"]=String(s.focus.distanceM);\n const escape=(v: string): string => v.replaceAll(\"&\",\"&amp;\").replaceAll('\"',\"&quot;\").replaceAll(\"<\",\"&lt;\").replaceAll(\">\",\"&gt;\");\n const attributes=Object.entries(values).map(([k,v]) => k+'=\"'+escape(v)+'\"').join(\" \");\n return new TextEncoder().encode('<x:xmpmeta xmlns:x=\"adobe:ns:meta/\"><rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"><rdf:Description rdf:about=\"\" xmlns:xmp=\"http://ns.adobe.com/xap/1.0/\" xmlns:xmpMM=\"http://ns.adobe.com/xap/1.0/mm/\" xmlns:Iptc4xmpExt=\"http://iptc.org/std/Iptc4xmpExt/2008-02-29/\" xmlns:photivra=\"https://photivra.com/ns/simulation/1.0/\" '+attributes+'/></rdf:RDF></x:xmpmeta>');\n}\nfunction commonExif(pair: CaptureExportMetadataPair, role: \"raw\" | \"jpeg\", width: number, height: number): ExportTiffTag[] {\n const s=pair.shared,e=s.exposure;\n if (!Number.isInteger(e.iso) || e.iso>65535) throw new InvalidConfigurationError(\"Initial export records only integer virtual REI values up to 65535.\");\n const date=s.capturedAtUtc.slice(0,19).replaceAll(\"-\",\":\").replace(\"T\",\" \");\n return [rawBytes(36864,7,new TextEncoder().encode(\"0232\")),rationals(33434,false,[e.shutterSeconds]),rationals(33437,false,[e.aperture]),\n numbers(34855,3,[e.iso]),numbers(34864,3,[2]),numbers(34866,4,[e.iso]),ascii(36867,date),ascii(36881,\"+00:00\"),ascii(37521,s.capturedAtUtc.slice(20,23)),\n rationals(37386,false,[e.focalLengthMm]),numbers(40962,4,[width]),numbers(40963,4,[height]),numbers(40961,3,[role===\"jpeg\" ? 1 : 65535]),\n ascii(42016,pair[role].documentId.replaceAll(\"-\",\"\")),\n ...(Math.round(s.equivalentFocalLength35Mm)<=65535 ? [numbers(41989,3,[Math.round(s.equivalentFocalLength35Mm)])] : [])];\n}\nfunction identity(pair: CaptureExportMetadataPair, orientation: number): ExportTiffTag[] {\n return [ascii(271,pair.shared.make),ascii(272,pair.shared.model),ascii(305,pair.shared.software),numbers(274,3,[orientation])];\n}\nfunction developmentFor(color: ExportSensorColorProfile, intent: ProcessedSensorRawInput[\"reconstruction\"][\"rawFrame\"][\"capture\"][\"whiteBalanceIntent\"],\n highlightMode: RawHighlightMode): ReturnType<typeof prepareSensorColorDevelopment> {\n return prepareSensorColorDevelopment(color.normalizedCameraChannelsToXyz,\n intent ? [intent.channelGains.red,intent.channelGains.green,intent.channelGains.blue] : null, highlightMode);\n}\n/** Typed-array view of a bounded attached RAW frame. The frame parser guarantees one white level per CFA phase. */\nfunction frameDevelopmentSource(frame: RawFrameReconstruction[\"rawFrame\"]): RawDevelopmentSource {\n const layout=frame.colorSamplingProfile.layout;\n if (layout.kind!==\"periodic-mosaic\") throw new InvalidConfigurationError(\"Development requires periodic CFA.\");\n const n=frame.samples.length, codes=new Uint16Array(n), blacks=new Uint16Array(n), flags=new Uint8Array(n),\n white=new Uint16Array(layout.repeatWidthSites*layout.repeatHeightSites);\n frame.samples.forEach((s,i) => {\n const x=i%frame.nativePixelWidth, y=Math.floor(i/frame.nativePixelWidth);\n codes[i]=s.rawCode; blacks[i]=s.blackLevelCode;\n flags[i]=Number(s.physicalScalarSaturationApplied)|Number(s.digitalSaturationApplied)<<2;\n white[(y%layout.repeatHeightSites)*layout.repeatWidthSites+x%layout.repeatWidthSites]=s.effectiveSaturationCode;\n });\n return {nativeWidth:frame.nativePixelWidth,repeatWidth:layout.repeatWidthSites,repeatHeight:layout.repeatHeightSites,codes,blackLevels:blacks,saturationFlags:flags,whiteByPhase:white};\n}\n/** Reconstructs the exact attached RAW, develops colour and WB once, corrects, orients and crops, and encodes SDR. No file or display I/O. */\nexport function calculateProcessedSensorRaw(input: ProcessedSensorRawInput): CalculationResult<ProcessedSensorRawResult> {\n const v=structuredClone(parseProcessedSensorRawInput(input));\n const source=resolveRawFrameReconstruction(v.reconstruction), frame=source.value.rawFrame, capture=frame.capture,\n g=capture.resolvedGeometry,\n active=g.activeCapture.nativeRect,crop=g.output.cropRect, raster=g.output.raster, region=source.value.region;\n const {nativeDefaultCrop}=validateProcessedSensorRawEnvelope(v.reconstruction,v.correction!==undefined);\n const intent=capture.whiteBalanceIntent, highlightMode=v.highlightMode ?? \"clip\";\n const development=developmentFor(v.colorProfile,intent,highlightMode), white=development.referenceWhiteXyz;\n const developedRaster=v.correction ? g.orientedCapture.raster : raster,\n developedRect=v.correction ? {x:0,y:0,width:developedRaster.pixelWidth,height:developedRaster.pixelHeight} : crop;\n // The attached RAW codes go through the shared typed kernel: effective white per phase, saturation handled before WB.\n // Reconstruction (above) already validated every kernel halo for the region, which covers this raster.\n const developer=createRawPixelDeveloper(frameDevelopmentSource(frame),source.value.phaseProfiles,development);\n const rgb: number[]=new Array<number>(developedRaster.pixelWidth*developedRaster.pixelHeight*3).fill(0);\n for (let y=0;y<developedRaster.pixelHeight;y++) for (let x=0;x<developedRaster.pixelWidth;x++) {\n const p=transformOrientedRasterPointToNative({ point:{x:developedRect.x+x+.5,y:developedRect.y+y+.5},nativeRaster:g.activeCapture.raster,orientation:capture.geometry.orientation });\n const nx=Math.floor(p.x)+active.x, ny=Math.floor(p.y)+active.y;\n if (nx<region.x || ny<region.y || nx>=region.x+region.width || ny>=region.y+region.height) throw new InvalidConfigurationError(\"Reconstruction does not cover the developed raster.\");\n developer.developAt(nx,ny,rgb,(y*developedRaster.pixelWidth+x)*3);\n }\n const highlight: RawHighlightDiagnostics={mode:highlightMode,saturatedPixelCount:developer.counts.saturatedPixelCount,\n whiteBalanceClippedSampleCount:developer.counts.whiteBalanceClippedSampleCount,reconstructedPixelCount:developer.counts.reconstructedPixelCount};\n // This private processing plane comes only from reconstructing the exact attached RAW. The original float planes are dropped.\n const correction=v.correction ? calculateCaptureCorrectedSdr({capture:parseSimulatedCapture({...capture,planes:[{\n id:\"photivra-export-linear\",imageStateId:\"photivra-export-developed\",imageState:\"color-transformed-linear-rgb\",\n rasterBinding:\"oriented-active-capture\",pixelWidth:developedRaster.pixelWidth,pixelHeight:developedRaster.pixelHeight,\n channelIds:[\"red\",\"green\",\"blue\"],colorProfile:LINEAR_CAPTURE_RGB_PROFILE,encodingReferenceWhiteXyz:white,referenceWhiteValue:1,\n whiteBalanceApplication:intent ? \"applied-rgb-gains\" : \"not-applicable\",captureSaturation:{kind:\"not-modeled\"},\n appliedTransforms:[{kind:\"linear-color\",profile:{id:v.colorProfile.profileId,version:v.colorProfile.profileVersion}}],\n storage:{kind:\"inline-float64\",samples:rgb}\n }]}),sourcePlaneId:\"photivra-export-linear\",color:{kind:\"already-transformed\"},profile:v.rendering,correction:v.correction}) : null;\n const rawCorrectionIntent=v.correction ? resolveLensCorrectionPlan({profile:v.correction.profile,state:v.correction.state,\n selections:v.correction.selections,selectionKind:v.correction.selectionKind,outputKind:\"raw-like\"}) : null;\n const processedOutputView=correction ? {rect:correction.value.outputView.rect,pixelWidth:correction.value.outputView.pixelWidth,\n pixelHeight:correction.value.outputView.pixelHeight} : {rect:{x:0,y:0,width:raster.pixelWidth,height:raster.pixelHeight},\n pixelWidth:raster.pixelWidth,pixelHeight:raster.pixelHeight};\n const rendering=correction?.value.rendering ?? calculateSdrRendering({ sourceImageStateId:frame.frameId+\":developed\",inputImageState:\"color-transformed-linear-rgb\",inputColorSpace:\"linear-srgb-d65\",\n whiteBalanceHandling:intent ? \"already-applied-upstream\" : \"not-required\",pixelWidth:raster.pixelWidth,pixelHeight:raster.pixelHeight,referenceWhiteValue:1,samples:rgb,profile:v.rendering });\n return approximationResult({ inputDomain:\"post-adc-native-sensor-raw\",colorProfile:v.colorProfile,whiteBalancePolicy:v.whiteBalance,outputDomain:\"output-referred-srgb-d65-sdr\",physicalCaptureModified:false,\n displayAdaptationApplied:false,whiteBalance:intent ? \"applied-here\" : \"not-required\",source,rendering,nativeDefaultCrop,processedOutputView,correction,rawCorrectionIntent,highlight }, \"processed-sensor-raw-sdr\", PROCESSED_SENSOR_RAW_MODEL_VERSION, [\n \"Exact attached RAW codes are normalized to each CFA phase's effective white level, clipped and saturation-consumed before WB, then developed through explicit approximate sensor color; WB is applied once before correction and SDR.\",\n \"Output is encoded sRGB/D65 SDR; platform viewing adaptation and HDR encoding are not applied.\",\n \"Bounded reference reconstruction, correction support and 1:1 output crop remain explicit; physical capture is unchanged.\"\n ]);\n}\n\n/**\n * Writes one RAW capture as a lossless, uncompressed CFA DNG and a separately encoded baseline JPEG.\n * Shared metadata comes from the committed capture. Orientation, WB and rendering never rewrite the\n * native RAW codes.\n *\n * The DNG keeps one revalidated native RAW frame (after the ADC) unchanged. The JPEG develops that same\n * frame through explicit reconstruction, an approximate sensor-channel colour and WB conversion, and SDR\n * rendering. File identity and RAW data identity are separate. Hashing is asynchronous; input data is\n * copied before the first await. The full sensor is limited to 4096 sites.\n * @param input - The RAW reconstruction input, colour profile, white-balance mode, SDR rendering profile, file metadata and JPEG settings.\n * @returns The DNG and JPEG pair with their processing records. Success does not imply calibration.\n *\n * @see docs/API_REFERENCE.md for the package export and its full type definitions.\n */\nexport async function createPhotographicExportPair(input: PhotographicExportInput, options: PhotographicExportOptions = {}): Promise<PhotographicExportPair> {\n const opts=object(options,[\"signal\"]), signal=opts.signal as AbortSignal | undefined;\n if (signal!==undefined && (typeof signal!==\"object\" || signal===null || typeof signal.aborted!==\"boolean\")) throw new InvalidConfigurationError(\"Export signal must be an AbortSignal.\");\n const active=(): void => { if (signal?.aborted) throw new InvalidConfigurationError(\"Photographic export aborted.\"); };\n // Fail before any work when the context cannot hash (browsers expose crypto.subtle only in secure contexts).\n requireWebCrypto(); active();\n // Copy the validated inputs into private values before the first await, so later caller changes cannot affect hashing or encoding.\n const v=JSON.parse(JSON.stringify(parsePhotographicExportInput(input))) as PhotographicExportInput;\n const highlightMode=v.highlightMode ?? \"clip\";\n const processed=calculateProcessedSensorRaw({reconstruction:v.reconstruction,colorProfile:v.colorProfile,whiteBalance:v.whiteBalance,rendering:v.rendering,\n ...(v.correction===undefined ? {} : {correction:v.correction}),highlightMode}).value;\n const {source,rendering,nativeDefaultCrop,processedOutputView,correction,rawCorrectionIntent,highlight}=processed;\n const frame=source.value.rawFrame,capture=frame.capture,g=capture.resolvedGeometry,activeRect=g.activeCapture.nativeRect,region=source.value.region;\n const metadata=createCaptureExportMetadataPair({...v.metadata,capture});\n const {local}=validateProcessedSensorRawEnvelope(v.reconstruction,v.correction!==undefined);\n const colorMatrix=invertSensorColorMatrix(v.colorProfile.normalizedCameraChannelsToXyz),intent=capture.whiteBalanceIntent;\n const development=developmentFor(v.colorProfile,intent,highlightMode);\n const correctedMetadata=v.correction && correction ? {choice:v.correction,rect:processedOutputView.rect,\n clippingEvents:correction.value.correction.value.illuminationClippingEventCount} : undefined;\n const layout=frame.colorSamplingProfile.layout;\n if (layout.kind!==\"periodic-mosaic\") throw new InvalidConfigurationError(\"Initial DNG profile supports explicitly registered 2x2 RGB Bayer topology only.\");\n const dng=dngLevels(frame,activeRect);\n const simulationHash=await hash(canonical({ schema:PHOTOGRAPHIC_EXPORT_SCHEMA_VERSION,pipeline:PHOTOGRAPHIC_EXPORT_PIPELINE_VERSION,rawFrame:frame,phaseProfiles:source.value.phaseProfiles,region,\n colorProfile:v.colorProfile,sceneProfile:v.sceneProfile,whiteBalance:v.whiteBalance,rendering:v.rendering,jpegQuantizationStep:v.jpegQuantizationStep,highlightMode,\n ...(v.correction ? {correction:v.correction} : {}) }));\n active();\n const rawHash=await hash(canonical({ schema:\"photivra-raw-data-id-0.1\",width:frame.nativePixelWidth,height:frame.nativePixelHeight,\n cfa:layout,containerBitDepth:16,codes:frame.samples.map((s) => s.rawCode) })),rawDataUniqueId=rawHash.slice(0,32);\n active();\n const colorHash=await hash(canonical(v.colorProfile)),uniqueCameraModel=\"Photivra Virtual Camera \"+v.colorProfile.profileId+\" \"+v.colorProfile.profileVersion+\" \"+colorHash;\n active();\n const orientation={landscape:1,\"portrait-clockwise\":6,\"landscape-inverted\":3,\"portrait-counter-clockwise\":8}[capture.geometry.orientation];\n const pixels=new Uint8Array(frame.samples.length*2), view=new DataView(pixels.buffer); frame.samples.forEach((s,i) => view.setUint16(i*2,s.rawCode,true));\n const strip={...numbers(273,4,[0]),pointer:\"pixels\" as const};\n // ForwardMatrix1 maps white-balanced camera values to XYZ(D50) with [1,1,1] -> D50 white:\n // FM = Bradford(D65->D50) * M * diag(w), w = M^-1 * XYZ(D65) (unnormalized camera white).\n const cameraWhite=sensorColorReferenceWhite(colorMatrix), m=v.colorProfile.normalizedCameraChannelsToXyz, chad=chromaticAdaptationMatrix({transform:\"bradford\",sourceWhiteXyz:resolveCaptureColorModel().referenceWhiteXyz,destinationWhiteXyz:{x:ICC_D50_WHITE_XYZ[0],y:1,z:ICC_D50_WHITE_XYZ[2]}}).matrix;\n const forward=chad.map((row) => [0,1,2].map((j) => row.reduce((sum,x,k) => sum+x*m[k]![j]!*cameraWhite[j]!,0)));\n const dngBytes=packExportTiff([...identity(metadata,orientation),numbers(254,4,[0]),numbers(256,4,[frame.nativePixelWidth]),numbers(257,4,[frame.nativePixelHeight]),\n numbers(258,3,[16]),numbers(259,3,[1]),numbers(262,3,[32803]),strip,numbers(277,3,[1]),numbers(278,4,[frame.nativePixelHeight]),numbers(279,4,[pixels.length]),\n numbers(284,3,[1]),numbers(339,3,[1]),numbers(33421,3,[2,2]),numbers(33422,1,dng.cfaPattern),\n numbers(50706,1,[1,4,0,0]),numbers(50707,1,[1,1,0,0]),ascii(50708,uniqueCameraModel),numbers(50710,1,[0,1,2]),numbers(50711,3,[1]),numbers(50713,3,[2,2]),\n rationals(50714,false,dng.black),numbers(50717,4,[dng.whiteLevel]),numbers(50719,4,[local.x,local.y]),numbers(50720,4,[local.width,local.height]),\n rationals(50721,true,colorMatrix.flat()),rationals(50727,false,[1,1,1]),rationals(50728,false,[...development.asShotNeutral]),\n rationals(50730,true,[v.rendering.renderingExposureEv]),numbers(50778,3,[21]),\n rawBytes(50781,1,Uint8Array.from(rawDataUniqueId.match(/../g)!.map((s) => parseInt(s,16)))),numbers(50829,4,[activeRect.y,activeRect.x,activeRect.y+activeRect.height,activeRect.x+activeRect.width]),\n rationals(50964,true,forward.flat()),...(dng.noiseProfile ? [doubles(51041,dng.noiseProfile)] : []),\n rawBytes(700,1,xmp(metadata,\"raw\",simulationHash,v.colorProfile,frame.modeId,v.sceneProfile,correctedMetadata))],commonExif(metadata,\"raw\",local.width,local.height),pixels);\n // Exif 2.32 mandatory tags for a compressed primary image (resolution 72 dpi = unknown, YCbCrPositioning, FlashpixVersion, ComponentsConfiguration).\n const jpegExif=packExportJpegExif(identity(metadata,1),commonExif(metadata,\"jpeg\",processedOutputView.pixelWidth,processedOutputView.pixelHeight),\n {pixelWidth:processedOutputView.pixelWidth,pixelHeight:processedOutputView.pixelHeight});\n const jpegBytes=encodeExportJpeg({width:processedOutputView.pixelWidth,height:processedOutputView.pixelHeight,samples:rendering.value.integerSamples,\n quantizationStep:v.jpegQuantizationStep,exif:jpegExif,xmp:xmp(metadata,\"jpeg\",simulationHash,v.colorProfile,frame.modeId,v.sceneProfile,correctedMetadata)});\n active();\n const dngHash=await hash(dngBytes); active();\n const jpegHash=await hash(jpegBytes); active();\n return { schemaVersion:PHOTOGRAPHIC_EXPORT_SCHEMA_VERSION,metadata,simulationHashAlgorithm:\"sha-256\",simulationHash,rawDataUniqueId,uniqueCameraModel,source,rendering,nativeDefaultCrop,processedOutputView,correction,rawCorrectionIntent,\n highlight,imageDataPairing:\"jpeg-generated-from-exact-attached-raw\",\n dng:{mediaType:\"image/dng\",bytes:dngBytes,sha256:dngHash},jpeg:{mediaType:\"image/jpeg\",bytes:jpegBytes,sha256:jpegHash},\n interoperability:\"independent-decode-required-editor-validation-pending\" };\n}\n/**\n * DNG level tags for a 2×2 CFA frame.\n *\n * DNG 1.7 applies BlackLevelRepeatDim and CFAPattern to the image after the ActiveArea crop (stage 2), so\n * phases are measured from the ActiveArea origin. WhiteLevel (one value, because SamplesPerPixel is 1) is\n * the smallest per-phase effective white code, so no channel is reported as unsaturated above its own\n * saturation point.\n *\n * NoiseProfile (tag 51041) is written per CFAPlaneColor plane, only when every phase of a channel has the\n * same gain, read noise and black level. With x = (code − black)/(WhiteLevel − black):\n * var(x) = S·x + O, S = 1/(G·span), O = (σ²/G² + 1/12)/span². The model covers Poisson photo and dark shot\n * noise, Gaussian read noise and uniform ADC quantization. PRNU (photo-response non-uniformity), DSNU\n * (dark-signal non-uniformity) and other fixed-pattern noise are not modelled and not included.\n */\nfunction dngLevels(frame: RawFrameReconstruction[\"rawFrame\"], activeRect: RasterRect): { black: number[]; cfaPattern: number[]; whiteLevel: number; noiseProfile: number[] | null } {\n const layout=frame.colorSamplingProfile.layout;\n if (layout.kind!==\"periodic-mosaic\") throw new InvalidConfigurationError(\"Initial DNG profile supports explicitly registered 2x2 RGB Bayer topology only.\");\n const black: number[]=[], cfaPattern: number[]=[], whites: number[]=[], perChannel=new Map<string, {gain:number;readNoise:number;black:number}[]>();\n for (let py=0;py<2;py++) for (let px=0;px<2;px++) {\n // Absolute native phase of active-relative phase (px, py).\n const ax=(activeRect.x+px)%2, ay=(activeRect.y+py)%2;\n const found=frame.samples.filter((s) => s.colorSamplingSite.x%2===ax && s.colorSamplingSite.y%2===ay), first=found[0];\n if (!first || found.some((s) => s.blackLevelCode!==first.blackLevelCode)) throw new InvalidConfigurationError(\"DNG requires a fixed repeating black tile.\");\n black.push(first.blackLevelCode); whites.push(first.effectiveSaturationCode);\n cfaPattern.push([\"red\",\"green\",\"blue\"].indexOf(layout.siteChannelIds[ay*2+ax]!));\n const list=perChannel.get(first.channelId) ?? []; list.push({gain:first.systemConversionGainElectronsPerCode,readNoise:first.readNoiseRmsElectrons,black:first.blackLevelCode});\n perChannel.set(first.channelId,list);\n }\n const whiteLevel=Math.min(...whites);\n if (black.some((b) => b>=whiteLevel)) throw new InvalidConfigurationError(\"DNG black level must be below the effective WhiteLevel.\");\n let noiseProfile: number[] | null=[];\n for (const channel of [\"red\",\"green\",\"blue\"]) {\n const list=perChannel.get(channel), f=list?.[0];\n if (!list || !f || list.some((e) => e.gain!==f.gain || e.readNoise!==f.readNoise || e.black!==f.black)) { noiseProfile=null; break; }\n const span=whiteLevel-f.black;\n noiseProfile.push(1/(f.gain*span),(f.readNoise*f.readNoise/(f.gain*f.gain)+1/12)/(span*span));\n }\n return {black,cfaPattern,whiteLevel,noiseProfile};\n}\n"]}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Internal fast RAW development kernel on typed arrays, shared by packed native development and the
3
+ * bounded paired export.
4
+ *
5
+ * For native site i with CFA (colour filter array) phase p: if any saturation flag is set, or code ≥ W_p,
6
+ * the normalized value is 1 (clipped at the sensor's effective white level; this uses up the flags).
7
+ * Otherwise it is the signed (code − black)/(W_p − black). Reconstruction sums value·weight in the declared
8
+ * contribution order (the same order as `calculateRawReconstructionChannel`). Then
9
+ * `SensorColorDevelopment.developInto` applies white balance (WB), highlight handling and colour.
10
+ *
11
+ * Kernels are flattened per absolute CFA phase into typed arrays of index offsets, weights and source-site
12
+ * white levels, so no per-pixel objects are allocated. Not exported from the package.
13
+ */
14
+ import type { RawFrameReconstructionPhaseProfile } from "./raw-frame-reconstruction.js";
15
+ import type { SensorColorDevelopment, SensorColorDevelopmentCounts } from "../color/sensor-color-development.js";
16
+ /** Read-only RAW site storage. Arrays are row-major over the full native frame. */
17
+ export interface RawDevelopmentSource {
18
+ nativeWidth: number;
19
+ repeatWidth: number;
20
+ repeatHeight: number;
21
+ codes: ArrayLike<number>;
22
+ blackLevels: ArrayLike<number>;
23
+ /** Non-zero means the site saturated: physically, before the ADC, or digitally. */
24
+ saturationFlags: ArrayLike<number>;
25
+ /** Effective white code per CFA phase, `phaseY*repeatWidth+phaseX`. */
26
+ whiteByPhase: ArrayLike<number>;
27
+ }
28
+ /** Development counters; `saturatedPixelCount` counts pixels with at least one clipped contributing site. */
29
+ export interface RawDevelopmentCounts extends SensorColorDevelopmentCounts {
30
+ saturatedPixelCount: number;
31
+ }
32
+ export declare function createRawDevelopmentCounts(): RawDevelopmentCounts;
33
+ /** Normalized value of one site, or 1 when it is saturated. Shared by the reference read callback. */
34
+ export declare function normalizedRawSite(source: RawDevelopmentSource, x: number, y: number): number;
35
+ /** True when the site is clipped at the white level or flagged. */
36
+ export declare function rawSiteSaturated(source: RawDevelopmentSource, x: number, y: number): boolean;
37
+ /** Develops native pixels; output is linear sRGB/D65. */
38
+ export interface RawPixelDeveloper {
39
+ /** Develops the pixel centred on native site (x, y) into out[offset..offset+2]. Halo is validated by the caller. */
40
+ developAt(x: number, y: number, out: Float64Array | number[], offset: number): void;
41
+ /** Develops `count` pixels from native (x, y) stepping (dx, dy) into out[0..3·count). */
42
+ developRun(x: number, y: number, dx: number, dy: number, count: number, out: Float64Array): void;
43
+ readonly counts: RawDevelopmentCounts;
44
+ }
45
+ /**
46
+ * `mirror` (optional) turns on mirrored reads (reflect-101) for pixels within `reach` sites of the frame
47
+ * edge. Interior pixels, and every pixel when it is omitted, use the normal flattened-kernel path.
48
+ */
49
+ export declare function createRawPixelDeveloper(source: RawDevelopmentSource, phases: readonly RawFrameReconstructionPhaseProfile[], development: SensorColorDevelopment, mirror?: {
50
+ nativeHeight: number;
51
+ reach: number;
52
+ }): RawPixelDeveloper;
@@ -0,0 +1,88 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ import { reflectRawSiteIndex } from "../sensor/raw-reconstruction.js";
3
+ export function createRawDevelopmentCounts() {
4
+ return { saturatedPixelCount: 0, whiteBalanceClippedSampleCount: 0, reconstructedPixelCount: 0 };
5
+ }
6
+ /** Normalized value of one site, or 1 when it is saturated. Shared by the reference read callback. */
7
+ export function normalizedRawSite(source, x, y) {
8
+ const i = y * source.nativeWidth + x, code = source.codes[i], black = source.blackLevels[i], white = source.whiteByPhase[(y % source.repeatHeight) * source.repeatWidth + x % source.repeatWidth];
9
+ return source.saturationFlags[i] !== 0 || code >= white ? 1 : (code - black) / (white - black);
10
+ }
11
+ /** True when the site is clipped at the white level or flagged. */
12
+ export function rawSiteSaturated(source, x, y) {
13
+ const i = y * source.nativeWidth + x;
14
+ return source.saturationFlags[i] !== 0 ||
15
+ source.codes[i] >= source.whiteByPhase[(y % source.repeatHeight) * source.repeatWidth + x % source.repeatWidth];
16
+ }
17
+ /**
18
+ * `mirror` (optional) turns on mirrored reads (reflect-101) for pixels within `reach` sites of the frame
19
+ * edge. Interior pixels, and every pixel when it is omitted, use the normal flattened-kernel path.
20
+ */
21
+ export function createRawPixelDeveloper(source, phases, development, mirror) {
22
+ const rw = source.repeatWidth, rh = source.repeatHeight, w = source.nativeWidth;
23
+ const table = [];
24
+ for (const phase of phases) {
25
+ table[phase.phaseY * rw + phase.phaseX] = phase.profile.kernels.map((kernel) => ({
26
+ delta: Int32Array.from(kernel.contributions, (c) => c.offsetY * w + c.offsetX),
27
+ weight: Float64Array.from(kernel.contributions, (c) => c.weight),
28
+ white: Float64Array.from(kernel.contributions, (c) => source.whiteByPhase[(((phase.phaseY + c.offsetY) % rh + rh) % rh) * rw + ((phase.phaseX + c.offsetX) % rw + rw) % rw])
29
+ }));
30
+ }
31
+ const codes = source.codes, blacks = source.blackLevels, flags = source.saturationFlags, counts = createRawDevelopmentCounts();
32
+ const channel = new Float64Array(3);
33
+ const mirrorTable = mirror === undefined ? null : phases.map((phase) => phase.profile.kernels);
34
+ function developMirroredAt(x, y, out, offset) {
35
+ const kernels = mirrorTable[(y % rh) * rw + x % rw], h = mirror.nativeHeight;
36
+ let saturated = false;
37
+ for (let k = 0; k < 3; k++) {
38
+ let value = 0;
39
+ for (const c of kernels[k].contributions) {
40
+ const sx = reflectRawSiteIndex(x + c.offsetX, w), sy = reflectRawSiteIndex(y + c.offsetY, h);
41
+ if (rawSiteSaturated(source, sx, sy))
42
+ saturated = true;
43
+ value += normalizedRawSite(source, sx, sy) * c.weight;
44
+ }
45
+ channel[k] = value;
46
+ }
47
+ if (saturated)
48
+ counts.saturatedPixelCount++;
49
+ development.developInto(channel[0], channel[1], channel[2], out, offset, counts);
50
+ }
51
+ function developAt(x, y, out, offset) {
52
+ if (mirror !== undefined && (x < mirror.reach || y < mirror.reach || x + mirror.reach >= w || y + mirror.reach >= mirror.nativeHeight)) {
53
+ developMirroredAt(x, y, out, offset);
54
+ return;
55
+ }
56
+ const kernels = table[(y % rh) * rw + x % rw], center = y * w + x;
57
+ let saturated = false;
58
+ for (let k = 0; k < 3; k++) {
59
+ const kernel = kernels[k], delta = kernel.delta, weight = kernel.weight, white = kernel.white;
60
+ let value = 0;
61
+ for (let j = 0; j < delta.length; j++) {
62
+ const i = center + delta[j], code = codes[i], top = white[j];
63
+ let normalized;
64
+ if (flags[i] !== 0 || code >= top) {
65
+ normalized = 1;
66
+ saturated = true;
67
+ }
68
+ else {
69
+ const black = blacks[i];
70
+ normalized = (code - black) / (top - black);
71
+ }
72
+ value += normalized * weight[j];
73
+ }
74
+ channel[k] = value;
75
+ }
76
+ if (saturated)
77
+ counts.saturatedPixelCount++;
78
+ development.developInto(channel[0], channel[1], channel[2], out, offset, counts);
79
+ }
80
+ return {
81
+ counts, developAt,
82
+ developRun(x, y, dx, dy, count, out) {
83
+ for (let j = 0, o = 0; j < count; j++, x += dx, y += dy, o += 3)
84
+ developAt(x, y, out, o);
85
+ }
86
+ };
87
+ }
88
+ //# sourceMappingURL=raw-development-kernel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"raw-development-kernel.js","sourceRoot":"","sources":["../../src/capture/raw-development-kernel.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAiBtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAgBtE,MAAM,UAAU,0BAA0B;IACxC,OAAO,EAAE,mBAAmB,EAAE,CAAC,EAAE,8BAA8B,EAAE,CAAC,EAAE,uBAAuB,EAAE,CAAC,EAAE,CAAC;AACnG,CAAC;AACD,sGAAsG;AACtG,MAAM,UAAU,iBAAiB,CAAC,MAA4B,EAAE,CAAS,EAAE,CAAS;IAClF,MAAM,CAAC,GAAG,CAAC,GAAC,MAAM,CAAC,WAAW,GAAC,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,CAAE,EAAE,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,CAAE,EACvF,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,YAAY,CAAC,GAAC,MAAM,CAAC,WAAW,GAAG,CAAC,GAAG,MAAM,CAAC,WAAW,CAAE,CAAC;IACtG,OAAO,MAAM,CAAC,eAAe,CAAC,CAAC,CAAE,KAAK,CAAC,IAAI,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAC,KAAK,CAAC,GAAC,CAAC,KAAK,GAAC,KAAK,CAAC,CAAC;AAC5F,CAAC;AACD,mEAAmE;AACnE,MAAM,UAAU,gBAAgB,CAAC,MAA4B,EAAE,CAAS,EAAE,CAAS;IACjF,MAAM,CAAC,GAAG,CAAC,GAAC,MAAM,CAAC,WAAW,GAAC,CAAC,CAAC;IACjC,OAAO,MAAM,CAAC,eAAe,CAAC,CAAC,CAAE,KAAK,CA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C,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC;gBAAE,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;QAC3F,CAAC;KACF,CAAC;AACJ,CAAC","sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\n/**\n * Internal fast RAW development kernel on typed arrays, shared by packed native development and the\n * bounded paired export.\n *\n * For native site i with CFA (colour filter array) phase p: if any saturation flag is set, or code ≥ W_p,\n * the normalized value is 1 (clipped at the sensor's effective white level; this uses up the flags).\n * Otherwise it is the signed (code − black)/(W_p − black). Reconstruction sums value·weight in the declared\n * contribution order (the same order as `calculateRawReconstructionChannel`). Then\n * `SensorColorDevelopment.developInto` applies white balance (WB), highlight handling and colour.\n *\n * Kernels are flattened per absolute CFA phase into typed arrays of index offsets, weights and source-site\n * white levels, so no per-pixel objects are allocated. Not exported from the package.\n */\nimport type { RawFrameReconstructionPhaseProfile } from \"./raw-frame-reconstruction.js\";\nimport type { SensorColorDevelopment, SensorColorDevelopmentCounts } from \"../color/sensor-color-development.js\";\nimport { reflectRawSiteIndex } from \"../sensor/raw-reconstruction.js\";\n\n/** Read-only RAW site storage. Arrays are row-major over the full native frame. */\nexport interface RawDevelopmentSource {\n nativeWidth: number;\n repeatWidth: number;\n repeatHeight: number;\n codes: ArrayLike<number>;\n blackLevels: ArrayLike<number>;\n /** Non-zero means the site saturated: physically, before the ADC, or digitally. */\n saturationFlags: ArrayLike<number>;\n /** Effective white code per CFA phase, `phaseY*repeatWidth+phaseX`. */\n whiteByPhase: ArrayLike<number>;\n}\n/** Development counters; `saturatedPixelCount` counts pixels with at least one clipped contributing site. */\nexport interface RawDevelopmentCounts extends SensorColorDevelopmentCounts { saturatedPixelCount: number }\nexport function createRawDevelopmentCounts(): RawDevelopmentCounts {\n return { saturatedPixelCount: 0, whiteBalanceClippedSampleCount: 0, reconstructedPixelCount: 0 };\n}\n/** Normalized value of one site, or 1 when it is saturated. Shared by the reference read callback. */\nexport function normalizedRawSite(source: RawDevelopmentSource, x: number, y: number): number {\n const i = y*source.nativeWidth+x, code = source.codes[i]!, black = source.blackLevels[i]!,\n white = source.whiteByPhase[(y % source.repeatHeight)*source.repeatWidth + x % source.repeatWidth]!;\n return source.saturationFlags[i]! !== 0 || code >= white ? 1 : (code-black)/(white-black);\n}\n/** True when the site is clipped at the white level or flagged. */\nexport function rawSiteSaturated(source: RawDevelopmentSource, x: number, y: number): boolean {\n const i = y*source.nativeWidth+x;\n return source.saturationFlags[i]! !== 0 ||\n source.codes[i]! >= source.whiteByPhase[(y % source.repeatHeight)*source.repeatWidth + x % source.repeatWidth]!;\n}\n\ninterface FlatKernel { delta: Int32Array; weight: Float64Array; white: Float64Array }\n/** Develops native pixels; output is linear sRGB/D65. */\nexport interface RawPixelDeveloper {\n /** Develops the pixel centred on native site (x, y) into out[offset..offset+2]. Halo is validated by the caller. */\n developAt(x: number, y: number, out: Float64Array | number[], offset: number): void;\n /** Develops `count` pixels from native (x, y) stepping (dx, dy) into out[0..3·count). */\n developRun(x: number, y: number, dx: number, dy: number, count: number, out: Float64Array): void;\n readonly counts: RawDevelopmentCounts;\n}\n/**\n * `mirror` (optional) turns on mirrored reads (reflect-101) for pixels within `reach` sites of the frame\n * edge. Interior pixels, and every pixel when it is omitted, use the normal flattened-kernel path.\n */\nexport function createRawPixelDeveloper(source: RawDevelopmentSource, phases: readonly RawFrameReconstructionPhaseProfile[],\n development: SensorColorDevelopment, mirror?: { nativeHeight: number; reach: number }): RawPixelDeveloper {\n const rw = source.repeatWidth, rh = source.repeatHeight, w = source.nativeWidth;\n const table: FlatKernel[][] = [];\n for (const phase of phases) {\n table[phase.phaseY*rw+phase.phaseX] = phase.profile.kernels.map((kernel) => ({\n delta: Int32Array.from(kernel.contributions, (c) => c.offsetY*w+c.offsetX),\n weight: Float64Array.from(kernel.contributions, (c) => c.weight),\n white: Float64Array.from(kernel.contributions, (c) => source.whiteByPhase[\n (((phase.phaseY+c.offsetY) % rh + rh) % rh)*rw + ((phase.phaseX+c.offsetX) % rw + rw) % rw]!)\n }));\n }\n const codes = source.codes, blacks = source.blackLevels, flags = source.saturationFlags, counts = createRawDevelopmentCounts();\n const channel = new Float64Array(3);\n const mirrorTable = mirror === undefined ? null : phases.map((phase) => phase.profile.kernels);\n function developMirroredAt(x: number, y: number, out: Float64Array | number[], offset: number): void {\n const kernels = mirrorTable![(y % rh)*rw + x % rw]!, h = mirror!.nativeHeight;\n let saturated = false;\n for (let k = 0; k < 3; k++) {\n let value = 0;\n for (const c of kernels[k]!.contributions) {\n const sx = reflectRawSiteIndex(x+c.offsetX, w), sy = reflectRawSiteIndex(y+c.offsetY, h);\n if (rawSiteSaturated(source, sx, sy)) saturated = true;\n value += normalizedRawSite(source, sx, sy)*c.weight;\n }\n channel[k] = value;\n }\n if (saturated) counts.saturatedPixelCount++;\n development.developInto(channel[0]!, channel[1]!, channel[2]!, out, offset, counts);\n }\n function developAt(x: number, y: number, out: Float64Array | number[], offset: number): void {\n if (mirror !== undefined && (x < mirror.reach || y < mirror.reach || x+mirror.reach >= w || y+mirror.reach >= mirror.nativeHeight)) {\n developMirroredAt(x, y, out, offset); return;\n }\n const kernels = table[(y % rh)*rw + x % rw]!, center = y*w+x;\n let saturated = false;\n for (let k = 0; k < 3; k++) {\n const kernel = kernels[k]!, delta = kernel.delta, weight = kernel.weight, white = kernel.white;\n let value = 0;\n for (let j = 0; j < delta.length; j++) {\n const i = center+delta[j]!, code = codes[i]!, top = white[j]!;\n let normalized: number;\n if (flags[i]! !== 0 || code >= top) { normalized = 1; saturated = true; } else { const black = blacks[i]!; normalized = (code-black)/(top-black); }\n value += normalized*weight[j]!;\n }\n channel[k] = value;\n }\n if (saturated) counts.saturatedPixelCount++;\n development.developInto(channel[0]!, channel[1]!, channel[2]!, out, offset, counts);\n }\n return {\n counts, developAt,\n developRun(x: number, y: number, dx: number, dy: number, count: number, out: Float64Array): void {\n for (let j = 0, o = 0; j < count; j++, x += dx, y += dy, o += 3) developAt(x, y, out, o);\n }\n };\n}\n"]}
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Count the full native raster before active/output cropping. Structural attachment can preserve
3
- * up to 65,536 sites, while the bounded reference producer/reconstruction/execution envelope
4
- * permits 4,096. Equal numeric budgets in other stages do not make their scientific domains
5
- * interchangeable.
2
+ * Size limits for the full native sensor, counted before any active-area or output crop.
3
+ *
4
+ * A RAW frame can be attached to a capture with up to 65,536 sites. The bounded reference producer,
5
+ * reconstruction and execution allow 4,096. Another stage having the same numeric limit does not make
6
+ * its scientific domain interchangeable with these.
6
7
  * @see docs/RELEASE_1_0.md and the corresponding domain guide.
7
8
  */
8
- /** Structural attachment budget; it does not authorize reconstruction/export. */
9
+ /** Limit for attaching a RAW frame to a capture. It does not allow reconstruction or export at this size. */
9
10
  export declare const RAW_ATTACHMENT_MAX_NATIVE_SITES = 65536;
10
- /** Shared full-native budget of the reference producer and reconstruction path. */
11
+ /** Full-sensor limit shared by the reference producer and reconstruction. */
11
12
  export declare const RAW_REFERENCE_MAX_NATIVE_SITES = 4096;
12
- //# sourceMappingURL=raw-frame-limits.d.ts.map
@@ -1,13 +1,14 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
- * Count the full native raster before active/output cropping. Structural attachment can preserve
4
- * up to 65,536 sites, while the bounded reference producer/reconstruction/execution envelope
5
- * permits 4,096. Equal numeric budgets in other stages do not make their scientific domains
6
- * interchangeable.
3
+ * Size limits for the full native sensor, counted before any active-area or output crop.
4
+ *
5
+ * A RAW frame can be attached to a capture with up to 65,536 sites. The bounded reference producer,
6
+ * reconstruction and execution allow 4,096. Another stage having the same numeric limit does not make
7
+ * its scientific domain interchangeable with these.
7
8
  * @see docs/RELEASE_1_0.md and the corresponding domain guide.
8
9
  */
9
- /** Structural attachment budget; it does not authorize reconstruction/export. */
10
+ /** Limit for attaching a RAW frame to a capture. It does not allow reconstruction or export at this size. */
10
11
  export const RAW_ATTACHMENT_MAX_NATIVE_SITES = 65_536;
11
- /** Shared full-native budget of the reference producer and reconstruction path. */
12
+ /** Full-sensor limit shared by the reference producer and reconstruction. */
12
13
  export const RAW_REFERENCE_MAX_NATIVE_SITES = 4_096;
13
14
  //# sourceMappingURL=raw-frame-limits.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"raw-frame-limits.js","sourceRoot":"","sources":["../../src/capture/raw-frame-limits.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC;;;;;;GAMG;AAEH,iFAAiF;AACjF,MAAM,CAAC,MAAM,+BAA+B,GAAG,MAAM,CAAC;AACtD,mFAAmF;AACnF,MAAM,CAAC,MAAM,8BAA8B,GAAG,KAAK,CAAC"}
1
+ {"version":3,"file":"raw-frame-limits.js","sourceRoot":"","sources":["../../src/capture/raw-frame-limits.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC;;;;;;;GAOG;AAEH,6GAA6G;AAC7G,MAAM,CAAC,MAAM,+BAA+B,GAAG,MAAM,CAAC;AACtD,6EAA6E;AAC7E,MAAM,CAAC,MAAM,8BAA8B,GAAG,KAAK,CAAC","sourcesContent":["// SPDX-License-Identifier: Apache-2.0\n\n/**\n * Size limits for the full native sensor, counted before any active-area or output crop.\n *\n * A RAW frame can be attached to a capture with up to 65,536 sites. The bounded reference producer,\n * reconstruction and execution allow 4,096. Another stage having the same numeric limit does not make\n * its scientific domain interchangeable with these.\n * @see docs/RELEASE_1_0.md and the corresponding domain guide.\n */\n\n/** Limit for attaching a RAW frame to a capture. It does not allow reconstruction or export at this size. */\nexport const RAW_ATTACHMENT_MAX_NATIVE_SITES = 65_536;\n/** Full-sensor limit shared by the reference producer and reconstruction. */\nexport const RAW_REFERENCE_MAX_NATIVE_SITES = 4_096;\n"]}
@@ -3,19 +3,19 @@ import type { RasterRect } from "../output/capture-geometry.js";
3
3
  import { type SensorRawReconstructionProfile, type SensorRawReconstructedPixel } from "../sensor/raw-reconstruction.js";
4
4
  import { type SensorRawFrame } from "./sensor-raw-frame.js";
5
5
  export declare const RAW_FRAME_RECONSTRUCTION_SCHEMA_VERSION: "0.1.0";
6
- /** Kernel selection is explicit per absolute native CFA repeat phase, not guessed from channel names. */
6
+ /** A kernel is chosen explicitly for each absolute native CFA repeat phase, not guessed from channel names. */
7
7
  export interface RawFrameReconstructionPhaseProfile {
8
8
  phaseX: number;
9
9
  phaseY: number;
10
10
  profile: SensorRawReconstructionProfile;
11
11
  }
12
- /** Bounded reference handoff; region coordinates stay in the full native sensor frame. */
12
+ /** Input to the bounded reference reconstruction. Region coordinates are in the full native sensor frame. */
13
13
  export interface RawFrameReconstructionInput {
14
14
  rawFrame: SensorRawFrame;
15
15
  region: RasterRect;
16
16
  phaseProfiles: readonly RawFrameReconstructionPhaseProfile[];
17
17
  }
18
- /** Traceable virtual sensor-channel values, not colorimetric RGB or a rendered photograph. */
18
+ /** Traceable sensor-channel values. Not colorimetric RGB and not a rendered photograph. */
19
19
  export interface RawFrameReconstruction {
20
20
  schemaVersion: typeof RAW_FRAME_RECONSTRUCTION_SCHEMA_VERSION;
21
21
  rawFrame: SensorRawFrame;
@@ -27,10 +27,10 @@ export interface RawFrameReconstruction {
27
27
  pixelWidth: number;
28
28
  pixelHeight: number;
29
29
  channelIds: readonly string[];
30
- /** Interleaved native-region row-major values; black-subtracted normalization, signed. */
30
+ /** Interleaved values over the native region, row-major. Black-subtracted and normalized; can be negative. */
31
31
  samples: readonly number[];
32
32
  };
33
- /** Child envelopes and exact weighted RAW contributions, in matching native-region row-major order. */
33
+ /** Per-pixel result envelopes and the exact weighted RAW contributions, in the same row-major order. */
34
34
  pixels: readonly CalculationResult<SensorRawReconstructedPixel>[];
35
35
  lineage: "engine-reconstructed-from-attached-raw";
36
36
  producerOriginVerified: false;
@@ -41,10 +41,9 @@ export interface RawFrameReconstruction {
41
41
  sharpeningApplied: false;
42
42
  denoisingApplied: false;
43
43
  }
44
- /** Internal phase dispatch parser shared with packed native reconstruction. */
44
+ /** Internal: parses the kernel-per-CFA-phase table. Shared with packed native reconstruction. */
45
45
  export declare function parseRawReconstructionPhaseProfiles(value: unknown, modeId: string, colorSamplingProfile: SensorRawFrame["colorSamplingProfile"]): RawFrameReconstructionPhaseProfile[];
46
- /** Revalidates committed RAW codes/geometry and complete phase dispatch; no external plane may supply output values. */
46
+ /** Revalidates the committed RAW codes and geometry and checks that every CFA phase has a kernel. No external image plane can supply output values. */
47
47
  export declare function parseRawFrameReconstructionInput(value: unknown): RawFrameReconstructionInput;
48
- /** Delegates each pixel to #14's explicit linear reconstruction using only the attached native RAW samples. */
48
+ /** Computes each pixel with the sensor module's explicit linear reconstruction, using only the attached native RAW samples. */
49
49
  export declare function resolveRawFrameReconstruction(input: RawFrameReconstructionInput): CalculationResult<RawFrameReconstruction>;
50
- //# sourceMappingURL=raw-frame-reconstruction.d.ts.map
@@ -1,10 +1,11 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  /**
3
- * Module boundary and integration notes.
4
- * Revalidates committed RAW codes/geometry and complete phase dispatch; no external plane may supply
5
- * output values.
6
- * Delegates each pixel to #14's explicit linear reconstruction using only the attached native RAW
7
- * samples.
3
+ * Reconstructs sensor-channel values for a region of a committed RAW frame, using only the attached
4
+ * native RAW samples.
5
+ *
6
+ * It revalidates the RAW codes and geometry and checks that every CFA phase has a kernel. Each pixel is
7
+ * computed by the sensor module's explicit linear reconstruction (sensor/raw-reconstruction). No external
8
+ * image plane can supply output values.
8
9
  * @see docs/SIMULATED_CAPTURE.md for equations, coordinate/unit conventions, blockers and support
9
10
  * limits.
10
11
  */
@@ -67,7 +68,7 @@ function profile(value) {
67
68
  }
68
69
  return parseSensorRawReconstructionProfile(r);
69
70
  }
70
- /** Internal phase dispatch parser shared with packed native reconstruction. */
71
+ /** Internal: parses the kernel-per-CFA-phase table. Shared with packed native reconstruction. */
71
72
  export function parseRawReconstructionPhaseProfiles(value, modeId, colorSamplingProfile) {
72
73
  const layout = colorSamplingProfile.layout;
73
74
  if (layout.kind !== "periodic-mosaic")
@@ -94,7 +95,7 @@ export function parseRawReconstructionPhaseProfiles(value, modeId, colorSampling
94
95
  phaseProfiles.sort((a, b) => a.phaseY - b.phaseY || a.phaseX - b.phaseX);
95
96
  return phaseProfiles;
96
97
  }
97
- /** Revalidates committed RAW codes/geometry and complete phase dispatch; no external plane may supply output values. */
98
+ /** Revalidates the committed RAW codes and geometry and checks that every CFA phase has a kernel. No external image plane can supply output values. */
98
99
  export function parseRawFrameReconstructionInput(value) {
99
100
  const r = object(value, ["rawFrame", "region", "phaseProfiles"]), rawFrame = frame(r.rawFrame);
100
101
  const rect = object(r.region, ["x", "y", "width", "height"]);
@@ -105,7 +106,7 @@ export function parseRawFrameReconstructionInput(value) {
105
106
  const phaseProfiles = parseRawReconstructionPhaseProfiles(r.phaseProfiles, rawFrame.modeId, rawFrame.colorSamplingProfile);
106
107
  return { rawFrame, region, phaseProfiles };
107
108
  }
108
- /** Delegates each pixel to #14's explicit linear reconstruction using only the attached native RAW samples. */
109
+ /** Computes each pixel with the sensor module's explicit linear reconstruction, using only the attached native RAW samples. */
109
110
  export function resolveRawFrameReconstruction(input) {
110
111
  const v = parseRawFrameReconstructionInput(input), f = v.rawFrame, layout = f.colorSamplingProfile.layout;
111
112
  if (layout.kind !== "periodic-mosaic")