@photivra/engine 0.6.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (749) hide show
  1. package/AGENTS.md +674 -0
  2. package/CHANGELOG.md +186 -0
  3. package/CITATION.cff +1 -1
  4. package/CONTRIBUTING.md +76 -0
  5. package/DCO +33 -0
  6. package/NODE_SUPPORT.md +37 -0
  7. package/NOTICE +2 -0
  8. package/README.md +138 -71
  9. package/SECURITY.md +55 -0
  10. package/THIRD_PARTY.md +63 -0
  11. package/dist/camera/equivalent-focal-length.d.ts +9 -0
  12. package/dist/camera/equivalent-focal-length.d.ts.map +1 -1
  13. package/dist/camera/equivalent-focal-length.js +9 -0
  14. package/dist/camera/equivalent-focal-length.js.map +1 -1
  15. package/dist/camera/field-of-view.d.ts +13 -0
  16. package/dist/camera/field-of-view.d.ts.map +1 -1
  17. package/dist/camera/field-of-view.js +13 -0
  18. package/dist/camera/field-of-view.js.map +1 -1
  19. package/dist/camera/projected-object-size.d.ts +8 -0
  20. package/dist/camera/projected-object-size.d.ts.map +1 -1
  21. package/dist/camera/projected-object-size.js +8 -0
  22. package/dist/camera/projected-object-size.js.map +1 -1
  23. package/dist/capture/capture-export-metadata.d.ts +60 -0
  24. package/dist/capture/capture-export-metadata.d.ts.map +1 -0
  25. package/dist/capture/capture-export-metadata.js +62 -0
  26. package/dist/capture/capture-export-metadata.js.map +1 -0
  27. package/dist/capture/environment-raw-producer.d.ts +55 -0
  28. package/dist/capture/environment-raw-producer.d.ts.map +1 -0
  29. package/dist/capture/environment-raw-producer.js +88 -0
  30. package/dist/capture/environment-raw-producer.js.map +1 -0
  31. package/dist/capture/export-jpeg.d.ts +12 -0
  32. package/dist/capture/export-jpeg.d.ts.map +1 -0
  33. package/dist/capture/export-jpeg.js +126 -0
  34. package/dist/capture/export-jpeg.js.map +1 -0
  35. package/dist/capture/export-tiff.d.ts +45 -0
  36. package/dist/capture/export-tiff.d.ts.map +1 -0
  37. package/dist/capture/export-tiff.js +129 -0
  38. package/dist/capture/export-tiff.js.map +1 -0
  39. package/dist/capture/focus-control.d.ts +210 -0
  40. package/dist/capture/focus-control.d.ts.map +1 -0
  41. package/dist/capture/focus-control.js +664 -0
  42. package/dist/capture/focus-control.js.map +1 -0
  43. package/dist/capture/linear-encoding.d.ts +59 -0
  44. package/dist/capture/linear-encoding.d.ts.map +1 -0
  45. package/dist/capture/linear-encoding.js +98 -0
  46. package/dist/capture/linear-encoding.js.map +1 -0
  47. package/dist/capture/photographic-export.d.ts +135 -0
  48. package/dist/capture/photographic-export.d.ts.map +1 -0
  49. package/dist/capture/photographic-export.js +273 -0
  50. package/dist/capture/photographic-export.js.map +1 -0
  51. package/dist/capture/raw-frame-limits.d.ts +12 -0
  52. package/dist/capture/raw-frame-limits.d.ts.map +1 -0
  53. package/dist/capture/raw-frame-limits.js +13 -0
  54. package/dist/capture/raw-frame-limits.js.map +1 -0
  55. package/dist/capture/raw-frame-reconstruction.d.ts +48 -0
  56. package/dist/capture/raw-frame-reconstruction.d.ts.map +1 -0
  57. package/dist/capture/raw-frame-reconstruction.js +146 -0
  58. package/dist/capture/raw-frame-reconstruction.js.map +1 -0
  59. package/dist/capture/release-sequence.d.ts +120 -0
  60. package/dist/capture/release-sequence.d.ts.map +1 -0
  61. package/dist/capture/release-sequence.js +446 -0
  62. package/dist/capture/release-sequence.js.map +1 -0
  63. package/dist/capture/sensor-raw-frame.d.ts +34 -0
  64. package/dist/capture/sensor-raw-frame.d.ts.map +1 -0
  65. package/dist/capture/sensor-raw-frame.js +106 -0
  66. package/dist/capture/sensor-raw-frame.js.map +1 -0
  67. package/dist/capture/sensor-raw-producer.d.ts +51 -0
  68. package/dist/capture/sensor-raw-producer.d.ts.map +1 -0
  69. package/dist/capture/sensor-raw-producer.js +235 -0
  70. package/dist/capture/sensor-raw-producer.js.map +1 -0
  71. package/dist/capture/simulated-capture.d.ts +125 -0
  72. package/dist/capture/simulated-capture.d.ts.map +1 -0
  73. package/dist/capture/simulated-capture.js +248 -0
  74. package/dist/capture/simulated-capture.js.map +1 -0
  75. package/dist/color/capture-color.d.ts +73 -0
  76. package/dist/color/capture-color.d.ts.map +1 -0
  77. package/dist/color/capture-color.js +145 -0
  78. package/dist/color/capture-color.js.map +1 -0
  79. package/dist/color/sensor-color-development.d.ts +23 -0
  80. package/dist/color/sensor-color-development.d.ts.map +1 -0
  81. package/dist/color/sensor-color-development.js +56 -0
  82. package/dist/color/sensor-color-development.js.map +1 -0
  83. package/dist/color/white-balance.d.ts +175 -0
  84. package/dist/color/white-balance.d.ts.map +1 -0
  85. package/dist/color/white-balance.js +606 -0
  86. package/dist/color/white-balance.js.map +1 -0
  87. package/dist/composition/image-formation-plan.d.ts +481 -0
  88. package/dist/composition/image-formation-plan.d.ts.map +1 -0
  89. package/dist/composition/image-formation-plan.js +2499 -0
  90. package/dist/composition/image-formation-plan.js.map +1 -0
  91. package/dist/composition/plan-consumer.d.ts +53 -0
  92. package/dist/composition/plan-consumer.d.ts.map +1 -0
  93. package/dist/composition/plan-consumer.js +119 -0
  94. package/dist/composition/plan-consumer.js.map +1 -0
  95. package/dist/core/calculation-result.d.ts.map +1 -1
  96. package/dist/core/calculation-result.js +6 -0
  97. package/dist/core/calculation-result.js.map +1 -1
  98. package/dist/core/canonical-json.d.ts +18 -0
  99. package/dist/core/canonical-json.d.ts.map +1 -0
  100. package/dist/core/canonical-json.js +44 -0
  101. package/dist/core/canonical-json.js.map +1 -0
  102. package/dist/core/configuration-error.d.ts +6 -0
  103. package/dist/core/configuration-error.d.ts.map +1 -1
  104. package/dist/core/configuration-error.js +6 -0
  105. package/dist/core/configuration-error.js.map +1 -1
  106. package/dist/core/evidence-provenance.d.ts +6 -0
  107. package/dist/core/evidence-provenance.d.ts.map +1 -1
  108. package/dist/core/evidence-provenance.js +7 -0
  109. package/dist/core/evidence-provenance.js.map +1 -1
  110. package/dist/core/image-formation.d.ts +9 -3
  111. package/dist/core/image-formation.d.ts.map +1 -1
  112. package/dist/core/image-formation.js +29 -5
  113. package/dist/core/image-formation.js.map +1 -1
  114. package/dist/core/owned-data.d.ts +25 -0
  115. package/dist/core/owned-data.d.ts.map +1 -0
  116. package/dist/core/owned-data.js +34 -0
  117. package/dist/core/owned-data.js.map +1 -0
  118. package/dist/core/record-validation.d.ts +17 -0
  119. package/dist/core/record-validation.d.ts.map +1 -0
  120. package/dist/core/record-validation.js +44 -0
  121. package/dist/core/record-validation.js.map +1 -0
  122. package/dist/core/scientific-assurance.d.ts +101 -0
  123. package/dist/core/scientific-assurance.d.ts.map +1 -0
  124. package/dist/core/scientific-assurance.js +301 -0
  125. package/dist/core/scientific-assurance.js.map +1 -0
  126. package/dist/core/spectral-composition.d.ts +106 -0
  127. package/dist/core/spectral-composition.d.ts.map +1 -0
  128. package/dist/core/spectral-composition.js +334 -0
  129. package/dist/core/spectral-composition.js.map +1 -0
  130. package/dist/core/spectral.d.ts +34 -0
  131. package/dist/core/spectral.d.ts.map +1 -0
  132. package/dist/core/spectral.js +57 -0
  133. package/dist/core/spectral.js.map +1 -0
  134. package/dist/core/validation.d.ts +6 -0
  135. package/dist/core/validation.d.ts.map +1 -1
  136. package/dist/core/validation.js +6 -0
  137. package/dist/core/validation.js.map +1 -1
  138. package/dist/core/version.d.ts +14 -0
  139. package/dist/core/version.d.ts.map +1 -0
  140. package/dist/core/version.js +15 -0
  141. package/dist/core/version.js.map +1 -0
  142. package/dist/equipment/exposure-capabilities.d.ts +125 -0
  143. package/dist/equipment/exposure-capabilities.d.ts.map +1 -0
  144. package/dist/equipment/exposure-capabilities.js +391 -0
  145. package/dist/equipment/exposure-capabilities.js.map +1 -0
  146. package/dist/equipment/generic-tier-assets.d.ts +82 -0
  147. package/dist/equipment/generic-tier-assets.d.ts.map +1 -0
  148. package/dist/equipment/generic-tier-assets.js +119 -0
  149. package/dist/equipment/generic-tier-assets.js.map +1 -0
  150. package/dist/equipment/generic-tier-presets.d.ts +57 -0
  151. package/dist/equipment/generic-tier-presets.d.ts.map +1 -0
  152. package/dist/equipment/generic-tier-presets.js +122 -0
  153. package/dist/equipment/generic-tier-presets.js.map +1 -0
  154. package/dist/equipment/iso-capabilities.d.ts +143 -0
  155. package/dist/equipment/iso-capabilities.d.ts.map +1 -0
  156. package/dist/equipment/iso-capabilities.js +578 -0
  157. package/dist/equipment/iso-capabilities.js.map +1 -0
  158. package/dist/equipment/metering-capabilities.d.ts +58 -0
  159. package/dist/equipment/metering-capabilities.d.ts.map +1 -0
  160. package/dist/equipment/metering-capabilities.js +151 -0
  161. package/dist/equipment/metering-capabilities.js.map +1 -0
  162. package/dist/equipment/release-capabilities.d.ts +33 -0
  163. package/dist/equipment/release-capabilities.d.ts.map +1 -0
  164. package/dist/equipment/release-capabilities.js +176 -0
  165. package/dist/equipment/release-capabilities.js.map +1 -0
  166. package/dist/exposure/exposure-duration-control.d.ts +72 -0
  167. package/dist/exposure/exposure-duration-control.d.ts.map +1 -0
  168. package/dist/exposure/exposure-duration-control.js +161 -0
  169. package/dist/exposure/exposure-duration-control.js.map +1 -0
  170. package/dist/exposure/exposure-mode-resolver.d.ts +637 -0
  171. package/dist/exposure/exposure-mode-resolver.d.ts.map +1 -0
  172. package/dist/exposure/exposure-mode-resolver.js +1905 -0
  173. package/dist/exposure/exposure-mode-resolver.js.map +1 -0
  174. package/dist/exposure/exposure.d.ts +8 -0
  175. package/dist/exposure/exposure.d.ts.map +1 -1
  176. package/dist/exposure/exposure.js +8 -0
  177. package/dist/exposure/exposure.js.map +1 -1
  178. package/dist/exposure/flash.d.ts +179 -0
  179. package/dist/exposure/flash.d.ts.map +1 -0
  180. package/dist/exposure/flash.js +644 -0
  181. package/dist/exposure/flash.js.map +1 -0
  182. package/dist/exposure/metering-scene-radiance.d.ts +72 -0
  183. package/dist/exposure/metering-scene-radiance.d.ts.map +1 -0
  184. package/dist/exposure/metering-scene-radiance.js +222 -0
  185. package/dist/exposure/metering-scene-radiance.js.map +1 -0
  186. package/dist/exposure/metering-target.d.ts +67 -0
  187. package/dist/exposure/metering-target.d.ts.map +1 -0
  188. package/dist/exposure/metering-target.js +265 -0
  189. package/dist/exposure/metering-target.js.map +1 -0
  190. package/dist/exposure/metering-temporal.d.ts +76 -0
  191. package/dist/exposure/metering-temporal.d.ts.map +1 -0
  192. package/dist/exposure/metering-temporal.js +210 -0
  193. package/dist/exposure/metering-temporal.js.map +1 -0
  194. package/dist/exposure/metering.d.ts +124 -0
  195. package/dist/exposure/metering.d.ts.map +1 -0
  196. package/dist/exposure/metering.js +422 -0
  197. package/dist/exposure/metering.js.map +1 -0
  198. package/dist/exposure/program-line.d.ts +29 -0
  199. package/dist/exposure/program-line.d.ts.map +1 -0
  200. package/dist/exposure/program-line.js +126 -0
  201. package/dist/exposure/program-line.js.map +1 -0
  202. package/dist/index.d.ts +87 -6
  203. package/dist/index.d.ts.map +1 -1
  204. package/dist/index.js +85 -6
  205. package/dist/index.js.map +1 -1
  206. package/dist/motion/camera-rotation.d.ts +16 -0
  207. package/dist/motion/camera-rotation.d.ts.map +1 -1
  208. package/dist/motion/camera-rotation.js +16 -0
  209. package/dist/motion/camera-rotation.js.map +1 -1
  210. package/dist/motion/capture-rotation-inverse-mapping.d.ts +13 -0
  211. package/dist/motion/capture-rotation-inverse-mapping.d.ts.map +1 -1
  212. package/dist/motion/capture-rotation-inverse-mapping.js +13 -0
  213. package/dist/motion/capture-rotation-inverse-mapping.js.map +1 -1
  214. package/dist/motion/capture-rotation-temporal-quadrature.d.ts +15 -0
  215. package/dist/motion/capture-rotation-temporal-quadrature.d.ts.map +1 -1
  216. package/dist/motion/capture-rotation-temporal-quadrature.js +15 -0
  217. package/dist/motion/capture-rotation-temporal-quadrature.js.map +1 -1
  218. package/dist/motion/capture-rotation-trajectory.d.ts +15 -0
  219. package/dist/motion/capture-rotation-trajectory.d.ts.map +1 -1
  220. package/dist/motion/capture-rotation-trajectory.js +15 -0
  221. package/dist/motion/capture-rotation-trajectory.js.map +1 -1
  222. package/dist/motion/capture-translation-parallax-temporal-quadrature.d.ts +119 -0
  223. package/dist/motion/capture-translation-parallax-temporal-quadrature.d.ts.map +1 -0
  224. package/dist/motion/capture-translation-parallax-temporal-quadrature.js +263 -0
  225. package/dist/motion/capture-translation-parallax-temporal-quadrature.js.map +1 -0
  226. package/dist/motion/extended-object-projection.d.ts +175 -0
  227. package/dist/motion/extended-object-projection.d.ts.map +1 -0
  228. package/dist/motion/extended-object-projection.js +402 -0
  229. package/dist/motion/extended-object-projection.js.map +1 -0
  230. package/dist/motion/projected-motion.d.ts +11 -0
  231. package/dist/motion/projected-motion.d.ts.map +1 -1
  232. package/dist/motion/projected-motion.js +11 -0
  233. package/dist/motion/projected-motion.js.map +1 -1
  234. package/dist/optics/aperture.d.ts +9 -0
  235. package/dist/optics/aperture.d.ts.map +1 -1
  236. package/dist/optics/aperture.js +9 -0
  237. package/dist/optics/aperture.js.map +1 -1
  238. package/dist/optics/circle-of-confusion.d.ts +8 -0
  239. package/dist/optics/circle-of-confusion.d.ts.map +1 -1
  240. package/dist/optics/circle-of-confusion.js +8 -0
  241. package/dist/optics/circle-of-confusion.js.map +1 -1
  242. package/dist/optics/complex-pupil-psf.d.ts +128 -0
  243. package/dist/optics/complex-pupil-psf.d.ts.map +1 -0
  244. package/dist/optics/complex-pupil-psf.js +462 -0
  245. package/dist/optics/complex-pupil-psf.js.map +1 -0
  246. package/dist/optics/depth-of-field.d.ts +18 -0
  247. package/dist/optics/depth-of-field.d.ts.map +1 -1
  248. package/dist/optics/depth-of-field.js +29 -4
  249. package/dist/optics/depth-of-field.js.map +1 -1
  250. package/dist/optics/diffraction.d.ts +8 -0
  251. package/dist/optics/diffraction.d.ts.map +1 -1
  252. package/dist/optics/diffraction.js +8 -0
  253. package/dist/optics/diffraction.js.map +1 -1
  254. package/dist/optics/focus-breathing.d.ts +13 -0
  255. package/dist/optics/focus-breathing.d.ts.map +1 -1
  256. package/dist/optics/focus-breathing.js +13 -0
  257. package/dist/optics/focus-breathing.js.map +1 -1
  258. package/dist/optics/focus-state.d.ts +47 -0
  259. package/dist/optics/focus-state.d.ts.map +1 -0
  260. package/dist/optics/focus-state.js +78 -0
  261. package/dist/optics/focus-state.js.map +1 -0
  262. package/dist/optics/front-of-lens-filter.d.ts +114 -0
  263. package/dist/optics/front-of-lens-filter.d.ts.map +1 -0
  264. package/dist/optics/front-of-lens-filter.js +468 -0
  265. package/dist/optics/front-of-lens-filter.js.map +1 -0
  266. package/dist/optics/illumination-vignetting.d.ts +9 -0
  267. package/dist/optics/illumination-vignetting.d.ts.map +1 -1
  268. package/dist/optics/illumination-vignetting.js +9 -0
  269. package/dist/optics/illumination-vignetting.js.map +1 -1
  270. package/dist/optics/lateral-chromatic-aberration.d.ts +11 -0
  271. package/dist/optics/lateral-chromatic-aberration.d.ts.map +1 -1
  272. package/dist/optics/lateral-chromatic-aberration.js +11 -0
  273. package/dist/optics/lateral-chromatic-aberration.js.map +1 -1
  274. package/dist/optics/lens-psf-profile.d.ts +217 -0
  275. package/dist/optics/lens-psf-profile.d.ts.map +1 -0
  276. package/dist/optics/lens-psf-profile.js +823 -0
  277. package/dist/optics/lens-psf-profile.js.map +1 -0
  278. package/dist/optics/polygon-diffraction.d.ts +67 -0
  279. package/dist/optics/polygon-diffraction.d.ts.map +1 -0
  280. package/dist/optics/polygon-diffraction.js +145 -0
  281. package/dist/optics/polygon-diffraction.js.map +1 -0
  282. package/dist/optics/profile-contract.d.ts +42 -0
  283. package/dist/optics/profile-contract.d.ts.map +1 -0
  284. package/dist/optics/profile-contract.js +92 -0
  285. package/dist/optics/profile-contract.js.map +1 -0
  286. package/dist/optics/psf-foundation.d.ts +16 -3
  287. package/dist/optics/psf-foundation.d.ts.map +1 -1
  288. package/dist/optics/psf-foundation.js +28 -15
  289. package/dist/optics/psf-foundation.js.map +1 -1
  290. package/dist/optics/radial-distortion.d.ts +18 -0
  291. package/dist/optics/radial-distortion.d.ts.map +1 -1
  292. package/dist/optics/radial-distortion.js +18 -0
  293. package/dist/optics/radial-distortion.js.map +1 -1
  294. package/dist/optics/scene-to-sensor-irradiance.d.ts +213 -0
  295. package/dist/optics/scene-to-sensor-irradiance.d.ts.map +1 -0
  296. package/dist/optics/scene-to-sensor-irradiance.js +662 -0
  297. package/dist/optics/scene-to-sensor-irradiance.js.map +1 -0
  298. package/dist/optics/scene-to-sensor-quadrature.d.ts +63 -0
  299. package/dist/optics/scene-to-sensor-quadrature.d.ts.map +1 -0
  300. package/dist/optics/scene-to-sensor-quadrature.js +82 -0
  301. package/dist/optics/scene-to-sensor-quadrature.js.map +1 -0
  302. package/dist/optics/sensor-environment-query.d.ts +60 -0
  303. package/dist/optics/sensor-environment-query.d.ts.map +1 -0
  304. package/dist/optics/sensor-environment-query.js +50 -0
  305. package/dist/optics/sensor-environment-query.js.map +1 -0
  306. package/dist/optics/sensor-psf-quadrature.d.ts +70 -0
  307. package/dist/optics/sensor-psf-quadrature.d.ts.map +1 -0
  308. package/dist/optics/sensor-psf-quadrature.js +101 -0
  309. package/dist/optics/sensor-psf-quadrature.js.map +1 -0
  310. package/dist/optics/sensor-psf-support.d.ts +20 -0
  311. package/dist/optics/sensor-psf-support.d.ts.map +1 -0
  312. package/dist/optics/sensor-psf-support.js +13 -0
  313. package/dist/optics/sensor-psf-support.js.map +1 -0
  314. package/dist/optics/stray-light.d.ts +91 -0
  315. package/dist/optics/stray-light.d.ts.map +1 -0
  316. package/dist/optics/stray-light.js +110 -0
  317. package/dist/optics/stray-light.js.map +1 -0
  318. package/dist/optics/thin-lens.d.ts +8 -0
  319. package/dist/optics/thin-lens.d.ts.map +1 -1
  320. package/dist/optics/thin-lens.js +8 -0
  321. package/dist/optics/thin-lens.js.map +1 -1
  322. package/dist/output/capture-corrected-sdr.d.ts +49 -0
  323. package/dist/output/capture-corrected-sdr.d.ts.map +1 -0
  324. package/dist/output/capture-corrected-sdr.js +149 -0
  325. package/dist/output/capture-corrected-sdr.js.map +1 -0
  326. package/dist/output/capture-geometry.d.ts.map +1 -1
  327. package/dist/output/capture-geometry.js +8 -0
  328. package/dist/output/capture-geometry.js.map +1 -1
  329. package/dist/output/capture-sdr.d.ts +49 -0
  330. package/dist/output/capture-sdr.d.ts.map +1 -0
  331. package/dist/output/capture-sdr.js +90 -0
  332. package/dist/output/capture-sdr.js.map +1 -0
  333. package/dist/output/crop.d.ts +6 -0
  334. package/dist/output/crop.d.ts.map +1 -1
  335. package/dist/output/crop.js +6 -0
  336. package/dist/output/crop.js.map +1 -1
  337. package/dist/output/geometric-transforms.d.ts +137 -0
  338. package/dist/output/geometric-transforms.d.ts.map +1 -0
  339. package/dist/output/geometric-transforms.js +225 -0
  340. package/dist/output/geometric-transforms.js.map +1 -0
  341. package/dist/output/lens-corrections.d.ts +121 -0
  342. package/dist/output/lens-corrections.d.ts.map +1 -0
  343. package/dist/output/lens-corrections.js +210 -0
  344. package/dist/output/lens-corrections.js.map +1 -0
  345. package/dist/output/sdr-rendering.d.ts +81 -0
  346. package/dist/output/sdr-rendering.d.ts.map +1 -0
  347. package/dist/output/sdr-rendering.js +106 -0
  348. package/dist/output/sdr-rendering.js.map +1 -0
  349. package/dist/output/subject-framing-crop.d.ts +8 -0
  350. package/dist/output/subject-framing-crop.d.ts.map +1 -1
  351. package/dist/output/subject-framing-crop.js +8 -0
  352. package/dist/output/subject-framing-crop.js.map +1 -1
  353. package/dist/schema/camera.d.ts +6 -0
  354. package/dist/schema/camera.d.ts.map +1 -1
  355. package/dist/schema/illumination-spectral.d.ts +51 -0
  356. package/dist/schema/illumination-spectral.d.ts.map +1 -0
  357. package/dist/schema/illumination-spectral.js +132 -0
  358. package/dist/schema/illumination-spectral.js.map +1 -0
  359. package/dist/schema/illumination-temporal.d.ts +156 -0
  360. package/dist/schema/illumination-temporal.d.ts.map +1 -0
  361. package/dist/schema/illumination-temporal.js +554 -0
  362. package/dist/schema/illumination-temporal.js.map +1 -0
  363. package/dist/schema/illumination.d.ts +138 -0
  364. package/dist/schema/illumination.d.ts.map +1 -0
  365. package/dist/schema/illumination.js +483 -0
  366. package/dist/schema/illumination.js.map +1 -0
  367. package/dist/schema/scene-radiance-temporal.d.ts +107 -0
  368. package/dist/schema/scene-radiance-temporal.d.ts.map +1 -0
  369. package/dist/schema/scene-radiance-temporal.js +259 -0
  370. package/dist/schema/scene-radiance-temporal.js.map +1 -0
  371. package/dist/schema/scene-radiance.d.ts +185 -0
  372. package/dist/schema/scene-radiance.d.ts.map +1 -0
  373. package/dist/schema/scene-radiance.js +535 -0
  374. package/dist/schema/scene-radiance.js.map +1 -0
  375. package/dist/schema/scene.d.ts +7 -0
  376. package/dist/schema/scene.d.ts.map +1 -1
  377. package/dist/schema/validation.d.ts.map +1 -1
  378. package/dist/schema/validation.js +7 -0
  379. package/dist/schema/validation.js.map +1 -1
  380. package/dist/sensor/accumulated-charge.d.ts +199 -0
  381. package/dist/sensor/accumulated-charge.d.ts.map +1 -0
  382. package/dist/sensor/accumulated-charge.js +450 -0
  383. package/dist/sensor/accumulated-charge.js.map +1 -0
  384. package/dist/sensor/architecture.d.ts +48 -13
  385. package/dist/sensor/architecture.d.ts.map +1 -1
  386. package/dist/sensor/architecture.js +58 -16
  387. package/dist/sensor/architecture.js.map +1 -1
  388. package/dist/sensor/camera-saturation-capacity.d.ts +138 -0
  389. package/dist/sensor/camera-saturation-capacity.d.ts.map +1 -0
  390. package/dist/sensor/camera-saturation-capacity.js +356 -0
  391. package/dist/sensor/camera-saturation-capacity.js.map +1 -0
  392. package/dist/sensor/capture-color-sampling-binding.d.ts +1 -0
  393. package/dist/sensor/capture-color-sampling-binding.d.ts.map +1 -1
  394. package/dist/sensor/capture-color-sampling-binding.js +14 -0
  395. package/dist/sensor/capture-color-sampling-binding.js.map +1 -1
  396. package/dist/sensor/capture-mode-timing.d.ts +63 -0
  397. package/dist/sensor/capture-mode-timing.d.ts.map +1 -0
  398. package/dist/sensor/capture-mode-timing.js +270 -0
  399. package/dist/sensor/capture-mode-timing.js.map +1 -0
  400. package/dist/sensor/capture-mode.d.ts.map +1 -1
  401. package/dist/sensor/capture-mode.js +13 -0
  402. package/dist/sensor/capture-mode.js.map +1 -1
  403. package/dist/sensor/color-sampling.d.ts.map +1 -1
  404. package/dist/sensor/color-sampling.js +19 -0
  405. package/dist/sensor/color-sampling.js.map +1 -1
  406. package/dist/sensor/constant-rate-temporal-integration.d.ts +126 -0
  407. package/dist/sensor/constant-rate-temporal-integration.d.ts.map +1 -0
  408. package/dist/sensor/constant-rate-temporal-integration.js +382 -0
  409. package/dist/sensor/constant-rate-temporal-integration.js.map +1 -0
  410. package/dist/sensor/dark-current.d.ts +169 -0
  411. package/dist/sensor/dark-current.d.ts.map +1 -0
  412. package/dist/sensor/dark-current.js +427 -0
  413. package/dist/sensor/dark-current.js.map +1 -0
  414. package/dist/sensor/environment-photo-signal.d.ts +123 -0
  415. package/dist/sensor/environment-photo-signal.d.ts.map +1 -0
  416. package/dist/sensor/environment-photo-signal.js +186 -0
  417. package/dist/sensor/environment-photo-signal.js.map +1 -0
  418. package/dist/sensor/eqe-electron-rate.d.ts +107 -0
  419. package/dist/sensor/eqe-electron-rate.d.ts.map +1 -0
  420. package/dist/sensor/eqe-electron-rate.js +561 -0
  421. package/dist/sensor/eqe-electron-rate.js.map +1 -0
  422. package/dist/sensor/eqe-local-exposure.d.ts +65 -0
  423. package/dist/sensor/eqe-local-exposure.d.ts.map +1 -0
  424. package/dist/sensor/eqe-local-exposure.js +84 -0
  425. package/dist/sensor/eqe-local-exposure.js.map +1 -0
  426. package/dist/sensor/eqe-temporal-exposure.d.ts +55 -0
  427. package/dist/sensor/eqe-temporal-exposure.d.ts.map +1 -0
  428. package/dist/sensor/eqe-temporal-exposure.js +62 -0
  429. package/dist/sensor/eqe-temporal-exposure.js.map +1 -0
  430. package/dist/sensor/exposure-window.d.ts +14 -0
  431. package/dist/sensor/exposure-window.d.ts.map +1 -1
  432. package/dist/sensor/exposure-window.js +14 -0
  433. package/dist/sensor/exposure-window.js.map +1 -1
  434. package/dist/sensor/iso-signal-chain.d.ts +148 -0
  435. package/dist/sensor/iso-signal-chain.d.ts.map +1 -0
  436. package/dist/sensor/iso-signal-chain.js +411 -0
  437. package/dist/sensor/iso-signal-chain.js.map +1 -0
  438. package/dist/sensor/local-exposure-binding.d.ts +87 -0
  439. package/dist/sensor/local-exposure-binding.d.ts.map +1 -0
  440. package/dist/sensor/local-exposure-binding.js +214 -0
  441. package/dist/sensor/local-exposure-binding.js.map +1 -0
  442. package/dist/sensor/optical-stack.d.ts.map +1 -1
  443. package/dist/sensor/optical-stack.js +17 -0
  444. package/dist/sensor/optical-stack.js.map +1 -1
  445. package/dist/sensor/photon-energy.d.ts +97 -0
  446. package/dist/sensor/photon-energy.d.ts.map +1 -0
  447. package/dist/sensor/photon-energy.js +390 -0
  448. package/dist/sensor/photon-energy.js.map +1 -0
  449. package/dist/sensor/physical-charge-capacity.d.ts +130 -0
  450. package/dist/sensor/physical-charge-capacity.d.ts.map +1 -0
  451. package/dist/sensor/physical-charge-capacity.js +345 -0
  452. package/dist/sensor/physical-charge-capacity.js.map +1 -0
  453. package/dist/sensor/pixel-pitch.d.ts +6 -0
  454. package/dist/sensor/pixel-pitch.d.ts.map +1 -1
  455. package/dist/sensor/pixel-pitch.js +6 -0
  456. package/dist/sensor/pixel-pitch.js.map +1 -1
  457. package/dist/sensor/radiometry-readiness.d.ts +10 -0
  458. package/dist/sensor/radiometry-readiness.d.ts.map +1 -1
  459. package/dist/sensor/radiometry-readiness.js +10 -0
  460. package/dist/sensor/radiometry-readiness.js.map +1 -1
  461. package/dist/sensor/raw-readout.d.ts +314 -0
  462. package/dist/sensor/raw-readout.d.ts.map +1 -0
  463. package/dist/sensor/raw-readout.js +914 -0
  464. package/dist/sensor/raw-readout.js.map +1 -0
  465. package/dist/sensor/raw-reconstruction.d.ts +170 -0
  466. package/dist/sensor/raw-reconstruction.d.ts.map +1 -0
  467. package/dist/sensor/raw-reconstruction.js +424 -0
  468. package/dist/sensor/raw-reconstruction.js.map +1 -0
  469. package/dist/sensor/readout-exposure-linkage.d.ts +12 -0
  470. package/dist/sensor/readout-exposure-linkage.d.ts.map +1 -1
  471. package/dist/sensor/readout-exposure-linkage.js +12 -0
  472. package/dist/sensor/readout-exposure-linkage.js.map +1 -1
  473. package/dist/sensor/readout-timing.d.ts +13 -0
  474. package/dist/sensor/readout-timing.d.ts.map +1 -1
  475. package/dist/sensor/readout-timing.js +13 -0
  476. package/dist/sensor/readout-timing.js.map +1 -1
  477. package/dist/sensor/response-application-compatibility.d.ts +136 -0
  478. package/dist/sensor/response-application-compatibility.d.ts.map +1 -0
  479. package/dist/sensor/response-application-compatibility.js +408 -0
  480. package/dist/sensor/response-application-compatibility.js.map +1 -0
  481. package/dist/sensor/response-operating-range.d.ts +173 -0
  482. package/dist/sensor/response-operating-range.d.ts.map +1 -0
  483. package/dist/sensor/response-operating-range.js +672 -0
  484. package/dist/sensor/response-operating-range.js.map +1 -0
  485. package/dist/sensor/responsivity-photocurrent.d.ts +158 -0
  486. package/dist/sensor/responsivity-photocurrent.d.ts.map +1 -0
  487. package/dist/sensor/responsivity-photocurrent.js +644 -0
  488. package/dist/sensor/responsivity-photocurrent.js.map +1 -0
  489. package/dist/sensor/sampling-aperture.d.ts.map +1 -1
  490. package/dist/sensor/sampling-aperture.js +14 -0
  491. package/dist/sensor/sampling-aperture.js.map +1 -1
  492. package/dist/sensor/scene-eqe-temporal-exposure.d.ts +45 -0
  493. package/dist/sensor/scene-eqe-temporal-exposure.d.ts.map +1 -0
  494. package/dist/sensor/scene-eqe-temporal-exposure.js +64 -0
  495. package/dist/sensor/scene-eqe-temporal-exposure.js.map +1 -0
  496. package/dist/sensor/sensor-geometry.d.ts +12 -0
  497. package/dist/sensor/sensor-geometry.d.ts.map +1 -1
  498. package/dist/sensor/sensor-geometry.js +12 -0
  499. package/dist/sensor/sensor-geometry.js.map +1 -1
  500. package/dist/sensor/signal-noise.d.ts +10 -0
  501. package/dist/sensor/signal-noise.d.ts.map +1 -1
  502. package/dist/sensor/signal-noise.js +10 -0
  503. package/dist/sensor/signal-noise.js.map +1 -1
  504. package/dist/sensor/spatial-sample-reduction.d.ts +44 -1
  505. package/dist/sensor/spatial-sample-reduction.d.ts.map +1 -1
  506. package/dist/sensor/spatial-sample-reduction.js +51 -5
  507. package/dist/sensor/spatial-sample-reduction.js.map +1 -1
  508. package/dist/sensor/spatial-sampling-quadrature.d.ts +24 -0
  509. package/dist/sensor/spatial-sampling-quadrature.d.ts.map +1 -1
  510. package/dist/sensor/spatial-sampling-quadrature.js +27 -0
  511. package/dist/sensor/spatial-sampling-quadrature.js.map +1 -1
  512. package/dist/sensor/spatio-spectral-reduction.d.ts +187 -0
  513. package/dist/sensor/spatio-spectral-reduction.d.ts.map +1 -0
  514. package/dist/sensor/spatio-spectral-reduction.js +373 -0
  515. package/dist/sensor/spatio-spectral-reduction.js.map +1 -0
  516. package/dist/sensor/spectral-coverage.d.ts +24 -0
  517. package/dist/sensor/spectral-coverage.d.ts.map +1 -0
  518. package/dist/sensor/spectral-coverage.js +86 -0
  519. package/dist/sensor/spectral-coverage.js.map +1 -0
  520. package/dist/sensor/spectral-quadrature.d.ts +169 -0
  521. package/dist/sensor/spectral-quadrature.d.ts.map +1 -0
  522. package/dist/sensor/spectral-quadrature.js +542 -0
  523. package/dist/sensor/spectral-quadrature.js.map +1 -0
  524. package/dist/sensor/spectral-response.d.ts +192 -0
  525. package/dist/sensor/spectral-response.d.ts.map +1 -0
  526. package/dist/sensor/spectral-response.js +664 -0
  527. package/dist/sensor/spectral-response.js.map +1 -0
  528. package/dist/sensor/temporal-eqe-sum.d.ts +15 -0
  529. package/dist/sensor/temporal-eqe-sum.d.ts.map +1 -0
  530. package/dist/sensor/temporal-eqe-sum.js +30 -0
  531. package/dist/sensor/temporal-eqe-sum.js.map +1 -0
  532. package/dist/sensor/temporal-photo-signal.d.ts +38 -0
  533. package/dist/sensor/temporal-photo-signal.d.ts.map +1 -0
  534. package/dist/sensor/temporal-photo-signal.js +110 -0
  535. package/dist/sensor/temporal-photo-signal.js.map +1 -0
  536. package/dist/sensor/temporal-sample-binding.d.ts +6 -0
  537. package/dist/sensor/temporal-sample-binding.d.ts.map +1 -0
  538. package/dist/sensor/temporal-sample-binding.js +32 -0
  539. package/dist/sensor/temporal-sample-binding.js.map +1 -0
  540. package/dist/simulation/poc-simulation.d.ts.map +1 -1
  541. package/dist/simulation/poc-simulation.js +34 -11
  542. package/dist/simulation/poc-simulation.js.map +1 -1
  543. package/dist/stabilization/camera-shake.d.ts +11 -0
  544. package/dist/stabilization/camera-shake.d.ts.map +1 -1
  545. package/dist/stabilization/camera-shake.js +11 -0
  546. package/dist/stabilization/camera-shake.js.map +1 -1
  547. package/dist/stabilization/system.d.ts +218 -0
  548. package/dist/stabilization/system.d.ts.map +1 -0
  549. package/dist/stabilization/system.js +695 -0
  550. package/dist/stabilization/system.js.map +1 -0
  551. package/docs/API_REFERENCE.md +2017 -0
  552. package/docs/API_STYLE.md +132 -0
  553. package/docs/ARCHITECTURE.md +134 -24
  554. package/docs/AUTOMATION_COORDINATION.md +2 -0
  555. package/docs/CAPTURE_COLOR.md +25 -0
  556. package/docs/CAPTURE_CORRECTED_SDR.md +25 -0
  557. package/docs/CAPTURE_EXPORT_METADATA.md +27 -0
  558. package/docs/CAPTURE_SDR.md +20 -0
  559. package/docs/DEVELOPERS.md +60 -0
  560. package/docs/DIGITAL_OPTICS_FOUNDATION.md +69 -0
  561. package/docs/ENVIRONMENT_RAW_CAPTURE.md +187 -0
  562. package/docs/EXPORT_ACCEPTANCE.md +133 -0
  563. package/docs/GENERIC_TIER_PRESETS.md +269 -0
  564. package/docs/GEOMETRIC_PREPARATION_REUSE.md +141 -0
  565. package/docs/IMAGE_FORMATION.md +80 -10
  566. package/docs/LINEAR_CAPTURE_ENCODING.md +25 -0
  567. package/docs/MOTION_AND_SIGNAL.md +5 -3
  568. package/docs/NUMERICAL_CORRECTNESS.md +191 -0
  569. package/docs/PERFORMANCE_BASELINE.md +56 -0
  570. package/docs/PHOTOGRAPHIC_EXPORT.md +206 -0
  571. package/docs/PHYSICS_FOUNDATION.md +152 -5
  572. package/docs/POC_API.md +2 -0
  573. package/docs/POC_PROJECTION_REUSE.md +124 -0
  574. package/docs/PROCESSED_OUTPUT.md +157 -0
  575. package/docs/PRODUCTION_COMPOSITION.md +373 -0
  576. package/docs/PRODUCTION_ENVIRONMENT_CAPTURE.md +131 -0
  577. package/docs/PROVENANCE.md +4 -0
  578. package/docs/PSF_FOUNDATION.md +110 -88
  579. package/docs/RAW_FRAME_ENVELOPE.md +56 -0
  580. package/docs/RAW_FRAME_RECONSTRUCTION.md +30 -0
  581. package/docs/RELEASE_1_0.md +65 -0
  582. package/docs/RELEASE_AUDIT.md +38 -0
  583. package/docs/SCENE_RADIANCE_AND_ILLUMINATION.md +298 -0
  584. package/docs/SCENE_SENSOR_QUADRATURE.md +98 -0
  585. package/docs/SCENE_SENSOR_TEMPORAL_EXPOSURE.md +86 -0
  586. package/docs/SCIENTIFIC_ASSURANCE.md +280 -0
  587. package/docs/SCIENTIFIC_CONFORMANCE.md +83 -0
  588. package/docs/SDR_RENDERING.md +33 -0
  589. package/docs/SENSOR_ENVIRONMENT_QUERY.md +86 -0
  590. package/docs/SENSOR_EQE_LOCAL_EXPOSURE.md +104 -0
  591. package/docs/SENSOR_EQE_TEMPORAL_EXPOSURE.md +74 -0
  592. package/docs/SENSOR_PSF_QUADRATURE.md +90 -0
  593. package/docs/SENSOR_RAW_FRAME.md +20 -0
  594. package/docs/SENSOR_RAW_PRODUCER.md +77 -0
  595. package/docs/SIGNAL_CONFORMANCE.md +23 -0
  596. package/docs/SIMULATED_CAPTURE.md +65 -0
  597. package/docs/STABILIZATION.md +160 -17
  598. package/docs/TEMPORAL_PHOTO_RAW.md +83 -0
  599. package/docs/TIER_ACCEPTANCE.md +129 -0
  600. package/docs/TIER_PRESET_ACCEPTANCE.md +59 -0
  601. package/docs/USAGE.md +5050 -1047
  602. package/docs/V1_COMPOSITION_MAP.md +123 -0
  603. package/docs/V1_HELPER_REUSE_REVIEW.md +60 -0
  604. package/docs/V1_PERFORMANCE_DISPOSITION.md +88 -0
  605. package/docs/api/camera-equivalent-focal-length.md +53 -0
  606. package/docs/api/camera-field-of-view.md +119 -0
  607. package/docs/api/camera-projected-object-size.md +54 -0
  608. package/docs/api/capture-capture-export-metadata.md +107 -0
  609. package/docs/api/capture-environment-raw-producer.md +56 -0
  610. package/docs/api/capture-focus-control.md +419 -0
  611. package/docs/api/capture-linear-encoding.md +99 -0
  612. package/docs/api/capture-photographic-export.md +172 -0
  613. package/docs/api/capture-raw-frame-reconstruction.md +87 -0
  614. package/docs/api/capture-release-sequence.md +252 -0
  615. package/docs/api/capture-sensor-raw-frame.md +66 -0
  616. package/docs/api/capture-sensor-raw-producer.md +98 -0
  617. package/docs/api/capture-simulated-capture.md +179 -0
  618. package/docs/api/color-capture-color.md +122 -0
  619. package/docs/api/color-white-balance.md +386 -0
  620. package/docs/api/composition-image-formation-plan.md +825 -0
  621. package/docs/api/composition-plan-consumer.md +98 -0
  622. package/docs/api/core-calculation-result.md +220 -0
  623. package/docs/api/core-configuration-error.md +19 -0
  624. package/docs/api/core-image-formation.md +204 -0
  625. package/docs/api/core-scientific-assurance.md +214 -0
  626. package/docs/api/core-spectral-composition.md +268 -0
  627. package/docs/api/core-spectral.md +78 -0
  628. package/docs/api/core-validation.md +34 -0
  629. package/docs/api/core-version.md +14 -0
  630. package/docs/api/equipment-exposure-capabilities.md +270 -0
  631. package/docs/api/equipment-generic-tier-assets.md +82 -0
  632. package/docs/api/equipment-generic-tier-presets.md +103 -0
  633. package/docs/api/equipment-iso-capabilities.md +295 -0
  634. package/docs/api/equipment-metering-capabilities.md +126 -0
  635. package/docs/api/equipment-release-capabilities.md +91 -0
  636. package/docs/api/exports.json +5656 -0
  637. package/docs/api/exposure-exposure-duration-control.md +115 -0
  638. package/docs/api/exposure-exposure-mode-resolver.md +966 -0
  639. package/docs/api/exposure-exposure.md +150 -0
  640. package/docs/api/exposure-flash.md +327 -0
  641. package/docs/api/exposure-metering-scene-radiance.md +154 -0
  642. package/docs/api/exposure-metering-target.md +134 -0
  643. package/docs/api/exposure-metering-temporal.md +77 -0
  644. package/docs/api/exposure-metering.md +172 -0
  645. package/docs/api/exposure-program-line.md +64 -0
  646. package/docs/api/motion-camera-rotation.md +215 -0
  647. package/docs/api/motion-capture-rotation-inverse-mapping.md +128 -0
  648. package/docs/api/motion-capture-rotation-temporal-quadrature.md +127 -0
  649. package/docs/api/motion-capture-rotation-trajectory.md +132 -0
  650. package/docs/api/motion-capture-translation-parallax-temporal-quadrature.md +171 -0
  651. package/docs/api/motion-extended-object-projection.md +312 -0
  652. package/docs/api/motion-projected-motion.md +60 -0
  653. package/docs/api/optics-aperture.md +69 -0
  654. package/docs/api/optics-circle-of-confusion.md +46 -0
  655. package/docs/api/optics-complex-pupil-psf.md +193 -0
  656. package/docs/api/optics-depth-of-field.md +92 -0
  657. package/docs/api/optics-diffraction.md +46 -0
  658. package/docs/api/optics-focus-breathing.md +119 -0
  659. package/docs/api/optics-focus-state.md +64 -0
  660. package/docs/api/optics-front-of-lens-filter.md +263 -0
  661. package/docs/api/optics-illumination-vignetting.md +95 -0
  662. package/docs/api/optics-lateral-chromatic-aberration.md +225 -0
  663. package/docs/api/optics-lens-psf-profile.md +380 -0
  664. package/docs/api/optics-polygon-diffraction.md +68 -0
  665. package/docs/api/optics-profile-contract.md +47 -0
  666. package/docs/api/optics-psf-foundation.md +181 -0
  667. package/docs/api/optics-radial-distortion.md +194 -0
  668. package/docs/api/optics-scene-to-sensor-irradiance.md +371 -0
  669. package/docs/api/optics-scene-to-sensor-quadrature.md +78 -0
  670. package/docs/api/optics-sensor-environment-query.md +58 -0
  671. package/docs/api/optics-sensor-psf-quadrature.md +81 -0
  672. package/docs/api/optics-stray-light.md +109 -0
  673. package/docs/api/optics-thin-lens.md +53 -0
  674. package/docs/api/output-capture-corrected-sdr.md +71 -0
  675. package/docs/api/output-capture-geometry.md +500 -0
  676. package/docs/api/output-capture-sdr.md +69 -0
  677. package/docs/api/output-crop.md +47 -0
  678. package/docs/api/output-geometric-transforms.md +199 -0
  679. package/docs/api/output-lens-corrections.md +162 -0
  680. package/docs/api/output-sdr-rendering.md +122 -0
  681. package/docs/api/output-subject-framing-crop.md +59 -0
  682. package/docs/api/schema-camera.md +84 -0
  683. package/docs/api/schema-illumination-spectral.md +77 -0
  684. package/docs/api/schema-illumination-temporal.md +289 -0
  685. package/docs/api/schema-illumination.md +246 -0
  686. package/docs/api/schema-scene-radiance-temporal.md +215 -0
  687. package/docs/api/schema-scene-radiance.md +415 -0
  688. package/docs/api/schema-scene.md +105 -0
  689. package/docs/api/schema-validation.md +25 -0
  690. package/docs/api/sensor-accumulated-charge.md +273 -0
  691. package/docs/api/sensor-architecture.md +155 -0
  692. package/docs/api/sensor-camera-saturation-capacity.md +215 -0
  693. package/docs/api/sensor-capture-color-sampling-binding.md +323 -0
  694. package/docs/api/sensor-capture-mode-timing.md +123 -0
  695. package/docs/api/sensor-capture-mode.md +321 -0
  696. package/docs/api/sensor-color-sampling.md +228 -0
  697. package/docs/api/sensor-constant-rate-temporal-integration.md +152 -0
  698. package/docs/api/sensor-dark-current.md +227 -0
  699. package/docs/api/sensor-environment-photo-signal.md +77 -0
  700. package/docs/api/sensor-eqe-electron-rate.md +166 -0
  701. package/docs/api/sensor-eqe-local-exposure.md +68 -0
  702. package/docs/api/sensor-eqe-temporal-exposure.md +73 -0
  703. package/docs/api/sensor-exposure-window.md +183 -0
  704. package/docs/api/sensor-iso-signal-chain.md +264 -0
  705. package/docs/api/sensor-local-exposure-binding.md +126 -0
  706. package/docs/api/sensor-optical-stack.md +211 -0
  707. package/docs/api/sensor-photon-energy.md +149 -0
  708. package/docs/api/sensor-physical-charge-capacity.md +196 -0
  709. package/docs/api/sensor-pixel-pitch.md +41 -0
  710. package/docs/api/sensor-radiometry-readiness.md +240 -0
  711. package/docs/api/sensor-raw-readout.md +499 -0
  712. package/docs/api/sensor-raw-reconstruction.md +260 -0
  713. package/docs/api/sensor-readout-exposure-linkage.md +172 -0
  714. package/docs/api/sensor-readout-timing.md +209 -0
  715. package/docs/api/sensor-response-application-compatibility.md +256 -0
  716. package/docs/api/sensor-response-operating-range.md +293 -0
  717. package/docs/api/sensor-responsivity-photocurrent.md +245 -0
  718. package/docs/api/sensor-sampling-aperture.md +221 -0
  719. package/docs/api/sensor-scene-eqe-temporal-exposure.md +56 -0
  720. package/docs/api/sensor-sensor-geometry.md +143 -0
  721. package/docs/api/sensor-signal-noise.md +75 -0
  722. package/docs/api/sensor-spatial-sample-reduction.md +186 -0
  723. package/docs/api/sensor-spatial-sampling-quadrature.md +188 -0
  724. package/docs/api/sensor-spatio-spectral-reduction.md +217 -0
  725. package/docs/api/sensor-spectral-coverage.md +33 -0
  726. package/docs/api/sensor-spectral-quadrature.md +183 -0
  727. package/docs/api/sensor-spectral-response.md +291 -0
  728. package/docs/api/sensor-temporal-photo-signal.md +62 -0
  729. package/docs/api/simulation-poc-simulation.md +364 -0
  730. package/docs/api/stabilization-camera-shake.md +71 -0
  731. package/docs/api/stabilization-system.md +442 -0
  732. package/docs/benchmarks/2026-10-01-main-baseline.json +694 -0
  733. package/docs/benchmarks/2026-10-02-geometric-preparation-reuse.json +2190 -0
  734. package/docs/benchmarks/2026-10-02-poc-projection-reuse.json +2423 -0
  735. package/docs/benchmarks/2026-10-02-v1-environment-gc-profile.json +210 -0
  736. package/docs/benchmarks/2026-10-02-v1-environment-ordinary.json +187 -0
  737. package/docs/benchmarks/2026-10-02-v1-geometry-gc-profile.json +756 -0
  738. package/docs/benchmarks/2026-10-02-v1-geometry-ordinary-1.json +711 -0
  739. package/docs/benchmarks/2026-10-02-v1-geometry-ordinary-2.json +711 -0
  740. package/docs/benchmarks/2026-10-02-v1-poc-gc-profile.json +885 -0
  741. package/docs/benchmarks/2026-10-02-v1-poc-ordinary-1.json +868 -0
  742. package/docs/benchmarks/2026-10-02-v1-poc-ordinary-2.json +868 -0
  743. package/docs/examples/production-capture.mjs +34 -0
  744. package/docs/examples/production-request.json +4613 -0
  745. package/docs/examples/quick-start.mjs +12 -0
  746. package/docs/validation/documentation-fragments.json +212 -0
  747. package/docs/validation/release-audit-inventory.json +1306 -0
  748. package/docs/validation/tier-acceptance-report-v1.json +2538 -0
  749. package/package.json +15 -3
@@ -0,0 +1,273 @@
1
+ // SPDX-License-Identifier: Apache-2.0
2
+ /**
3
+ * Module boundary and integration notes.
4
+ * Validates independently supplied numeric profile evidence and binds the approximation to the exact
5
+ * CFA profile.
6
+ * Cheap geometry/topology preflight after RAW revalidation, before pixel execution.
7
+ * @see docs/PHOTOGRAPHIC_EXPORT.md for equations, coordinate/unit conventions, blockers and support
8
+ * limits.
9
+ */
10
+ // This product includes DNG technology under license by Adobe.
11
+ import { requireAllowlistedRecord, requirePublicOpaqueId } from "../core/record-validation.js";
12
+ import { stringifyCanonicalJson } from "../core/canonical-json.js";
13
+ import { InvalidConfigurationError } from "../core/configuration-error.js";
14
+ import { parseEvidenceList } from "../core/evidence-provenance.js";
15
+ import { LINEAR_CAPTURE_RGB_PROFILE } from "../color/capture-color.js";
16
+ import { invertSensorColorMatrix, prepareSensorColorDevelopment, sensorColorReferenceWhite } from "../color/sensor-color-development.js";
17
+ import { calculateSdrRendering, parseSdrRenderingProfile } from "../output/sdr-rendering.js";
18
+ import { transformOrientedRasterPointToNative, transformOrientedRasterRectToNative } from "../output/capture-geometry.js";
19
+ import { resolveRawFrameReconstruction, parseRawFrameReconstructionInput } from "./raw-frame-reconstruction.js";
20
+ import { createCaptureExportMetadataPair } from "./capture-export-metadata.js";
21
+ import { encodeExportJpeg } from "./export-jpeg.js";
22
+ import { packExportTiff, exportTiffAscii as ascii, exportTiffNumbers as numbers, exportTiffRationals as rationals, exportTiffBytes as rawBytes } from "./export-tiff.js";
23
+ import { calculateCaptureCorrectedSdr, parseCaptureCorrectionChoice } from "../output/capture-corrected-sdr.js";
24
+ import { resolveLensCorrectionPlan } from "../output/lens-corrections.js";
25
+ import { parseSimulatedCapture } from "./simulated-capture.js";
26
+ import { approximationResult } from "../core/calculation-result.js";
27
+ export const PHOTOGRAPHIC_EXPORT_SCHEMA_VERSION = "0.1.0";
28
+ function object(value, keys) {
29
+ return requireAllowlistedRecord(value, keys, "Invalid photographic export fields.");
30
+ }
31
+ function id(value) {
32
+ return requirePublicOpaqueId(value, "Invalid public export profile identity.");
33
+ }
34
+ /** Validates independently supplied numeric profile evidence and binds the approximation to the exact CFA profile. */
35
+ export function parseExportSensorColorProfile(value) {
36
+ const r = object(value, ["schemaVersion", "profileId", "profileVersion", "colorSamplingProfileId", "channelIds", "scientificStatus", "referenceIlluminant", "normalizedCameraChannelsToXyz", "evidence", "limitations"]);
37
+ const m = r.normalizedCameraChannelsToXyz;
38
+ if (r.schemaVersion !== "0.1.0" || r.scientificStatus !== "approximation" || r.referenceIlluminant !== "D65" || JSON.stringify(r.channelIds) !== '["red","green","blue"]' ||
39
+ !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)) ||
40
+ !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))
41
+ throw new InvalidConfigurationError("Unsupported sensor color interpretation.");
42
+ const matrix = m.map((row) => [...row]);
43
+ invertSensorColorMatrix(matrix);
44
+ const evidence = parseEvidenceList(r.evidence, "exportColor.evidence");
45
+ if (evidence.some((e) => e.reuseStatus === "factual-reference-only"))
46
+ throw new InvalidConfigurationError("Embedded numeric color profiles require reusable or owned evidence.");
47
+ return { schemaVersion: "0.1.0", profileId: id(r.profileId), profileVersion: id(r.profileVersion), colorSamplingProfileId: id(r.colorSamplingProfileId),
48
+ channelIds: ["red", "green", "blue"], scientificStatus: "approximation", referenceIlluminant: "D65", normalizedCameraChannelsToXyz: matrix, evidence, limitations: [...r.limitations] };
49
+ }
50
+ /** Cheap geometry/topology preflight after RAW revalidation, before pixel execution. */
51
+ export function validateProcessedSensorRawEnvelope(reconstruction, corrected) {
52
+ const frame = reconstruction.rawFrame, capture = frame.capture, g = capture.resolvedGeometry, active = g.activeCapture.nativeRect, crop = g.output.cropRect, raster = g.output.raster, region = reconstruction.region;
53
+ if (raster.pixelWidth !== crop.width || raster.pixelHeight !== crop.height)
54
+ throw new InvalidConfigurationError("Initial paired export requires 1:1 output crop sampling; resampling is unsupported.");
55
+ const local = transformOrientedRasterRectToNative({ rect: crop, nativeRaster: g.activeCapture.raster, orientation: capture.geometry.orientation });
56
+ const nativeDefaultCrop = { ...local, x: local.x + active.x, y: local.y + active.y };
57
+ if (nativeDefaultCrop.x < region.x || nativeDefaultCrop.y < region.y || nativeDefaultCrop.x + nativeDefaultCrop.width > region.x + region.width ||
58
+ nativeDefaultCrop.y + nativeDefaultCrop.height > region.y + region.height)
59
+ throw new InvalidConfigurationError("Reconstruction does not cover the exact declared final native crop.");
60
+ if (corrected && (active.x < region.x || active.y < region.y || active.x + active.width > region.x + region.width ||
61
+ active.y + active.height > region.y + region.height))
62
+ throw new InvalidConfigurationError("Corrected export requires reconstruction of the full active native RAW area.");
63
+ return { local, nativeDefaultCrop };
64
+ }
65
+ function requireDngTopology(frame) {
66
+ const layout = frame.colorSamplingProfile.layout;
67
+ if (layout.kind !== "periodic-mosaic" || layout.repeatWidthSites !== 2 || layout.repeatHeightSites !== 2 || !["red", "green", "green", "blue"].every((ch) => layout.siteChannelIds.includes(ch)) ||
68
+ layout.siteChannelIds.filter((ch) => ch === "red").length !== 1 || layout.siteChannelIds.filter((ch) => ch === "blue").length !== 1 ||
69
+ layout.siteChannelIds.filter((ch) => ch === "green").length !== 2)
70
+ throw new InvalidConfigurationError("Initial DNG profile supports explicitly registered 2x2 RGB Bayer topology only.");
71
+ }
72
+ /**
73
+ * Revalidates one attached RAW snapshot and explicit processing policy.
74
+ * Crop sampling and reconstruction coverage fail here before
75
+ * per-pixel execution. Successful parsing does not establish kernel edge support,
76
+ * correction support or container encoding readiness; those retain execution
77
+ * checks. Input is copied; no file or display backend runs.
78
+ */
79
+ export function parseProcessedSensorRawInput(value) {
80
+ const r = object(value, ["reconstruction", "colorProfile", "whiteBalance", "rendering", "correction"]);
81
+ const reconstruction = parseRawFrameReconstructionInput(r.reconstruction), colorProfile = parseExportSensorColorProfile(r.colorProfile), rendering = parseSdrRenderingProfile(r.rendering);
82
+ const intent = reconstruction.rawFrame.capture.whiteBalanceIntent;
83
+ if (colorProfile.colorSamplingProfileId !== reconstruction.rawFrame.colorSamplingProfile.profileId ||
84
+ reconstruction.phaseProfiles.some((p) => JSON.stringify(p.profile.kernels.map((k) => k.outputChannelId)) !== JSON.stringify(colorProfile.channelIds)) ||
85
+ (r.whiteBalance !== "not-required" && r.whiteBalance !== "apply-resolved-sensor-gains") ||
86
+ ((r.whiteBalance === "not-required") !== (intent === null)))
87
+ throw new InvalidConfigurationError("Processed RAW color/WB/rendering identities are inconsistent.");
88
+ const correction = r.correction === undefined ? undefined : parseCaptureCorrectionChoice(r.correction, reconstruction.rawFrame.capture, ["photivra-export-developed"]);
89
+ if (correction?.resampler.antialias !== undefined && correction.resampler.antialias !== "none") {
90
+ throw new InvalidConfigurationError("RAW-derived processing has no source prefilter; prefiltered declarations are unsupported.");
91
+ }
92
+ validateProcessedSensorRawEnvelope(reconstruction, correction !== undefined);
93
+ return { reconstruction, colorProfile, whiteBalance: r.whiteBalance, rendering, ...(correction === undefined ? {} : { correction }) };
94
+ }
95
+ /** Adds file metadata/encoding validation to the shared processed RAW policy. */
96
+ export function parsePhotographicExportInput(value) {
97
+ const r = object(value, ["reconstruction", "colorProfile", "whiteBalance", "rendering", "metadata", "sceneProfile", "jpegQuantizationStep", "correction"]);
98
+ const processed = parseProcessedSensorRawInput({ reconstruction: r.reconstruction, colorProfile: r.colorProfile, whiteBalance: r.whiteBalance, rendering: r.rendering,
99
+ ...(r.correction === undefined ? {} : { correction: r.correction }) });
100
+ requireDngTopology(processed.reconstruction.rawFrame);
101
+ if (processed.rendering.bitDepth !== 8)
102
+ throw new InvalidConfigurationError("Initial JPEG export requires 8-bit SDR.");
103
+ const meta = object(r.metadata, ["workflow", "capturedAtUtc", "raw", "jpeg"]);
104
+ const metadata = createCaptureExportMetadataPair({ ...meta, capture: processed.reconstruction.rawFrame.capture });
105
+ const scene = object(r.sceneProfile, ["id", "version", "sceneStateId"]), sceneProfile = { id: id(scene.id), version: id(scene.version), sceneStateId: id(scene.sceneStateId) };
106
+ if (sceneProfile.sceneStateId !== processed.reconstruction.rawFrame.capture.sceneStateId || !Number.isInteger(r.jpegQuantizationStep) ||
107
+ r.jpegQuantizationStep < 1 || r.jpegQuantizationStep > 255)
108
+ throw new InvalidConfigurationError("Export scene identity or encoder settings are inconsistent.");
109
+ return { ...processed, sceneProfile, metadata: { workflow: metadata.shared.workflow, capturedAtUtc: metadata.shared.capturedAtUtc,
110
+ raw: { documentId: metadata.raw.documentId, instanceId: metadata.raw.instanceId }, jpeg: { documentId: metadata.jpeg.documentId, instanceId: metadata.jpeg.instanceId } },
111
+ jpegQuantizationStep: r.jpegQuantizationStep };
112
+ }
113
+ function canonical(value) {
114
+ return stringifyCanonicalJson(value, {
115
+ undefinedObjectProperties: "reject",
116
+ nonFiniteNumberMessage: "Export hash requires finite canonical JSON.",
117
+ unsupportedValueMessage: "Export hash requires finite canonical JSON."
118
+ });
119
+ }
120
+ async function hash(value) {
121
+ if (!globalThis.crypto?.subtle)
122
+ throw new InvalidConfigurationError("Paired export requires Web Crypto SHA-256 in this execution context.");
123
+ const data = typeof value === "string" ? new TextEncoder().encode(value) : new Uint8Array(value);
124
+ const result = await globalThis.crypto.subtle.digest("SHA-256", data);
125
+ return Array.from(new Uint8Array(result), (v) => v.toString(16).padStart(2, "0")).join("");
126
+ }
127
+ function xmp(pair, role, simulationHash, color, mode, scene, corrected) {
128
+ const s = pair.shared, artifact = pair[role];
129
+ const values = { "xmp:CreatorTool": s.creatorTool, "xmpMM:DocumentID": "uuid:" + artifact.documentId, "xmpMM:InstanceID": "uuid:" + artifact.instanceId,
130
+ "Iptc4xmpExt:DigitalImageGUID": "urn:uuid:" + artifact.documentId, "Iptc4xmpExt:DigitalSourceType": s.digitalSourceTypeUri,
131
+ "photivra:SchemaVersion": "1.0", "photivra:SimulatedCapture": "True", "photivra:CaptureID": s.captureId, "photivra:OutputRole": role,
132
+ "photivra:EngineVersion": s.engineApiVersion, "photivra:CaptureContractVersion": s.captureContractVersion, "photivra:RawPipelineVersion": "0.1.0",
133
+ "photivra:SceneID": scene.id, "photivra:SceneVersion": scene.version, "photivra:SensorProfileID": color.profileId, "photivra:CaptureMode": mode, "photivra:RawSampleModel": "post_adc_pre_demosaic",
134
+ "photivra:DeterministicSeed": String(s.noise.seedUint32), "photivra:SimulationHashAlgorithm": "sha-256", "photivra:SimulationHash": simulationHash,
135
+ "photivra:SceneTime": String(s.sceneTimeSeconds) };
136
+ if (corrected) {
137
+ values["photivra:CorrectionProfileID"] = corrected.choice.profile.id;
138
+ values["photivra:CorrectionProfileVersion"] = corrected.choice.profile.version;
139
+ values["photivra:CorrectionSelectionKind"] = corrected.choice.selectionKind;
140
+ values["photivra:CorrectionSelections"] = canonical(corrected.choice.selections);
141
+ values["photivra:CorrectionDisposition"] = role === "raw" ? "informational-intent-only" : "processed-view";
142
+ values["photivra:ProcessedOutputRect"] = canonical(corrected.rect);
143
+ values["photivra:ProcessedIlluminationClippingEvents"] = String(corrected.clippingEvents);
144
+ }
145
+ if (role === "jpeg")
146
+ values["photivra:ProcessedPipelineVersion"] = PHOTOGRAPHIC_EXPORT_SCHEMA_VERSION;
147
+ if (s.focus.kind === "finite")
148
+ values["photivra:FocusDistanceMeters"] = String(s.focus.distanceM);
149
+ const escape = (v) => v.replaceAll("&", "&amp;").replaceAll('"', "&quot;").replaceAll("<", "&lt;").replaceAll(">", "&gt;");
150
+ const attributes = Object.entries(values).map(([k, v]) => k + '="' + escape(v) + '"').join(" ");
151
+ 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>');
152
+ }
153
+ function commonExif(pair, role, width, height) {
154
+ const s = pair.shared, e = s.exposure;
155
+ if (!Number.isInteger(e.iso) || e.iso > 65535)
156
+ throw new InvalidConfigurationError("Initial export records only integer virtual REI values up to 65535.");
157
+ const date = s.capturedAtUtc.slice(0, 19).replaceAll("-", ":").replace("T", " ");
158
+ return [rawBytes(36864, 7, new TextEncoder().encode("0232")), rationals(33434, false, [e.shutterSeconds]), rationals(33437, false, [e.aperture]),
159
+ 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)),
160
+ rationals(37386, false, [e.focalLengthMm]), numbers(40962, 4, [width]), numbers(40963, 4, [height]), numbers(40961, 3, [role === "jpeg" ? 1 : 65535]),
161
+ ascii(42016, pair[role].documentId.replaceAll("-", "")),
162
+ ...(Math.round(s.equivalentFocalLength35Mm) <= 65535 ? [numbers(41989, 3, [Math.round(s.equivalentFocalLength35Mm)])] : [])];
163
+ }
164
+ function identity(pair, orientation) {
165
+ return [ascii(271, pair.shared.make), ascii(272, pair.shared.model), ascii(305, pair.shared.software), numbers(274, 3, [orientation])];
166
+ }
167
+ /** Reconstruct exact attached RAW, develop color/WB once, correct, orient/crop and encode SDR; no file/display IO. */
168
+ export function calculateProcessedSensorRaw(input) {
169
+ const v = structuredClone(parseProcessedSensorRawInput(input));
170
+ const source = resolveRawFrameReconstruction(v.reconstruction), frame = source.value.rawFrame, capture = frame.capture, g = capture.resolvedGeometry, active = g.activeCapture.nativeRect, crop = g.output.cropRect, raster = g.output.raster, region = source.value.region;
171
+ const { nativeDefaultCrop } = validateProcessedSensorRawEnvelope(v.reconstruction, v.correction !== undefined);
172
+ const colorMatrix = invertSensorColorMatrix(v.colorProfile.normalizedCameraChannelsToXyz), cameraWhite = sensorColorReferenceWhite(colorMatrix), intent = capture.whiteBalanceIntent, gains = intent ? [intent.channelGains.red, intent.channelGains.green, intent.channelGains.blue] : [1, 1, 1];
173
+ const development = prepareSensorColorDevelopment(v.colorProfile.normalizedCameraChannelsToXyz, gains), white = development.referenceWhiteXyz;
174
+ if (cameraWhite.some((x) => x <= 0 || !Number.isFinite(x)))
175
+ throw new InvalidConfigurationError("DNG reference white must map to positive camera-neutral coordinates.");
176
+ const developedRaster = v.correction ? g.orientedCapture.raster : raster, developedRect = v.correction ? { x: 0, y: 0, width: developedRaster.pixelWidth, height: developedRaster.pixelHeight } : crop;
177
+ const rgb = [];
178
+ for (let y = 0; y < developedRaster.pixelHeight; y++)
179
+ for (let x = 0; x < developedRaster.pixelWidth; x++) {
180
+ const p = transformOrientedRasterPointToNative({ point: { x: developedRect.x + x + .5, y: developedRect.y + y + .5 }, nativeRaster: g.activeCapture.raster, orientation: capture.geometry.orientation });
181
+ const index = ((Math.floor(p.y) + active.y - region.y) * region.width + Math.floor(p.x) + active.x - region.x) * 3;
182
+ const values = source.value.linearPlane.samples.slice(index, index + 3);
183
+ rgb.push(...development.develop(values));
184
+ }
185
+ // Only exact attached RAW reconstruction supplies this private processing plane. Original float planes are discarded.
186
+ const correction = v.correction ? calculateCaptureCorrectedSdr({ capture: parseSimulatedCapture({ ...capture, planes: [{
187
+ id: "photivra-export-linear", imageStateId: "photivra-export-developed", imageState: "color-transformed-linear-rgb",
188
+ rasterBinding: "oriented-active-capture", pixelWidth: developedRaster.pixelWidth, pixelHeight: developedRaster.pixelHeight,
189
+ channelIds: ["red", "green", "blue"], colorProfile: LINEAR_CAPTURE_RGB_PROFILE, encodingReferenceWhiteXyz: white, referenceWhiteValue: 1,
190
+ whiteBalanceApplication: intent ? "applied-rgb-gains" : "not-applicable", captureSaturation: { kind: "not-modeled" },
191
+ appliedTransforms: [{ kind: "linear-color", profile: { id: v.colorProfile.profileId, version: v.colorProfile.profileVersion } }],
192
+ storage: { kind: "inline-float64", samples: rgb }
193
+ }] }), sourcePlaneId: "photivra-export-linear", color: { kind: "already-transformed" }, profile: v.rendering, correction: v.correction }) : null;
194
+ const rawCorrectionIntent = v.correction ? resolveLensCorrectionPlan({ profile: v.correction.profile, state: v.correction.state,
195
+ selections: v.correction.selections, selectionKind: v.correction.selectionKind, outputKind: "raw-like" }) : null;
196
+ const processedOutputView = correction ? { rect: correction.value.outputView.rect, pixelWidth: correction.value.outputView.pixelWidth,
197
+ pixelHeight: correction.value.outputView.pixelHeight } : { rect: { x: 0, y: 0, width: raster.pixelWidth, height: raster.pixelHeight },
198
+ pixelWidth: raster.pixelWidth, pixelHeight: raster.pixelHeight };
199
+ const rendering = correction?.value.rendering ?? calculateSdrRendering({ sourceImageStateId: frame.frameId + ":developed", inputImageState: "color-transformed-linear-rgb", inputColorSpace: "linear-srgb-d65",
200
+ whiteBalanceHandling: intent ? "already-applied-upstream" : "not-required", pixelWidth: raster.pixelWidth, pixelHeight: raster.pixelHeight, referenceWhiteValue: 1, samples: rgb, profile: v.rendering });
201
+ return approximationResult({ inputDomain: "post-adc-native-sensor-raw", colorProfile: v.colorProfile, whiteBalancePolicy: v.whiteBalance, outputDomain: "output-referred-srgb-d65-sdr", physicalCaptureModified: false,
202
+ displayAdaptationApplied: false, whiteBalance: intent ? "applied-here" : "not-required", source, rendering, nativeDefaultCrop, processedOutputView, correction, rawCorrectionIntent }, "processed-sensor-raw-sdr", "0.1.0", [
203
+ "Exact attached RAW feeds explicit approximate sensor color development; WB is applied once before correction and SDR.",
204
+ "Output is encoded sRGB/D65 SDR; platform viewing adaptation and HDR encoding are not applied.",
205
+ "Bounded reference reconstruction, correction support and 1:1 output crop remain explicit; physical capture is unchanged."
206
+ ]);
207
+ }
208
+ /**
209
+ * Serialize one authoritative RAW capture to a lossless uncompressed CFA DNG and an independently
210
+ * packed baseline JPEG. Shared metadata comes from the committed capture; orientation/WB/rendering
211
+ * never rewrite native RAW codes.
212
+ *
213
+ * Paired export preserves one revalidated native post-ADC RAW frame for DNG and develops that same
214
+ * frame through explicit reconstruction, approximate sensor-channel color/WB and SDR policy for JPEG.
215
+ * File identity and RAW data identity are distinct. Hashing is asynchronous; input data is copied
216
+ * before the first await. Full-native execution is limited to 4096 sites.
217
+ * @param input - PhotographicExportInput. See the linked contract for coordinate, unit and profile binding semantics.
218
+ * @returns Promise<PhotographicExportPair>. Return shape and scientific status are explicit; no calibration is inferred from successful execution.
219
+ *
220
+ * @see docs/API_REFERENCE.md for the root export and exact type graph.
221
+ */
222
+ export async function createPhotographicExportPair(input) {
223
+ // Copy validated inputs into private owned values before the first async boundary to prevent hash/encoding races.
224
+ const v = JSON.parse(JSON.stringify(parsePhotographicExportInput(input)));
225
+ const processed = calculateProcessedSensorRaw({ reconstruction: v.reconstruction, colorProfile: v.colorProfile, whiteBalance: v.whiteBalance, rendering: v.rendering,
226
+ ...(v.correction === undefined ? {} : { correction: v.correction }) }).value;
227
+ const { source, rendering, nativeDefaultCrop, processedOutputView, correction, rawCorrectionIntent } = processed;
228
+ const frame = source.value.rawFrame, capture = frame.capture, g = capture.resolvedGeometry, active = g.activeCapture.nativeRect, region = source.value.region;
229
+ const metadata = createCaptureExportMetadataPair({ ...v.metadata, capture });
230
+ const { local } = validateProcessedSensorRawEnvelope(v.reconstruction, v.correction !== undefined);
231
+ const colorMatrix = invertSensorColorMatrix(v.colorProfile.normalizedCameraChannelsToXyz), cameraWhite = sensorColorReferenceWhite(colorMatrix), intent = capture.whiteBalanceIntent;
232
+ const gains = intent ? [intent.channelGains.red, intent.channelGains.green, intent.channelGains.blue] : [1, 1, 1];
233
+ const neutral = cameraWhite.map((x, i) => x / gains[i]), scale = neutral[1];
234
+ const correctedMetadata = v.correction && correction ? { choice: v.correction, rect: processedOutputView.rect,
235
+ clippingEvents: correction.value.correction.value.illuminationClippingEventCount } : undefined;
236
+ const layout = frame.colorSamplingProfile.layout;
237
+ if (layout.kind !== "periodic-mosaic")
238
+ throw new InvalidConfigurationError("Initial DNG profile supports explicitly registered 2x2 RGB Bayer topology only.");
239
+ const whiteLevel = frame.samples[0].digitalSaturationCode, black = [];
240
+ for (let py = 0; py < 2; py++)
241
+ for (let px = 0; px < 2; px++) {
242
+ const found = frame.samples.filter((s) => s.colorSamplingSite.x % 2 === px && s.colorSamplingSite.y % 2 === py), first = found[0];
243
+ if (!first || found.some((s) => s.blackLevelCode !== first.blackLevelCode || s.digitalSaturationCode !== whiteLevel))
244
+ throw new InvalidConfigurationError("DNG requires a fixed repeating black tile and one common WhiteLevel.");
245
+ black.push(first.blackLevelCode);
246
+ }
247
+ const simulationHash = await hash(canonical({ schema: PHOTOGRAPHIC_EXPORT_SCHEMA_VERSION, rawFrame: frame, phaseProfiles: source.value.phaseProfiles, region,
248
+ colorProfile: v.colorProfile, sceneProfile: v.sceneProfile, whiteBalance: v.whiteBalance, rendering: v.rendering, jpegQuantizationStep: v.jpegQuantizationStep,
249
+ ...(v.correction ? { correction: v.correction } : {}) }));
250
+ const rawHash = await hash(canonical({ schema: "photivra-raw-data-id-0.1", width: frame.nativePixelWidth, height: frame.nativePixelHeight,
251
+ cfa: layout, containerBitDepth: 16, codes: frame.samples.map((s) => s.rawCode) })), rawDataUniqueId = rawHash.slice(0, 32);
252
+ const colorHash = await hash(canonical(v.colorProfile)), uniqueCameraModel = "Photivra Virtual Camera " + v.colorProfile.profileId + " " + v.colorProfile.profileVersion + " " + colorHash;
253
+ const orientation = { landscape: 1, "portrait-clockwise": 6, "landscape-inverted": 3, "portrait-counter-clockwise": 8 }[capture.geometry.orientation];
254
+ const pixels = new Uint8Array(frame.samples.length * 2), view = new DataView(pixels.buffer);
255
+ frame.samples.forEach((s, i) => view.setUint16(i * 2, s.rawCode, true));
256
+ const strip = { ...numbers(273, 4, [0]), pointer: "pixels" };
257
+ const dngBytes = packExportTiff([...identity(metadata, orientation), numbers(254, 4, [0]), numbers(256, 4, [frame.nativePixelWidth]), numbers(257, 4, [frame.nativePixelHeight]),
258
+ 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]),
259
+ numbers(284, 3, [1]), numbers(339, 3, [1]), numbers(33421, 3, [2, 2]), numbers(33422, 1, layout.siteChannelIds.map((ch) => ["red", "green", "blue"].indexOf(ch))),
260
+ numbers(50706, 1, [1, 1, 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]),
261
+ rationals(50714, false, black), numbers(50717, 4, [whiteLevel]), numbers(50719, 4, [local.x, local.y]), numbers(50720, 4, [local.width, local.height]),
262
+ rationals(50721, true, colorMatrix.flat()), rationals(50728, false, neutral.map((n) => n / scale)), numbers(50778, 3, [21]),
263
+ rawBytes(50781, 1, Uint8Array.from(rawDataUniqueId.match(/../g).map((s) => parseInt(s, 16)))), numbers(50829, 4, [active.y, active.x, active.y + active.height, active.x + active.width]),
264
+ rawBytes(700, 1, xmp(metadata, "raw", simulationHash, v.colorProfile, frame.modeId, v.sceneProfile, correctedMetadata))], commonExif(metadata, "raw", local.width, local.height), pixels);
265
+ const jpegExif = packExportTiff(identity(metadata, 1), commonExif(metadata, "jpeg", processedOutputView.pixelWidth, processedOutputView.pixelHeight));
266
+ const jpegBytes = encodeExportJpeg({ width: processedOutputView.pixelWidth, height: processedOutputView.pixelHeight, samples: rendering.value.integerSamples,
267
+ quantizationStep: v.jpegQuantizationStep, exif: jpegExif, xmp: xmp(metadata, "jpeg", simulationHash, v.colorProfile, frame.modeId, v.sceneProfile, correctedMetadata) });
268
+ return { schemaVersion: PHOTOGRAPHIC_EXPORT_SCHEMA_VERSION, metadata, simulationHashAlgorithm: "sha-256", simulationHash, rawDataUniqueId, uniqueCameraModel, source, rendering, nativeDefaultCrop, processedOutputView, correction, rawCorrectionIntent,
269
+ imageDataPairing: "jpeg-generated-from-exact-attached-raw",
270
+ dng: { mediaType: "image/dng", bytes: dngBytes, sha256: await hash(dngBytes) }, jpeg: { mediaType: "image/jpeg", bytes: jpegBytes, sha256: await hash(jpegBytes) },
271
+ interoperability: "independent-decode-required-editor-validation-pending" };
272
+ }
273
+ //# sourceMappingURL=photographic-export.js.map
@@ -0,0 +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,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,6BAA6B,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACzI,OAAO,EAAE,qBAAqB,EAAE,wBAAwB,EAAqD,MAAM,4BAA4B,CAAC;AAChJ,OAAO,EAAE,oCAAoC,EAAE,mCAAmC,EAAmB,MAAM,+BAA+B,CAAC;AAC3I,OAAO,EAAE,6BAA6B,EAAE,gCAAgC,EAAiE,MAAM,+BAA+B,CAAC;AAC/K,OAAO,EAAE,+BAA+B,EAAmE,MAAM,8BAA8B,CAAC;AAChJ,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,eA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AQ,EAAC,GAAG,EAAC,GAAG,CAAC,QAAQ,EAAC,MAAM,EAAC,cAAc,EAAC,CAAC,CAAC,YAAY,EAAC,KAAK,CAAC,MAAM,EAAC,CAAC,CAAC,YAAY,EAAC,iBAAiB,CAAC,EAAC,CAAC,CAAC;IAC/J,OAAO,EAAE,aAAa,EAAC,kCAAkC,EAAC,QAAQ,EAAC,uBAAuB,EAAC,SAAS,EAAC,cAAc,EAAC,eAAe,EAAC,iBAAiB,EAAC,MAAM,EAAC,SAAS,EAAC,iBAAiB,EAAC,mBAAmB,EAAC,UAAU,EAAC,mBAAmB;QACzO,gBAAgB,EAAC,wCAAwC;QACzD,GAAG,EAAC,EAAC,SAAS,EAAC,WAAW,EAAC,KAAK,EAAC,QAAQ,EAAC,MAAM,EAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,EAAC,EAAC,IAAI,EAAC,EAAC,SAAS,EAAC,YAAY,EAAC,KAAK,EAAC,SAAS,EAAC,MAAM,EAAC,MAAM,IAAI,CAAC,SAAS,CAAC,EAAC;QACjJ,gBAAgB,EAAC,uDAAuD,EAAE,CAAC;AAC/E,CAAC"}
@@ -0,0 +1,12 @@
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.
6
+ * @see docs/RELEASE_1_0.md and the corresponding domain guide.
7
+ */
8
+ /** Structural attachment budget; it does not authorize reconstruction/export. */
9
+ export declare const RAW_ATTACHMENT_MAX_NATIVE_SITES = 65536;
10
+ /** Shared full-native budget of the reference producer and reconstruction path. */
11
+ export declare const RAW_REFERENCE_MAX_NATIVE_SITES = 4096;
12
+ //# sourceMappingURL=raw-frame-limits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"raw-frame-limits.d.ts","sourceRoot":"","sources":["../../src/capture/raw-frame-limits.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,iFAAiF;AACjF,eAAO,MAAM,+BAA+B,QAAS,CAAC;AACtD,mFAAmF;AACnF,eAAO,MAAM,8BAA8B,OAAQ,CAAC"}
@@ -0,0 +1,13 @@
1
+ // SPDX-License-Identifier: Apache-2.0
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.
7
+ * @see docs/RELEASE_1_0.md and the corresponding domain guide.
8
+ */
9
+ /** Structural attachment budget; it does not authorize reconstruction/export. */
10
+ export const RAW_ATTACHMENT_MAX_NATIVE_SITES = 65_536;
11
+ /** Shared full-native budget of the reference producer and reconstruction path. */
12
+ export const RAW_REFERENCE_MAX_NATIVE_SITES = 4_096;
13
+ //# sourceMappingURL=raw-frame-limits.js.map
@@ -0,0 +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"}
@@ -0,0 +1,48 @@
1
+ import { type CalculationResult } from "../core/calculation-result.js";
2
+ import type { RasterRect } from "../output/capture-geometry.js";
3
+ import { type SensorRawReconstructionProfile, type SensorRawReconstructedPixel } from "../sensor/raw-reconstruction.js";
4
+ import { type SensorRawFrame } from "./sensor-raw-frame.js";
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. */
7
+ export interface RawFrameReconstructionPhaseProfile {
8
+ phaseX: number;
9
+ phaseY: number;
10
+ profile: SensorRawReconstructionProfile;
11
+ }
12
+ /** Bounded reference handoff; region coordinates stay in the full native sensor frame. */
13
+ export interface RawFrameReconstructionInput {
14
+ rawFrame: SensorRawFrame;
15
+ region: RasterRect;
16
+ phaseProfiles: readonly RawFrameReconstructionPhaseProfile[];
17
+ }
18
+ /** Traceable virtual sensor-channel values, not colorimetric RGB or a rendered photograph. */
19
+ export interface RawFrameReconstruction {
20
+ schemaVersion: typeof RAW_FRAME_RECONSTRUCTION_SCHEMA_VERSION;
21
+ rawFrame: SensorRawFrame;
22
+ phaseProfiles: readonly RawFrameReconstructionPhaseProfile[];
23
+ region: RasterRect;
24
+ linearPlane: {
25
+ imageState: "virtual-sensor-channels";
26
+ rasterBinding: "native-reconstruction-region";
27
+ pixelWidth: number;
28
+ pixelHeight: number;
29
+ channelIds: readonly string[];
30
+ /** Interleaved native-region row-major values; black-subtracted normalization, signed. */
31
+ samples: readonly number[];
32
+ };
33
+ /** Child envelopes and exact weighted RAW contributions, in matching native-region row-major order. */
34
+ pixels: readonly CalculationResult<SensorRawReconstructedPixel>[];
35
+ lineage: "engine-reconstructed-from-attached-raw";
36
+ producerOriginVerified: false;
37
+ whiteBalanceApplied: false;
38
+ colorTransformApplied: false;
39
+ physicalOrientationApplied: false;
40
+ outputCropApplied: false;
41
+ sharpeningApplied: false;
42
+ denoisingApplied: false;
43
+ }
44
+ /** Revalidates committed RAW codes/geometry and complete phase dispatch; no external plane may supply output values. */
45
+ export declare function parseRawFrameReconstructionInput(value: unknown): RawFrameReconstructionInput;
46
+ /** Delegates each pixel to #14's explicit linear reconstruction using only the attached native RAW samples. */
47
+ export declare function resolveRawFrameReconstruction(input: RawFrameReconstructionInput): CalculationResult<RawFrameReconstruction>;
48
+ //# sourceMappingURL=raw-frame-reconstruction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"raw-frame-reconstruction.d.ts","sourceRoot":"","sources":["../../src/capture/raw-frame-reconstruction.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAuB,KAAK,iBAAiB,EAAE,MAAM,+BAA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;IAClC,iBAAiB,EAAE,KAAK,CAAC;IACzB,iBAAiB,EAAE,KAAK,CAAC;IACzB,gBAAgB,EAAE,KAAK,CAAC;CACzB;AA6CD,wHAAwH;AACxH,wBAAgB,gCAAgC,CAAC,KAAK,EAAE,OAAO,GAAG,2BAA2B,CA4B5F;AACD,+GAA+G;AAC/G,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,2BAA2B,GAAG,iBAAiB,CAAC,sBAAsB,CAAC,CAwC3H"}
@@ -0,0 +1,146 @@
1
+ // SPDX-License-Identifier: Apache-2.0
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.
8
+ * @see docs/SIMULATED_CAPTURE.md for equations, coordinate/unit conventions, blockers and support
9
+ * limits.
10
+ */
11
+ import { requireAllowlistedRecord } from "../core/record-validation.js";
12
+ import { RAW_REFERENCE_MAX_NATIVE_SITES } from "./raw-frame-limits.js";
13
+ import { freezeOwnedData } from "../core/owned-data.js";
14
+ import { approximationResult } from "../core/calculation-result.js";
15
+ import { InvalidConfigurationError } from "../core/configuration-error.js";
16
+ import { parseSensorRawReconstructionProfile, resolveSensorRawReconstruction } from "../sensor/raw-reconstruction.js";
17
+ import { createSensorRawFrame } from "./sensor-raw-frame.js";
18
+ export const RAW_FRAME_RECONSTRUCTION_SCHEMA_VERSION = "0.1.0";
19
+ function object(value, keys) {
20
+ return requireAllowlistedRecord(value, keys, "Invalid or non-allowlisted RAW reconstruction fields.");
21
+ }
22
+ function integer(value, positive = false) {
23
+ if (typeof value !== "number" || !Number.isSafeInteger(value) || value < (positive ? 1 : 0)) {
24
+ throw new InvalidConfigurationError("RAW reconstruction coordinates require safe integers with valid sign.");
25
+ }
26
+ return Object.is(value, -0) ? 0 : value;
27
+ }
28
+ function frame(value) {
29
+ const r = object(value, ["frameId", "capture", "modeId", "captureModeProfile", "colorSamplingProfile", "bindingProfile",
30
+ "containerBitDepth", "samples", "schemaVersion", "sampleDomain", "sampleOrder", "producerBinding", "reconstructionApplied",
31
+ "renderingApplied", "nativePixelWidth", "nativePixelHeight"]);
32
+ if (r.schemaVersion !== "0.1.0" || r.sampleDomain !== "native-cfa-raw-code" || r.sampleOrder !== "native-row-major" ||
33
+ r.producerBinding !== "caller-declared-capture-attachment" || r.reconstructionApplied !== false || r.renderingApplied !== false ||
34
+ !Array.isArray(r.samples) || r.samples.length > RAW_REFERENCE_MAX_NATIVE_SITES) {
35
+ throw new InvalidConfigurationError("Reconstruction requires a committed native RAW frame of at most 4,096 samples.");
36
+ }
37
+ const { schemaVersion, sampleDomain, sampleOrder, producerBinding, reconstructionApplied, renderingApplied, nativePixelWidth, nativePixelHeight, ...input } = r;
38
+ void schemaVersion;
39
+ void sampleDomain;
40
+ void sampleOrder;
41
+ void producerBinding;
42
+ void reconstructionApplied;
43
+ void renderingApplied;
44
+ // The frame input parser checks full native coverage, site/code/seed identities and flags.
45
+ const result = createSensorRawFrame(input);
46
+ if (nativePixelWidth !== result.nativePixelWidth || nativePixelHeight !== result.nativePixelHeight) {
47
+ throw new InvalidConfigurationError("Committed RAW dimensions disagree with capture geometry.");
48
+ }
49
+ return result;
50
+ }
51
+ function profile(value) {
52
+ const r = object(value, ["schemaVersion", "profileId", "profileVersion", "captureModeId", "colorSamplingProfileId", "scientificStatus",
53
+ "method", "normalization", "negativeBlackSubtractedValuesAllowed", "kernels", "evidence", "limitations"]);
54
+ if (!Array.isArray(r.kernels) || r.kernels.length === 0 || r.kernels.length > 16) {
55
+ throw new InvalidConfigurationError("Reconstruction requires one to sixteen output channels.");
56
+ }
57
+ let count = 0;
58
+ for (const kernel of r.kernels) {
59
+ const k = object(kernel, ["outputChannelId", "contributions"]);
60
+ if (!Array.isArray(k.contributions) || k.contributions.length === 0)
61
+ throw new InvalidConfigurationError("Missing RAW contributions.");
62
+ count += k.contributions.length;
63
+ if (count > 256)
64
+ throw new InvalidConfigurationError("Reconstruction profile exceeds 256 contributions.");
65
+ for (const c of k.contributions)
66
+ object(c, ["offsetX", "offsetY", "sourceChannelId", "weight"]);
67
+ }
68
+ return parseSensorRawReconstructionProfile(r);
69
+ }
70
+ /** Revalidates committed RAW codes/geometry and complete phase dispatch; no external plane may supply output values. */
71
+ export function parseRawFrameReconstructionInput(value) {
72
+ const r = object(value, ["rawFrame", "region", "phaseProfiles"]), rawFrame = frame(r.rawFrame);
73
+ const rect = object(r.region, ["x", "y", "width", "height"]);
74
+ const region = { x: integer(rect.x), y: integer(rect.y), width: integer(rect.width, true), height: integer(rect.height, true) };
75
+ if (region.x + region.width > rawFrame.nativePixelWidth || region.y + region.height > rawFrame.nativePixelHeight) {
76
+ throw new InvalidConfigurationError("Reconstruction region must lie within the full native RAW frame.");
77
+ }
78
+ const layout = rawFrame.colorSamplingProfile.layout;
79
+ if (layout.kind !== "periodic-mosaic")
80
+ throw new InvalidConfigurationError("Reconstruction requires periodic native CFA.");
81
+ const phaseCount = layout.repeatWidthSites * layout.repeatHeightSites;
82
+ if (phaseCount > 64 || !Array.isArray(r.phaseProfiles) || r.phaseProfiles.length !== phaseCount) {
83
+ throw new InvalidConfigurationError("Every CFA phase requires one profile, with a maximum of 64 phases.");
84
+ }
85
+ const phaseProfiles = [];
86
+ const phases = new Set();
87
+ let channels;
88
+ for (const value of r.phaseProfiles) {
89
+ const p = object(value, ["phaseX", "phaseY", "profile"]), phaseX = integer(p.phaseX), phaseY = integer(p.phaseY), parsed = profile(p.profile);
90
+ const key = phaseX + ":" + phaseY, ids = parsed.kernels.map((k) => k.outputChannelId);
91
+ if (phaseX >= layout.repeatWidthSites || phaseY >= layout.repeatHeightSites || phases.has(key) ||
92
+ parsed.captureModeId !== rawFrame.modeId || parsed.colorSamplingProfileId !== rawFrame.colorSamplingProfile.profileId ||
93
+ (channels && JSON.stringify(ids) !== JSON.stringify(channels))) {
94
+ throw new InvalidConfigurationError("CFA phase/profile identity or output-channel order is inconsistent.");
95
+ }
96
+ channels = ids;
97
+ phases.add(key);
98
+ phaseProfiles.push({ phaseX, phaseY, profile: parsed });
99
+ }
100
+ phaseProfiles.sort((a, b) => a.phaseY - b.phaseY || a.phaseX - b.phaseX);
101
+ return { rawFrame, region, phaseProfiles };
102
+ }
103
+ /** Delegates each pixel to #14's explicit linear reconstruction using only the attached native RAW samples. */
104
+ export function resolveRawFrameReconstruction(input) {
105
+ const v = parseRawFrameReconstructionInput(input), f = v.rawFrame, layout = f.colorSamplingProfile.layout;
106
+ if (layout.kind !== "periodic-mosaic")
107
+ throw new InvalidConfigurationError("Reconstruction requires periodic native CFA.");
108
+ const pixels = [], samples = [];
109
+ for (let y = v.region.y; y < v.region.y + v.region.height; y++) {
110
+ for (let x = v.region.x; x < v.region.x + v.region.width; x++) {
111
+ const phaseIndex = (y % layout.repeatHeightSites) * layout.repeatWidthSites + x % layout.repeatWidthSites;
112
+ const selected = v.phaseProfiles[phaseIndex].profile, indices = new Set();
113
+ for (const kernel of selected.kernels) {
114
+ for (const c of kernel.contributions) {
115
+ const sx = x + c.offsetX, sy = y + c.offsetY;
116
+ if (!Number.isSafeInteger(sx) || !Number.isSafeInteger(sy) || sx < 0 || sy < 0 || sx >= f.nativePixelWidth || sy >= f.nativePixelHeight) {
117
+ throw new InvalidConfigurationError("Reconstruction kernel leaves the native RAW frame; no padding or renormalization is allowed.");
118
+ }
119
+ const i = sy * f.nativePixelWidth + sx;
120
+ if (f.samples[i].channelId !== c.sourceChannelId)
121
+ throw new InvalidConfigurationError("Reconstruction source channel disagrees with absolute CFA phase.");
122
+ indices.add(i);
123
+ }
124
+ }
125
+ const pixel = resolveSensorRawReconstruction({ profile: selected, colorSamplingProfile: f.colorSamplingProfile,
126
+ centerSite: { x, y }, samples: [...indices].map((i) => f.samples[i]) });
127
+ pixels.push(pixel);
128
+ samples.push(...pixel.value.outputChannels.map((c) => c.linearBlackSubtractedNormalizedValue));
129
+ }
130
+ }
131
+ const value = { schemaVersion: RAW_FRAME_RECONSTRUCTION_SCHEMA_VERSION,
132
+ rawFrame: f, phaseProfiles: v.phaseProfiles, region: v.region,
133
+ linearPlane: { imageState: "virtual-sensor-channels", rasterBinding: "native-reconstruction-region",
134
+ pixelWidth: v.region.width, pixelHeight: v.region.height,
135
+ channelIds: v.phaseProfiles[0].profile.kernels.map((k) => k.outputChannelId), samples }, pixels,
136
+ lineage: "engine-reconstructed-from-attached-raw", producerOriginVerified: false, whiteBalanceApplied: false,
137
+ colorTransformApplied: false, physicalOrientationApplied: false, outputCropApplied: false, sharpeningApplied: false, denoisingApplied: false };
138
+ return freezeOwnedData(approximationResult(JSON.parse(JSON.stringify(value)), "attached-raw-native-region-linear-reconstruction", "0.1.0", [
139
+ "Pixel values come exclusively from exact attached RAW samples through the existing explicit linear-neighborhood resolver.",
140
+ "The RAW producer/capture attachment remains caller-declared; this does not verify producer origin or calibrate sensor color.",
141
+ "Phase-specific kernels are explicit approximation policy; negative values and child provenance are retained.",
142
+ "No edge extension, CFA rephasing, WB, color conversion, orientation, output crop, sharpening, denoising or JPEG processing is applied.",
143
+ "Attached capture float planes are metadata/source history only and are not used to reconstruct these values."
144
+ ]));
145
+ }
146
+ //# sourceMappingURL=raw-frame-reconstruction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"raw-frame-reconstruction.js","sourceRoot":"","sources":["../../src/capture/raw-frame-reconstruction.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC;;;;;;;;GAQG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,EAAE,8BAA8B,EAAE,MAAM,uBAAuB,CAAC;AAEvE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAA0B,MAAM,+BAA+B,CAAC;AAC5F,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAE3E,OAAO,EAAE,mCAAmC,EAAE,8BAA8B,EACH,MAAM,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