@photivra/engine 0.1.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +87 -0
- package/CITATION.cff +1 -1
- package/README.md +61 -12
- package/dist/camera/equivalent-focal-length.d.ts +34 -0
- package/dist/camera/equivalent-focal-length.d.ts.map +1 -0
- package/dist/camera/equivalent-focal-length.js +33 -0
- package/dist/camera/equivalent-focal-length.js.map +1 -0
- package/dist/camera/field-of-view.d.ts +40 -3
- package/dist/camera/field-of-view.d.ts.map +1 -1
- package/dist/camera/field-of-view.js +66 -24
- package/dist/camera/field-of-view.js.map +1 -1
- package/dist/core/calculation-result.d.ts.map +1 -1
- package/dist/core/calculation-result.js +14 -2
- package/dist/core/calculation-result.js.map +1 -1
- package/dist/core/configuration-error.d.ts +9 -0
- package/dist/core/configuration-error.d.ts.map +1 -0
- package/dist/core/configuration-error.js +13 -0
- package/dist/core/configuration-error.js.map +1 -0
- package/dist/core/evidence-provenance.d.ts +40 -0
- package/dist/core/evidence-provenance.d.ts.map +1 -0
- package/dist/core/evidence-provenance.js +79 -0
- package/dist/core/evidence-provenance.js.map +1 -0
- package/dist/core/image-formation.d.ts +70 -0
- package/dist/core/image-formation.d.ts.map +1 -0
- package/dist/core/image-formation.js +335 -0
- package/dist/core/image-formation.js.map +1 -0
- package/dist/exposure/exposure.d.ts +31 -0
- package/dist/exposure/exposure.d.ts.map +1 -1
- package/dist/exposure/exposure.js +35 -0
- package/dist/exposure/exposure.js.map +1 -1
- package/dist/index.d.ts +16 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -4
- package/dist/index.js.map +1 -1
- package/dist/motion/camera-rotation.d.ts +91 -0
- package/dist/motion/camera-rotation.d.ts.map +1 -0
- package/dist/motion/camera-rotation.js +157 -0
- package/dist/motion/camera-rotation.js.map +1 -0
- package/dist/optics/focus-breathing.d.ts +73 -0
- package/dist/optics/focus-breathing.d.ts.map +1 -0
- package/dist/optics/focus-breathing.js +77 -0
- package/dist/optics/focus-breathing.js.map +1 -0
- package/dist/optics/illumination-vignetting.d.ts +59 -0
- package/dist/optics/illumination-vignetting.d.ts.map +1 -0
- package/dist/optics/illumination-vignetting.js +107 -0
- package/dist/optics/illumination-vignetting.js.map +1 -0
- package/dist/optics/lateral-chromatic-aberration.d.ts +93 -0
- package/dist/optics/lateral-chromatic-aberration.d.ts.map +1 -0
- package/dist/optics/lateral-chromatic-aberration.js +174 -0
- package/dist/optics/lateral-chromatic-aberration.js.map +1 -0
- package/dist/optics/psf-foundation.d.ts +102 -0
- package/dist/optics/psf-foundation.d.ts.map +1 -0
- package/dist/optics/psf-foundation.js +164 -0
- package/dist/optics/psf-foundation.js.map +1 -0
- package/dist/optics/radial-distortion.d.ts +91 -0
- package/dist/optics/radial-distortion.d.ts.map +1 -0
- package/dist/optics/radial-distortion.js +198 -0
- package/dist/optics/radial-distortion.js.map +1 -0
- package/dist/output/capture-geometry.d.ts +225 -0
- package/dist/output/capture-geometry.d.ts.map +1 -0
- package/dist/output/capture-geometry.js +478 -0
- package/dist/output/capture-geometry.js.map +1 -0
- package/dist/schema/validation.d.ts +1 -8
- package/dist/schema/validation.d.ts.map +1 -1
- package/dist/schema/validation.js +2 -11
- package/dist/schema/validation.js.map +1 -1
- package/dist/sensor/architecture.d.ts +40 -0
- package/dist/sensor/architecture.d.ts.map +1 -0
- package/dist/sensor/architecture.js +98 -0
- package/dist/sensor/architecture.js.map +1 -0
- package/dist/sensor/radiometry-readiness.d.ts +111 -0
- package/dist/sensor/radiometry-readiness.d.ts.map +1 -0
- package/dist/sensor/radiometry-readiness.js +294 -0
- package/dist/sensor/radiometry-readiness.js.map +1 -0
- package/dist/sensor/sensor-geometry.d.ts +99 -0
- package/dist/sensor/sensor-geometry.d.ts.map +1 -0
- package/dist/sensor/sensor-geometry.js +71 -0
- package/dist/sensor/sensor-geometry.js.map +1 -0
- package/dist/simulation/poc-simulation.d.ts +93 -1
- package/dist/simulation/poc-simulation.d.ts.map +1 -1
- package/dist/simulation/poc-simulation.js +308 -24
- package/dist/simulation/poc-simulation.js.map +1 -1
- package/docs/API_STYLE.md +35 -2
- package/docs/ARCHITECTURE.md +179 -1
- package/docs/IMAGE_FORMATION.md +142 -0
- package/docs/MOTION_AND_SIGNAL.md +54 -1
- package/docs/PHYSICS_FOUNDATION.md +190 -3
- package/docs/POC_API.md +73 -7
- package/docs/PROVENANCE.md +24 -0
- package/docs/PSF_FOUNDATION.md +133 -0
- package/docs/STABILIZATION.md +17 -4
- package/docs/USAGE.md +680 -4
- package/package.json +2 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Notable public changes to `@photivra/engine` are documented here.
|
|
4
|
+
|
|
5
|
+
## Unreleased
|
|
6
|
+
|
|
7
|
+
## 0.4.0 - 2026-09-25
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `getImageFormationContract()` and `IMAGE_FORMATION_CONTRACT_VERSION` defining public scientific ownership domains, coordinate spaces, hard stage dependencies, cross-stage couplings, temporal semantics, renderer warp/alpha/occlusion rules, and reserved sensor/reconstruction ordering.
|
|
12
|
+
- Explicit effect placement for focus breathing, distortion, lateral chromatic aberration, illumination/mechanical vignetting, non-circular diffraction, field-dependent PSF effects, time-parameterized camera rotation, rolling readout, CFA/photosite sampling, sensor statistics, and reconstruction.
|
|
13
|
+
- `calculateCameraRotationImageMapping()` for field-position-dependent, time-parameterized pure camera rotation using exact axis-angle integration of constant pitch/yaw/roll angular velocity.
|
|
14
|
+
- `calculateFocusBreathingProjection()` and `calculateFocusBreathingFieldOfView()` for an explicit caller-declared projection scale at the selected focus state, without mutating physical focal length or inventing a lens-specific breathing curve.
|
|
15
|
+
- `calculateRadialDistortionMapping()` plus `calculateInverseRadialDistortionMapping()` for generic optical-axis-centered radial field mapping with explicit normalization radius, declared operating envelope, and fail-closed monotonicity/invertibility validation.
|
|
16
|
+
- `calculateLateralChromaticAberrationMapping()` plus its inverse for green-reference channel field mapping: one common base distortion plus red/blue coefficient offsets, deterministic per-channel source sampling, and physical separation diagnostics.
|
|
17
|
+
- `calculateIlluminationVignetting()` for generic radial field-dependent linear throughput with full-envelope extrema validation, positive stop-loss reporting, and a strict separation from pupil/PSF vignetting.
|
|
18
|
+
- `getPsfFoundationContract()` and `calculatePsfFoundationComponents()` for explicit field/depth/wavelength/pupil context plus separately preserved geometric-defocus and circular-diffraction diagnostics, with future pupil/field contributions reserved but not implemented.
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- Engine API contract advances to `0.32.0`. The image-formation contract remains `0.2.0`; the new PSF/pupil foundation formalizes already-partial field/PSF ownership without changing composed POC semantics. The composed POC remains `0.20.0`.
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- Tightened final output-raster aspect validation so only nearest-integer rounding from one isotropic scale is accepted; fixed-percentage tolerance no longer permits visible anisotropic stretching.
|
|
27
|
+
- Calculation-quality validation now fails closed on unknown runtime uncertainty `kind` and `source` values instead of treating unknown discriminants as valid metadata.
|
|
28
|
+
|
|
29
|
+
### Documentation
|
|
30
|
+
|
|
31
|
+
- Added the image-formation contract guide and synchronized architecture, physics, motion, API-style, and agent guidance around partial-order/coupled-stage semantics and reserved sensor stages.
|
|
32
|
+
- Documented the physical camera-rotation sign/axis conventions, field-dependent mapping, and compatibility boundary with the legacy stabilization-equivalent approximation.
|
|
33
|
+
- Documented the declared-scale focus-breathing model, its zero-breathing compatibility case, and the prohibition on inferring real-lens behavior from focal/focus metadata.
|
|
34
|
+
- Documented radial distortion normalization, forward/inverse mapping, operating-envelope monotonicity, and the boundary excluding tangential/decentered and named-lens behavior.
|
|
35
|
+
- Documented lateral CA as channel-dependent field mapping rather than RGB blur, including the non-spectral/non-CFA calibration boundary.
|
|
36
|
+
- Documented illumination vignetting as scene-linear/channel-linear throughput only, including full-envelope validity checks and the boundary excluding mechanical/pupil vignetting and PSF/bokeh changes.
|
|
37
|
+
- Added the PSF/pupil foundation guide, preserving defocus and circular diffraction as separate diagnostics and reserving future pupil clipping, non-circular diffraction, field curvature, aberration, and bokeh contributions without claiming a combined PSF.
|
|
38
|
+
|
|
39
|
+
## 0.3.0 - 2026-09-25
|
|
40
|
+
|
|
41
|
+
### Added
|
|
42
|
+
|
|
43
|
+
- `calculateSensorGeometryMetrics()` plus `SensorImagingArea` and `NativeImageRaster`, separating physical imaging geometry from native effective image resolution while deriving diagonal 35 mm crop factor, megapixels, and independent X/Y sampling pitch.
|
|
44
|
+
- Explicit provenance assumptions that prevent geometric sample spacing from being treated as photosite active area or photon-collection area.
|
|
45
|
+
- `resolveCaptureGeometry()` with invariant native sensor coordinates, active capture rectangles, physical camera orientation, digital output crop, and final output raster separation.
|
|
46
|
+
- `calculateActiveCaptureFieldOfView()`, which reuses the canonical field-of-view model and preserves diagonal FOV across 90° orientation changes.
|
|
47
|
+
- `calculateImagingAreaMetrics()` as the shared diagonal crop-factor primitive for physical imaging areas.
|
|
48
|
+
- `calculateEquivalentFocalLength35Mm()`, keeping physical focal length authoritative while deriving conventional diagonal-based 35 mm equivalence from the active physical capture area.
|
|
49
|
+
- `parseSensorArchitectureProfile()` plus evidence-backed independent metadata axes for illumination, stacking/integration, readout capabilities, and color-sampling family.
|
|
50
|
+
- `calculateFieldOfViewBounds()` for asymmetric/off-center sensor-plane angular bounds.
|
|
51
|
+
- Exact native↔oriented raster point/vector/rectangle transforms for all four physical camera rotations.
|
|
52
|
+
- `RasterDimensions` as the generic active/output raster contract while `NativeImageRaster` remains the semantic native-raster alias.
|
|
53
|
+
- Off-center active-capture optical-axis offsets/bounds, asymmetric FOV, and dual diagonal-corner angular spans.
|
|
54
|
+
- Output-raster aspect-ratio validation that rejects implicit geometric stretching.
|
|
55
|
+
- `calculateOutputFieldOfView()` plus explicit physical final-output bounds and output resampling scale.
|
|
56
|
+
- `parseRadiometryReadinessProfile()` and `assessRadiometryReadiness()` for explicit scene/optics/photosite/exposure/sensor-response prerequisite gating before any future photon simulation.
|
|
57
|
+
|
|
58
|
+
### Changed
|
|
59
|
+
|
|
60
|
+
- Engine API contract advances to `0.25.0`.
|
|
61
|
+
- Composed POC simulation API advances to `0.20.0`, preserving legacy requests while completing staged capture orientation/active/output geometry, final-output FOV, capture-mode viewing CoC, orientation-aware subject framing, and explicit output sampling scale.
|
|
62
|
+
- The composed POC exposes shared sensor-geometry metrics while retaining backwards-compatible representative pitch fields.
|
|
63
|
+
- Capture-geometry mode continues to reject stacking legacy `crop.factor` with staged capture, while subject framing and equivalent-viewing CoC now use explicit staged output/viewing semantics.
|
|
64
|
+
- The composed POC continues to expose X/Y sample pitch diagnostics and rejects sensor geometry whose X/Y geometric pitch differs by more than 1% until all pixel-domain calculations are axis-aware.
|
|
65
|
+
- Unreleased sensor-architecture schema advances to `0.2.0`: source origin and reuse rights are independent, scalar facts accept multiple evidence records, and each readout capability carries its own evidence.
|
|
66
|
+
- `InvalidConfigurationError` now lives in the core dependency layer and remains re-exported from the existing public surface.
|
|
67
|
+
- Radiometry readiness distinguishes `not-ready`, `approximate-only`, and `calibrated-ready`; assessment never enables composed photon output by itself.
|
|
68
|
+
|
|
69
|
+
### Documentation
|
|
70
|
+
|
|
71
|
+
- Synchronized human and agent guidance with the post-0.2 sensor/capture foundations, evidence/reuse-rights model, radiometry readiness gate, independent API-version surfaces, composed-POC integration boundary, and coordinate/sampling invariants.
|
|
72
|
+
|
|
73
|
+
## 0.2.0 - 2026-09-21
|
|
74
|
+
|
|
75
|
+
### Added
|
|
76
|
+
|
|
77
|
+
- `calculateRelativeRenderedExposure()`, a deterministic relative rendering relation that combines aperture/shutter optical exposure with nominal ISO gain relative to declared reference settings.
|
|
78
|
+
- Public input and result types for the relative rendered exposure calculation.
|
|
79
|
+
|
|
80
|
+
### Documentation
|
|
81
|
+
|
|
82
|
+
- Added usage guidance and scientific limitations for relative rendered exposure.
|
|
83
|
+
- Synchronized package, lockfile, README, and citation version metadata for the release.
|
|
84
|
+
|
|
85
|
+
## 0.1.0 - 2026-09-20
|
|
86
|
+
|
|
87
|
+
- Initial public release of the Photivra engine package.
|
package/CITATION.cff
CHANGED
|
@@ -9,7 +9,7 @@ abstract: "An open TypeScript engine for the science and mathematics of photogra
|
|
|
9
9
|
repository-code: "https://github.com/photivra/photivra"
|
|
10
10
|
url: "https://photivra.com"
|
|
11
11
|
license: "Apache-2.0"
|
|
12
|
-
version: "0.
|
|
12
|
+
version: "0.4.0"
|
|
13
13
|
keywords:
|
|
14
14
|
- photography
|
|
15
15
|
- camera optics
|
package/README.md
CHANGED
|
@@ -37,9 +37,14 @@ See the [Usage Guide](docs/USAGE.md) for the complete public API.
|
|
|
37
37
|
## Documentation
|
|
38
38
|
|
|
39
39
|
- [Usage Guide](docs/USAGE.md)
|
|
40
|
-
- [Public API Style](docs/API_STYLE.md)
|
|
41
40
|
- [Architecture](docs/ARCHITECTURE.md)
|
|
41
|
+
- [Contributor Guide](CONTRIBUTING.md)
|
|
42
|
+
- [Agent Instructions](AGENTS.md)
|
|
43
|
+
- [Changelog](CHANGELOG.md)
|
|
44
|
+
- [Public API Style](docs/API_STYLE.md)
|
|
42
45
|
- [Physics Foundation](docs/PHYSICS_FOUNDATION.md)
|
|
46
|
+
- [Image-Formation Contract](docs/IMAGE_FORMATION.md)
|
|
47
|
+
- [PSF and Pupil Foundation](docs/PSF_FOUNDATION.md)
|
|
43
48
|
- [Motion and Signal Foundation](docs/MOTION_AND_SIGNAL.md)
|
|
44
49
|
- [Camera Shake and Stabilization](docs/STABILIZATION.md)
|
|
45
50
|
- [Scientific and Source Provenance](docs/PROVENANCE.md)
|
|
@@ -55,33 +60,66 @@ The root package exports deterministic or explicitly labeled approximate models
|
|
|
55
60
|
|
|
56
61
|
### Optics and geometry
|
|
57
62
|
|
|
58
|
-
- [rectilinear field of view, with optional focus-aware thin-lens projection](docs/USAGE.md#field-of-view);
|
|
63
|
+
- [centered and asymmetric rectilinear field of view, with optional focus-aware thin-lens projection](docs/USAGE.md#field-of-view);
|
|
64
|
+
- [physical vs diagonal-based 35 mm-equivalent focal length](docs/USAGE.md#actual-and-35-mm-equivalent-focal-length);
|
|
65
|
+
- [caller-declared focus-breathing projection/FOV approximation](docs/USAGE.md#focus-breathing-projection);
|
|
66
|
+
- [generic invertible radial distortion mapping](docs/USAGE.md#radial-lens-distortion-mapping);
|
|
67
|
+
- [generic RGB-channel lateral chromatic-aberration field mapping](docs/USAGE.md#lateral-chromatic-aberration-mapping);
|
|
68
|
+
- [generic linear-light illumination-vignetting approximation](docs/USAGE.md#illumination-vignetting);
|
|
59
69
|
- [Gaussian thin-lens image distance and magnification](docs/USAGE.md#thin-lens-image-distance-and-magnification);
|
|
60
70
|
- [geometric depth of field and defocus-circle diameter](docs/USAGE.md#depth-of-field-and-defocus);
|
|
61
71
|
- [ideal circular-aperture first-zero Airy diameter](docs/USAGE.md#circular-aperture-diffraction);
|
|
72
|
+
- [separated PSF/pupil contribution foundation](docs/USAGE.md#psf-and-pupil-foundation);
|
|
62
73
|
- [ideal regular-polygon aperture geometry and sunstar direction symmetry](docs/USAGE.md#aperture-geometry-and-sunstar-directions).
|
|
63
74
|
|
|
64
75
|
### Exposure and motion
|
|
65
76
|
|
|
66
|
-
- [EV100, relative optical exposure, and equivalent ISO compensation](docs/USAGE.md#exposure-and-
|
|
77
|
+
- [EV100, relative optical exposure, relative rendered exposure, and equivalent ISO compensation](docs/USAGE.md#exposure-and-iso-relations);
|
|
67
78
|
- [constant-velocity projected point motion](docs/USAGE.md#projected-subject-motion);
|
|
68
|
-
- [
|
|
79
|
+
- [time-parameterized spatial camera-rotation mapping](docs/USAGE.md#spatial-camera-rotation-mapping) for yaw/pitch/roll;
|
|
80
|
+
- [the existing controlled yaw/pitch camera-shake and stabilization-equivalent approximation](docs/USAGE.md#camera-shake-and-stabilization-equivalent-approximation).
|
|
69
81
|
|
|
70
82
|
### Sensor and output
|
|
71
83
|
|
|
72
84
|
- [projected fronto-parallel object size and sensor-pixel sampling](docs/USAGE.md#projected-object-size-and-sensor-sampling);
|
|
73
85
|
- [pixel pitch](docs/USAGE.md#pixel-pitch);
|
|
86
|
+
- [sensor imaging-area, native-raster, crop-factor, megapixel, and 2D sampling metrics](docs/USAGE.md#sensor-imaging-area-and-native-raster);
|
|
87
|
+
- [provenance-aware sensor architecture/capability metadata](docs/USAGE.md#sensor-architecture-metadata);
|
|
88
|
+
- [capture orientation, active sensor area, and output geometry](docs/USAGE.md#capture-orientation-active-area-and-output-geometry);
|
|
74
89
|
- [centered crop and subject-height framing crop](docs/USAGE.md#centered-crop-and-subject-framing-crop);
|
|
90
|
+
- [radiometry prerequisite/readiness assessment](docs/USAGE.md#radiometry-readiness);
|
|
75
91
|
- [mean photoelectron conversion and basic shot-noise/read-noise SNR primitives](docs/USAGE.md#photoelectron-and-snr-primitives).
|
|
76
92
|
|
|
77
93
|
### Data, validation, and composition
|
|
78
94
|
|
|
95
|
+
- [image-formation ownership/order contract](docs/IMAGE_FORMATION.md), including coordinate, temporal, renderer, and reserved sensor-stage semantics;
|
|
79
96
|
- [camera/scene schemas and runtime validation](docs/USAGE.md#camera-and-scene-schema-validation);
|
|
80
97
|
- [provenance plus optional uncertainty/quality metadata](docs/USAGE.md#provenance-uncertainty-and-quality-metadata);
|
|
81
98
|
- [the composed `simulatePocCamera()` proof-of-concept calculation](docs/USAGE.md#composed-poc-simulation).
|
|
82
99
|
|
|
83
100
|
The package has no runtime npm dependencies.
|
|
84
101
|
|
|
102
|
+
## Sensor/capture integration status
|
|
103
|
+
|
|
104
|
+
The sensor/capture foundations are intentionally **additive**.
|
|
105
|
+
|
|
106
|
+
The root engine now exposes standalone APIs for:
|
|
107
|
+
|
|
108
|
+
- physical sensor imaging area and native raster metrics;
|
|
109
|
+
- independent X/Y geometric sampling pitch;
|
|
110
|
+
- active-capture rectangles and physical camera orientation;
|
|
111
|
+
- native↔oriented point/vector/rectangle transforms;
|
|
112
|
+
- off-center/asymmetric active-capture FOV;
|
|
113
|
+
- diagonal-based 35 mm-equivalent focal length;
|
|
114
|
+
- evidence-backed sensor architecture metadata;
|
|
115
|
+
- radiometry prerequisite/readiness assessment.
|
|
116
|
+
|
|
117
|
+
These contracts are **not all composed into `simulatePocCamera()` yet**. POC API 0.20 now composes staged capture geometry through final output/viewing semantics: orientation, active-capture rectangles, output crop/raster, active/output FOV, active-capture 35 mm-equivalent focal length, viewing-based CoC against the final retained physical area, orientation-aware subject framing, and explicit output pixel scaling. Sensor-architecture metadata and radiometry-readiness profiles remain standalone and are not yet composed.
|
|
118
|
+
|
|
119
|
+
The POC exposes X/Y sampling diagnostics but still uses one representative horizontal pitch internally for several pixel-domain calculations; it therefore rejects geometry whose X/Y pitch differs by more than 1% rather than silently producing directional error.
|
|
120
|
+
|
|
121
|
+
Likewise, radiometry readiness does not enable photon/noise output in the POC. Integration of these foundations is separate future work and should happen explicitly rather than by silently changing existing request semantics.
|
|
122
|
+
|
|
85
123
|
## Sample use case
|
|
86
124
|
|
|
87
125
|
A developer wants to model how a change in camera settings affects an image.
|
|
@@ -139,23 +177,34 @@ The calling application can then use those results while keeping the underlying
|
|
|
139
177
|
|
|
140
178
|
## Status
|
|
141
179
|
|
|
142
|
-
-
|
|
143
|
-
- Engine API contract: `0.
|
|
180
|
+
- Repository package version: `0.4.0`
|
|
181
|
+
- Engine API contract: `0.32.0`
|
|
182
|
+
- Composed POC simulation API contract: `0.20.0`
|
|
144
183
|
- Stability: pre-1.0 / proof of concept
|
|
145
184
|
|
|
146
185
|
Package version and engine API version are intentionally separate. Public APIs may evolve before 1.0 while the scientific models and composition contracts are validated.
|
|
147
186
|
|
|
148
|
-
|
|
187
|
+
Creating a GitHub release/tag and publishing `@photivra/engine` are separate release actions. The tag-triggered publish workflow verifies that the `vX.Y.Z` tag matches the package version before publishing.
|
|
188
|
+
|
|
189
|
+
## Image-formation integration boundary
|
|
190
|
+
|
|
191
|
+
The root engine now exports `getImageFormationContract()` as a descriptive public contract for scientific domain ownership, coordinate spaces, stage dependencies/couplings, temporal basis, renderer warp/compositing semantics, and reserved sensor ordering.
|
|
192
|
+
|
|
193
|
+
The contract does **not** claim that every listed stage is implemented. Reserved stages remain future work, and `simulatePocCamera()` is unchanged at API 0.20. See [Image-Formation Contract](docs/IMAGE_FORMATION.md).
|
|
149
194
|
|
|
150
195
|
## Important scientific limits
|
|
151
196
|
|
|
152
197
|
Photivra deliberately avoids claiming more than the current models support.
|
|
153
198
|
|
|
154
|
-
- Focus-aware projection is ideal paraxial thin-lens geometry
|
|
199
|
+
- Focus-aware projection is ideal paraxial thin-lens geometry by default. A separate declared-scale focus-breathing approximation can alter projection/framing for one focus state, but Photivra does not infer a breathing curve or claim named-lens calibration.
|
|
200
|
+
- Generic radial distortion is a caller-parameterized field mapping with an explicit physical normalization radius and invertible operating envelope. Decentering/tangential distortion and named-lens calibration are not yet modeled.
|
|
201
|
+
- Generic illumination vignetting is a field-dependent scene-linear/channel-linear attenuation model only; it does not model pupil clipping, cat's-eye bokeh, PSF changes, or calibrated lens radiometry.
|
|
202
|
+
- Generic lateral CA is represented as independent radial field mapping for abstract RGB renderer channels. It is not a spectral lens model, sensor-CFA calibration, longitudinal-CA model, or named-lens profile.
|
|
155
203
|
- Projected subject motion follows a representative point under constant linear velocity. It does not yet model scale blur of an extended object moving substantially along the optical axis.
|
|
156
|
-
-
|
|
157
|
-
- The Airy diagnostic assumes an ideal circular pupil.
|
|
158
|
-
- Signal/noise primitives require caller-supplied photon/electron quantities. The
|
|
204
|
+
- The legacy stabilization-equivalent camera-shake API remains one global yaw/pitch image-plane vector. A separate low-level rotation-only mapping now models field-position-dependent yaw/pitch/roll image motion; camera translation/parallax, real IBIS/OIS behavior, and composed rolling-readout integration remain unmodeled.
|
|
205
|
+
- The Airy diagnostic assumes an ideal circular pupil. The PSF foundation keeps circular diffraction and geometric defocus as separately named diagnostics; it does not calculate a combined PSF, and polygon aperture geometry does not produce a polygon diffraction PSF.
|
|
206
|
+
- Signal/noise primitives require caller-supplied photon/electron quantities. The radiometry-readiness API can assess declared prerequisites, but it does not derive photons or enable photon/noise output in the composed POC.
|
|
207
|
+
- The composed POC still uses one representative pixel-pitch path internally and therefore rejects sensor geometry whose X/Y sample pitch differs by more than 1%; lower-level geometry APIs already preserve independent X/Y pitch.
|
|
159
208
|
- No named commercial camera or lens performance is claimed.
|
|
160
209
|
|
|
161
210
|
See [Physics Foundation](docs/PHYSICS_FOUNDATION.md), [Motion and Signal Foundation](docs/MOTION_AND_SIGNAL.md), and [Camera Shake and Stabilization](docs/STABILIZATION.md) for details.
|
|
@@ -219,7 +268,7 @@ Yarn and pnpm may be used for development, but the repository's release/CI depen
|
|
|
219
268
|
|
|
220
269
|
TypeScript types are not treated as validation for untrusted data.
|
|
221
270
|
|
|
222
|
-
- Use `parseCameraConfiguration()` and `
|
|
271
|
+
- Use `parseCameraConfiguration()`, `parseSceneDefinition()`, `parseSensorArchitectureProfile()`, and `parseRadiometryReadinessProfile()` for their respective external JSON/configuration boundaries.
|
|
223
272
|
- The repository-local Node POC HTTP layer has its own structural request parser before invoking `simulatePocCamera()`.
|
|
224
273
|
- Scientific range/domain validation remains in the calculation modules.
|
|
225
274
|
- Public `CalculationResult<T>` envelopes reject non-finite numeric output.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type CalculationResult } from "../core/calculation-result.js";
|
|
2
|
+
import { type SensorImagingArea } from "../sensor/sensor-geometry.js";
|
|
3
|
+
export interface CalculateEquivalentFocalLength35MmInput {
|
|
4
|
+
/** Physical optical focal length in millimetres. */
|
|
5
|
+
focalLengthMm: number;
|
|
6
|
+
/** Effective physical active-capture imaging area. */
|
|
7
|
+
activeImagingArea: SensorImagingArea;
|
|
8
|
+
}
|
|
9
|
+
export interface EquivalentFocalLength35Mm {
|
|
10
|
+
/** Physical optical focal length supplied by the caller. */
|
|
11
|
+
actualFocalLengthMm: number;
|
|
12
|
+
/** Conventional diagonal-based 35 mm-equivalent focal length. */
|
|
13
|
+
equivalentFocalLength35Mm: number;
|
|
14
|
+
/** Diagonal crop factor of the active physical capture area. */
|
|
15
|
+
cropFactor35Mm: number;
|
|
16
|
+
/** Physical active-capture diagonal in millimetres. */
|
|
17
|
+
activeImagingAreaDiagonalMm: number;
|
|
18
|
+
/** Declares the equivalence convention used by this result. */
|
|
19
|
+
basis: "diagonal";
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Calculates conventional 35 mm-equivalent focal length from physical focal
|
|
23
|
+
* length and the effective active-capture diagonal.
|
|
24
|
+
*
|
|
25
|
+
* The physical focal length remains unchanged and continues to be the optical
|
|
26
|
+
* input for projection and depth-of-field calculations. Focus distance and
|
|
27
|
+
* later digital/output crops are deliberately excluded from this conventional
|
|
28
|
+
* equivalence quantity.
|
|
29
|
+
*
|
|
30
|
+
* @param input Physical focal length and active physical capture area.
|
|
31
|
+
* @returns Actual and diagonal-based 35 mm-equivalent focal lengths.
|
|
32
|
+
*/
|
|
33
|
+
export declare function calculateEquivalentFocalLength35Mm(input: CalculateEquivalentFocalLength35MmInput): CalculationResult<EquivalentFocalLength35Mm>;
|
|
34
|
+
//# sourceMappingURL=equivalent-focal-length.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equivalent-focal-length.d.ts","sourceRoot":"","sources":["../../src/camera/equivalent-focal-length.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,8BAA8B,CAAC;AAEtC,MAAM,WAAW,uCAAuC;IACtD,oDAAoD;IACpD,aAAa,EAAE,MAAM,CAAC;IACtB,sDAAsD;IACtD,iBAAiB,EAAE,iBAAiB,CAAC;CACtC;AAED,MAAM,WAAW,yBAAyB;IACxC,4DAA4D;IAC5D,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iEAAiE;IACjE,yBAAyB,EAAE,MAAM,CAAC;IAClC,gEAAgE;IAChE,cAAc,EAAE,MAAM,CAAC;IACvB,uDAAuD;IACvD,2BAA2B,EAAE,MAAM,CAAC;IACpC,+DAA+D;IAC/D,KAAK,EAAE,UAAU,CAAC;CACnB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,uCAAuC,GAC7C,iBAAiB,CAAC,yBAAyB,CAAC,CAyB9C"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
import { calculatedResult } from "../core/calculation-result.js";
|
|
3
|
+
import { requirePositiveFinite } from "../core/validation.js";
|
|
4
|
+
import { calculateImagingAreaMetrics } from "../sensor/sensor-geometry.js";
|
|
5
|
+
/**
|
|
6
|
+
* Calculates conventional 35 mm-equivalent focal length from physical focal
|
|
7
|
+
* length and the effective active-capture diagonal.
|
|
8
|
+
*
|
|
9
|
+
* The physical focal length remains unchanged and continues to be the optical
|
|
10
|
+
* input for projection and depth-of-field calculations. Focus distance and
|
|
11
|
+
* later digital/output crops are deliberately excluded from this conventional
|
|
12
|
+
* equivalence quantity.
|
|
13
|
+
*
|
|
14
|
+
* @param input Physical focal length and active physical capture area.
|
|
15
|
+
* @returns Actual and diagonal-based 35 mm-equivalent focal lengths.
|
|
16
|
+
*/
|
|
17
|
+
export function calculateEquivalentFocalLength35Mm(input) {
|
|
18
|
+
requirePositiveFinite("focalLengthMm", input.focalLengthMm);
|
|
19
|
+
const imagingAreaMetrics = calculateImagingAreaMetrics(input.activeImagingArea).value;
|
|
20
|
+
return calculatedResult({
|
|
21
|
+
actualFocalLengthMm: input.focalLengthMm,
|
|
22
|
+
equivalentFocalLength35Mm: input.focalLengthMm * imagingAreaMetrics.cropFactor35Mm,
|
|
23
|
+
cropFactor35Mm: imagingAreaMetrics.cropFactor35Mm,
|
|
24
|
+
activeImagingAreaDiagonalMm: imagingAreaMetrics.diagonalMm,
|
|
25
|
+
basis: "diagonal"
|
|
26
|
+
}, "35mm-equivalent-focal-length", "1.0.0", [
|
|
27
|
+
"35 mm reference frame is 36 × 24 mm and equivalence is diagonal-based.",
|
|
28
|
+
"Actual focal length remains the physical optical focal length.",
|
|
29
|
+
"Focus distance is excluded from conventional 35 mm-equivalent focal length.",
|
|
30
|
+
"Digital/output cropping and output resolution are excluded; they must be described separately as output framing."
|
|
31
|
+
]);
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=equivalent-focal-length.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"equivalent-focal-length.js","sourceRoot":"","sources":["../../src/camera/equivalent-focal-length.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC,OAAO,EACL,gBAAgB,EAEjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,2BAA2B,EAE5B,MAAM,8BAA8B,CAAC;AAsBtC;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,kCAAkC,CAChD,KAA8C;IAE9C,qBAAqB,CAAC,eAAe,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAE5D,MAAM,kBAAkB,GAAG,2BAA2B,CACpD,KAAK,CAAC,iBAAiB,CACxB,CAAC,KAAK,CAAC;IAER,OAAO,gBAAgB,CACrB;QACE,mBAAmB,EAAE,KAAK,CAAC,aAAa;QACxC,yBAAyB,EACvB,KAAK,CAAC,aAAa,GAAG,kBAAkB,CAAC,cAAc;QACzD,cAAc,EAAE,kBAAkB,CAAC,cAAc;QACjD,2BAA2B,EAAE,kBAAkB,CAAC,UAAU;QAC1D,KAAK,EAAE,UAAU;KAClB,EACD,8BAA8B,EAC9B,OAAO,EACP;QACE,wEAAwE;QACxE,gEAAgE;QAChE,6EAA6E;QAC7E,kHAAkH;KACnH,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -11,6 +11,22 @@ export interface CalculateFieldOfViewInput {
|
|
|
11
11
|
*/
|
|
12
12
|
focusDistanceM?: number;
|
|
13
13
|
}
|
|
14
|
+
export interface CalculateFieldOfViewBoundsInput {
|
|
15
|
+
/** Lens focal length in millimetres. */
|
|
16
|
+
focalLengthMm: number;
|
|
17
|
+
/**
|
|
18
|
+
* Minimum sensor-plane coordinate in millimetres relative to the optical
|
|
19
|
+
* axis. Negative values lie on the negative side of the requested axis.
|
|
20
|
+
*/
|
|
21
|
+
minimumSensorCoordinateMm: number;
|
|
22
|
+
/**
|
|
23
|
+
* Maximum sensor-plane coordinate in millimetres relative to the optical
|
|
24
|
+
* axis.
|
|
25
|
+
*/
|
|
26
|
+
maximumSensorCoordinateMm: number;
|
|
27
|
+
/** Optional focus distance in metres. */
|
|
28
|
+
focusDistanceM?: number;
|
|
29
|
+
}
|
|
14
30
|
export interface FieldOfView {
|
|
15
31
|
/** Angular field of view in degrees. */
|
|
16
32
|
degrees: number;
|
|
@@ -19,6 +35,22 @@ export interface FieldOfView {
|
|
|
19
35
|
/** Projection/image-plane distance used by the geometry, in millimetres. */
|
|
20
36
|
projectionDistanceMm: number;
|
|
21
37
|
}
|
|
38
|
+
export interface FieldOfViewBounds {
|
|
39
|
+
/** Minimum signed angular bound in degrees. */
|
|
40
|
+
minimumDegrees: number;
|
|
41
|
+
/** Maximum signed angular bound in degrees. */
|
|
42
|
+
maximumDegrees: number;
|
|
43
|
+
/** Total angular span in degrees. */
|
|
44
|
+
degrees: number;
|
|
45
|
+
/** Minimum signed angular bound in radians. */
|
|
46
|
+
minimumRadians: number;
|
|
47
|
+
/** Maximum signed angular bound in radians. */
|
|
48
|
+
maximumRadians: number;
|
|
49
|
+
/** Total angular span in radians. */
|
|
50
|
+
radians: number;
|
|
51
|
+
/** Projection/image-plane distance used by the geometry, in millimetres. */
|
|
52
|
+
projectionDistanceMm: number;
|
|
53
|
+
}
|
|
22
54
|
/**
|
|
23
55
|
* Calculates rectilinear angular field of view as
|
|
24
56
|
* 2 * atan(sensorDimension / (2 * projectionDistance)).
|
|
@@ -29,9 +61,14 @@ export interface FieldOfView {
|
|
|
29
61
|
* focus plane.
|
|
30
62
|
*
|
|
31
63
|
* Neither mode models real-lens focus breathing or distortion.
|
|
32
|
-
*
|
|
33
|
-
* @param input Focal length, matching sensor dimension, and optional focus distance.
|
|
34
|
-
* @returns Angular field of view.
|
|
35
64
|
*/
|
|
36
65
|
export declare function calculateFieldOfView(input: CalculateFieldOfViewInput): CalculationResult<FieldOfView>;
|
|
66
|
+
/**
|
|
67
|
+
* Calculates an asymmetric rectilinear FOV span from signed sensor-plane
|
|
68
|
+
* bounds relative to the optical axis.
|
|
69
|
+
*
|
|
70
|
+
* This is required for off-center active sensor crops where the optical axis
|
|
71
|
+
* is not at the center of the retained rectangle.
|
|
72
|
+
*/
|
|
73
|
+
export declare function calculateFieldOfViewBounds(input: CalculateFieldOfViewBoundsInput): CalculationResult<FieldOfViewBounds>;
|
|
37
74
|
//# sourceMappingURL=field-of-view.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-of-view.d.ts","sourceRoot":"","sources":["../../src/camera/field-of-view.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"field-of-view.d.ts","sourceRoot":"","sources":["../../src/camera/field-of-view.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,+BAA+B,CAAC;AAOvC,MAAM,WAAW,yBAAyB;IACxC,wCAAwC;IACxC,aAAa,EAAE,MAAM,CAAC;IACtB,qFAAqF;IACrF,iBAAiB,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,+BAA+B;IAC9C,wCAAwC;IACxC,aAAa,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,yBAAyB,EAAE,MAAM,CAAC;IAClC;;;OAGG;IACH,yBAAyB,EAAE,MAAM,CAAC;IAClC,yCAAyC;IACzC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,4EAA4E;IAC5E,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED,MAAM,WAAW,iBAAiB;IAChC,+CAA+C;IAC/C,cAAc,EAAE,MAAM,CAAC;IACvB,+CAA+C;IAC/C,cAAc,EAAE,MAAM,CAAC;IACvB,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,cAAc,EAAE,MAAM,CAAC;IACvB,+CAA+C;IAC/C,cAAc,EAAE,MAAM,CAAC;IACvB,qCAAqC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,4EAA4E;IAC5E,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAuCD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,yBAAyB,GAC/B,iBAAiB,CAAC,WAAW,CAAC,CAsBhC;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,KAAK,EAAE,+BAA+B,GACrC,iBAAiB,CAAC,iBAAiB,CAAC,CAmDtC"}
|
|
@@ -1,7 +1,32 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
import { calculatedResult } from "../core/calculation-result.js";
|
|
3
|
-
import { requirePositiveFinite } from "../core/validation.js";
|
|
3
|
+
import { InvalidScientificInputError, requirePositiveFinite } from "../core/validation.js";
|
|
4
4
|
import { calculateThinLensImageDistance } from "../optics/thin-lens.js";
|
|
5
|
+
function resolveProjectionDistance(focalLengthMm, focusDistanceM) {
|
|
6
|
+
requirePositiveFinite("focalLengthMm", focalLengthMm);
|
|
7
|
+
const focusProjection = focusDistanceM === undefined
|
|
8
|
+
? undefined
|
|
9
|
+
: calculateThinLensImageDistance({
|
|
10
|
+
focalLengthMm,
|
|
11
|
+
objectDistanceM: focusDistanceM
|
|
12
|
+
});
|
|
13
|
+
return {
|
|
14
|
+
projectionDistanceMm: focusProjection?.value.imageDistanceMm ?? focalLengthMm,
|
|
15
|
+
focusAware: focusProjection !== undefined
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function fieldOfViewAssumptions(focusAware) {
|
|
19
|
+
return focusAware
|
|
20
|
+
? [
|
|
21
|
+
"Ideal rectilinear paraxial thin-lens projection",
|
|
22
|
+
"Sensor plane uses the thin-lens image distance for the supplied focus distance",
|
|
23
|
+
"Real-lens focus breathing and distortion are not modeled"
|
|
24
|
+
]
|
|
25
|
+
: [
|
|
26
|
+
"Ideal rectilinear/pinhole projection",
|
|
27
|
+
"Nominal focal length represents the infinity-focus projection distance"
|
|
28
|
+
];
|
|
29
|
+
}
|
|
5
30
|
/**
|
|
6
31
|
* Calculates rectilinear angular field of view as
|
|
7
32
|
* 2 * atan(sensorDimension / (2 * projectionDistance)).
|
|
@@ -12,36 +37,53 @@ import { calculateThinLensImageDistance } from "../optics/thin-lens.js";
|
|
|
12
37
|
* focus plane.
|
|
13
38
|
*
|
|
14
39
|
* Neither mode models real-lens focus breathing or distortion.
|
|
15
|
-
*
|
|
16
|
-
* @param input Focal length, matching sensor dimension, and optional focus distance.
|
|
17
|
-
* @returns Angular field of view.
|
|
18
40
|
*/
|
|
19
41
|
export function calculateFieldOfView(input) {
|
|
20
|
-
requirePositiveFinite("focalLengthMm", input.focalLengthMm);
|
|
21
42
|
requirePositiveFinite("sensorDimensionMm", input.sensorDimensionMm);
|
|
22
|
-
const
|
|
23
|
-
? undefined
|
|
24
|
-
: calculateThinLensImageDistance({
|
|
25
|
-
focalLengthMm: input.focalLengthMm,
|
|
26
|
-
objectDistanceM: input.focusDistanceM
|
|
27
|
-
});
|
|
28
|
-
const projectionDistanceMm = focusProjection?.value.imageDistanceMm ?? input.focalLengthMm;
|
|
43
|
+
const { projectionDistanceMm, focusAware } = resolveProjectionDistance(input.focalLengthMm, input.focusDistanceM);
|
|
29
44
|
const radians = 2 * Math.atan(input.sensorDimensionMm / (2 * projectionDistanceMm));
|
|
30
45
|
return calculatedResult({
|
|
31
46
|
radians,
|
|
32
47
|
degrees: (radians * 180) / Math.PI,
|
|
33
48
|
projectionDistanceMm
|
|
34
|
-
},
|
|
35
|
-
? "rectilinear-field-of-view"
|
|
36
|
-
: "
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
49
|
+
}, focusAware
|
|
50
|
+
? "focus-aware-rectilinear-field-of-view"
|
|
51
|
+
: "rectilinear-field-of-view", "1.0.0", fieldOfViewAssumptions(focusAware));
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Calculates an asymmetric rectilinear FOV span from signed sensor-plane
|
|
55
|
+
* bounds relative to the optical axis.
|
|
56
|
+
*
|
|
57
|
+
* This is required for off-center active sensor crops where the optical axis
|
|
58
|
+
* is not at the center of the retained rectangle.
|
|
59
|
+
*/
|
|
60
|
+
export function calculateFieldOfViewBounds(input) {
|
|
61
|
+
if (!Number.isFinite(input.minimumSensorCoordinateMm)) {
|
|
62
|
+
throw new InvalidScientificInputError("minimumSensorCoordinateMm must be finite.");
|
|
63
|
+
}
|
|
64
|
+
if (!Number.isFinite(input.maximumSensorCoordinateMm)) {
|
|
65
|
+
throw new InvalidScientificInputError("maximumSensorCoordinateMm must be finite.");
|
|
66
|
+
}
|
|
67
|
+
if (input.maximumSensorCoordinateMm <= input.minimumSensorCoordinateMm) {
|
|
68
|
+
throw new InvalidScientificInputError("maximumSensorCoordinateMm must be greater than minimumSensorCoordinateMm.");
|
|
69
|
+
}
|
|
70
|
+
const { projectionDistanceMm, focusAware } = resolveProjectionDistance(input.focalLengthMm, input.focusDistanceM);
|
|
71
|
+
const minimumRadians = Math.atan(input.minimumSensorCoordinateMm / projectionDistanceMm);
|
|
72
|
+
const maximumRadians = Math.atan(input.maximumSensorCoordinateMm / projectionDistanceMm);
|
|
73
|
+
const radians = maximumRadians - minimumRadians;
|
|
74
|
+
return calculatedResult({
|
|
75
|
+
minimumRadians,
|
|
76
|
+
maximumRadians,
|
|
77
|
+
radians,
|
|
78
|
+
minimumDegrees: (minimumRadians * 180) / Math.PI,
|
|
79
|
+
maximumDegrees: (maximumRadians * 180) / Math.PI,
|
|
80
|
+
degrees: (radians * 180) / Math.PI,
|
|
81
|
+
projectionDistanceMm
|
|
82
|
+
}, focusAware
|
|
83
|
+
? "focus-aware-asymmetric-rectilinear-field-of-view"
|
|
84
|
+
: "asymmetric-rectilinear-field-of-view", "1.0.0", [
|
|
85
|
+
...fieldOfViewAssumptions(focusAware),
|
|
86
|
+
"Signed sensor-plane bounds are measured relative to the optical axis."
|
|
87
|
+
]);
|
|
46
88
|
}
|
|
47
89
|
//# sourceMappingURL=field-of-view.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-of-view.js","sourceRoot":"","sources":["../../src/camera/field-of-view.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC,OAAO,EACL,gBAAgB,EAEjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,
|
|
1
|
+
{"version":3,"file":"field-of-view.js","sourceRoot":"","sources":["../../src/camera/field-of-view.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC,OAAO,EACL,gBAAgB,EAEjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,2BAA2B,EAC3B,qBAAqB,EACtB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,8BAA8B,EAAE,MAAM,wBAAwB,CAAC;AA0DxE,SAAS,yBAAyB,CAChC,aAAqB,EACrB,cAAkC;IAKlC,qBAAqB,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;IAEtD,MAAM,eAAe,GACnB,cAAc,KAAK,SAAS;QAC1B,CAAC,CAAC,SAAS;QACX,CAAC,CAAC,8BAA8B,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CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,yBAAyB,CAAC,EAAE,CAAC;QACtD,MAAM,IAAI,2BAA2B,CACnC,2CAA2C,CAC5C,CAAC;IACJ,CAAC;IACD,IACE,KAAK,CAAC,yBAAyB,IAAI,KAAK,CAAC,yBAAyB,EAClE,CAAC;QACD,MAAM,IAAI,2BAA2B,CACnC,2EAA2E,CAC5E,CAAC;IACJ,CAAC;IAED,MAAM,EAAE,oBAAoB,EAAE,UAAU,EAAE,GAAG,yBAAyB,CACpE,KAAK,CAAC,aAAa,EACnB,KAAK,CAAC,cAAc,CACrB,CAAC;IAEF,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAC9B,KAAK,CAAC,yBAAyB,GAAG,oBAAoB,CACvD,CAAC;IACF,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAC9B,KAAK,CAAC,yBAAyB,GAAG,oBAAoB,CACvD,CAAC;IACF,MAAM,OAAO,GAAG,cAAc,GAAG,cAAc,CAAC;IAEhD,OAAO,gBAAgB,CACrB;QACE,cAAc;QACd,cAAc;QACd,OAAO;QACP,cAAc,EAAE,CAAC,cAAc,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE;QAChD,cAAc,EAAE,CAAC,cAAc,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE;QAChD,OAAO,EAAE,CAAC,OAAO,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE;QAClC,oBAAoB;KACrB,EACD,UAAU;QACR,CAAC,CAAC,kDAAkD;QACpD,CAAC,CAAC,sCAAsC,EAC1C,OAAO,EACP;QACE,GAAG,sBAAsB,CAAC,UAAU,CAAC;QACrC,uEAAuE;KACxE,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calculation-result.d.ts","sourceRoot":"","sources":["../../src/core/calculation-result.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,MAAM,cAAc,GACt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,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,kBAAkB;IACjC,WAAW,CAAC,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAC7C,WAAW,CAAC,EAAE,SAAS,qBAAqB,EAAE,CAAC;IAC/C,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,KAAK,EAAE,CAAC,CAAC;IACT,UAAU,EAAE,qBAAqB,CAAC;IAClC,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B;
|
|
1
|
+
{"version":3,"file":"calculation-result.d.ts","sourceRoot":"","sources":["../../src/core/calculation-result.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,MAAM,MAAM,cAAc,GACtB,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,eAAe,CAAC;AAEpB;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,wDAAwD;IACxD,IAAI,EAAE,cAAc,CAAC;IACrB,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,gEAAgE;IAChE,YAAY,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,aAAa,GACb,qBAAqB,GACrB,aAAa,CAAC;AAElB;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,uBAAuB;IAC/B,6EAA6E;IAC7E,YAAY,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,MAAM,EAAE,iBAAiB,CAAC;IA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CAAC,EAChC,KAAK,EAAE,CAAC,EACR,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,EACpB,WAAW,CAAC,EAAE,SAAS,MAAM,EAAE,EAC/B,OAAO,CAAC,EAAE,kBAAkB,GAC3B,iBAAiB,CAAC,CAAC,CAAC,CAWtB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,KAAK,EAAE,CAAC,EACR,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,OAAO,CAAC,EAAE,kBAAkB,GAC3B,iBAAiB,CAAC,CAAC,CAAC,CAWtB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAC/B,KAAK,EAAE,CAAC,EACR,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,OAAO,EAAE,kBAAkB,GAC1B,iBAAiB,CAAC,CAAC,CAAC,CAWtB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,KAAK,EAAE,CAAC,EACR,KAAK,EAAE,MAAM,EACb,YAAY,EAAE,MAAM,EACpB,WAAW,EAAE,SAAS,MAAM,EAAE,EAC9B,OAAO,EAAE,kBAAkB,GAC1B,iBAAiB,CAAC,CAAC,CAAC,CAWtB"}
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
import { InvalidScientificResultError } from "./validation.js";
|
|
3
|
+
const UNCERTAINTY_SOURCES = new Set([
|
|
4
|
+
"measurement",
|
|
5
|
+
"model-approximation",
|
|
6
|
+
"calibration"
|
|
7
|
+
]);
|
|
3
8
|
function requireNonEmptyString(path, value) {
|
|
4
|
-
if (value.trim().length === 0) {
|
|
9
|
+
if (typeof value !== "string" || value.trim().length === 0) {
|
|
5
10
|
throw new InvalidScientificResultError(`Calculation quality field ${path} must not be empty.`);
|
|
6
11
|
}
|
|
7
12
|
}
|
|
@@ -24,6 +29,9 @@ function validateConfidence(confidence, path) {
|
|
|
24
29
|
function validateUncertaintyEstimate(estimate, index) {
|
|
25
30
|
const path = `uncertainty[${index}]`;
|
|
26
31
|
requireNonEmptyString(`${path}.quantityPath`, estimate.quantityPath);
|
|
32
|
+
if (!UNCERTAINTY_SOURCES.has(estimate.source)) {
|
|
33
|
+
throw new InvalidScientificResultError(`Calculation quality field ${path}.source is invalid.`);
|
|
34
|
+
}
|
|
27
35
|
validateConfidence(estimate.confidence, `${path}.confidence`);
|
|
28
36
|
if (estimate.note !== undefined) {
|
|
29
37
|
requireNonEmptyString(`${path}.note`, estimate.note);
|
|
@@ -33,7 +41,11 @@ function validateUncertaintyEstimate(estimate, index) {
|
|
|
33
41
|
requireNonEmptyString(`${path}.unit`, estimate.unit);
|
|
34
42
|
return;
|
|
35
43
|
}
|
|
36
|
-
|
|
44
|
+
if (estimate.kind === "relative") {
|
|
45
|
+
requireNonNegativeFinite(`${path}.fraction`, estimate.fraction);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
throw new InvalidScientificResultError(`Calculation quality field ${path}.kind is invalid.`);
|
|
37
49
|
}
|
|
38
50
|
function validateValidRange(range, index) {
|
|
39
51
|
const path = `validRanges[${index}]`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calculation-result.js","sourceRoot":"","sources":["../../src/core/calculation-result.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AA2H/D,SAAS,qBAAqB,CAAC,IAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"calculation-result.js","sourceRoot":"","sources":["../../src/core/calculation-result.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AA2H/D,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAoB;IACrD,a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B,KAAK,EACL;QACE,IAAI,EAAE,eAAe;QACrB,KAAK;QACL,YAAY;QACZ,WAAW;KACZ,EACD,OAAO,CACR,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAC7B,KAAQ,EACR,KAAa,EACb,YAAoB,EACpB,WAA8B,EAC9B,OAA2B;IAE3B,OAAO,YAAY,CACjB,KAAK,EACL;QACE,IAAI,EAAE,WAAW;QACjB,KAAK;QACL,YAAY;QACZ,WAAW;KACZ,EACD,OAAO,CACR,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAC9B,KAAQ,EACR,KAAa,EACb,YAAoB,EACpB,WAA8B,EAC9B,OAA2B;IAE3B,OAAO,YAAY,CACjB,KAAK,EACL;QACE,IAAI,EAAE,YAAY;QAClB,KAAK;QACL,YAAY;QACZ,WAAW;KACZ,EACD,OAAO,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error thrown when external configuration data does not match a public
|
|
3
|
+
* runtime schema.
|
|
4
|
+
*/
|
|
5
|
+
export declare class InvalidConfigurationError extends TypeError {
|
|
6
|
+
readonly code = "INVALID_CONFIGURATION";
|
|
7
|
+
constructor(message: string);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=configuration-error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuration-error.d.ts","sourceRoot":"","sources":["../../src/core/configuration-error.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,qBAAa,yBAA0B,SAAQ,SAAS;IACtD,QAAQ,CAAC,IAAI,2BAA2B;gBAE5B,OAAO,EAAE,MAAM;CAI5B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
/**
|
|
3
|
+
* Error thrown when external configuration data does not match a public
|
|
4
|
+
* runtime schema.
|
|
5
|
+
*/
|
|
6
|
+
export class InvalidConfigurationError extends TypeError {
|
|
7
|
+
code = "INVALID_CONFIGURATION";
|
|
8
|
+
constructor(message) {
|
|
9
|
+
super(message);
|
|
10
|
+
this.name = "InvalidConfigurationError";
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=configuration-error.js.map
|