@photivra/engine 2.14.1 → 2.15.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 (37) hide show
  1. package/CHANGELOG.md +23 -1
  2. package/CITATION.cff +1 -1
  3. package/README.md +6 -6
  4. package/SECURITY.md +1 -1
  5. package/dist/core/version.d.ts +1 -1
  6. package/dist/core/version.js +1 -1
  7. package/dist/core/version.js.map +1 -1
  8. package/dist/facade/simulate-capture.d.ts +1 -1
  9. package/dist/facade/simulate-capture.js +15 -4
  10. package/dist/facade/simulate-capture.js.map +1 -1
  11. package/dist/index.d.ts +1 -0
  12. package/dist/index.js +1 -0
  13. package/dist/index.js.map +1 -1
  14. package/dist/optics/defocus-disc-kernel.d.ts +90 -1
  15. package/dist/optics/defocus-disc-kernel.js +58 -5
  16. package/dist/optics/defocus-disc-kernel.js.map +1 -1
  17. package/dist/optics/diffraction-psf-profile.d.ts +9 -4
  18. package/dist/optics/diffraction-psf-profile.js +14 -6
  19. package/dist/optics/diffraction-psf-profile.js.map +1 -1
  20. package/dist/optics/lens-psf-kernels.d.ts +13 -2
  21. package/dist/optics/lens-psf-kernels.js +23 -6
  22. package/dist/optics/lens-psf-kernels.js.map +1 -1
  23. package/dist/optics/site-diffraction-kernel.d.ts +1 -1
  24. package/dist/optics/site-diffraction-kernel.js +37 -17
  25. package/dist/optics/site-diffraction-kernel.js.map +1 -1
  26. package/docs/AGENT_GUIDE.md +1 -0
  27. package/docs/API_REFERENCE.md +12 -1
  28. package/docs/QUICK_START.md +20 -4
  29. package/docs/USAGE.md +17 -0
  30. package/docs/api/core-version.md +1 -1
  31. package/docs/api/exports.json +22 -2
  32. package/docs/api/facade-simulate-capture.md +1 -1
  33. package/docs/api/optics-defocus-disc-kernel.md +86 -0
  34. package/docs/api/optics-diffraction-psf-profile.md +6 -3
  35. package/docs/api/optics-lens-psf-kernels.md +3 -2
  36. package/llms.txt +1 -0
  37. package/package.json +1 -1
@@ -26,7 +26,7 @@ export interface CreateDiffractionLimitedPsfProfileInput {
26
26
  focalLengthMm: number;
27
27
  apertureFNumber: number;
28
28
  focus: FocusPlane;
29
- /** Strictly increasing wavelengths, nm, in the medium of propagation (no air/vacuum conversion is applied). 1–64. */
29
+ /** Strictly increasing wavelengths, nm, in the medium of propagation (no air/vacuum conversion is applied). 1–400. */
30
30
  wavelengthsNm: readonly number[];
31
31
  /** Square sample pitch of every kernel, µm. */
32
32
  samplePitchMicrometers: number;
@@ -40,10 +40,13 @@ export interface CreateDiffractionLimitedPsfProfileInput {
40
40
 
41
41
  ## DIFFRACTION_LIMITED_PSF_PROFILE_LIMITS
42
42
 
43
- Input limits: at most 64 wavelengths, kernel radius 0–32 samples (the irradiance-convolution limit).
43
+ Input limits: at most 400 wavelengths, kernel radius 0–32 samples (the irradiance-convolution limit). 400 is the finest spectral
44
+ sampling of `simulateCapture` and the display view (`sensor.spectralStepNanometers` 1 nm over 380–780 nm), so `lens.diffraction`
45
+ builds one exact kernel per spectral node at every allowed step; it was 64 before 2.15.0, which refused every step under 6.25 nm.
46
+ The work and memory are linear in the count (measured in docs/PSF_FOUNDATION.md, "Spectral nodes").
44
47
 
45
48
  ```ts
46
- DIFFRACTION_LIMITED_PSF_PROFILE_LIMITS = Object.freeze({ maximumWavelengths: 64, maximumKernelRadiusSamples: 32 })
49
+ DIFFRACTION_LIMITED_PSF_PROFILE_LIMITS = Object.freeze({ maximumWavelengths: 400, maximumKernelRadiusSamples: 32 })
47
50
  ```
48
51
 
49
52
  ## DIFFRACTION_LIMITED_PSF_PROFILE_MODEL
@@ -4,10 +4,11 @@ The package and root API versions are recorded once in [Navigation](../API_REFER
4
4
 
5
5
  ## LENS_PSF_CONVOLUTION_KERNELS_MAXIMUM_WAVELENGTHS
6
6
 
7
- At most this many wavelengths per call.
7
+ At most this many wavelengths per call: 400, the finest spectral sampling of `simulateCapture` (1 nm over 380–780 nm),
8
+ as `DIFFRACTION_LIMITED_PSF_PROFILE_LIMITS.maximumWavelengths` (64 before 2.15.0). The work is linear in the count.
8
9
 
9
10
  ```ts
10
- LENS_PSF_CONVOLUTION_KERNELS_MAXIMUM_WAVELENGTHS = 64
11
+ LENS_PSF_CONVOLUTION_KERNELS_MAXIMUM_WAVELENGTHS = 400
11
12
  ```
12
13
 
13
14
  ## LENS_PSF_CONVOLUTION_KERNELS_SCHEMA_VERSION
package/llms.txt CHANGED
@@ -20,6 +20,7 @@
20
20
  - [calculateEquivalentIso()](https://github.com/Photivra/photivra/blob/main/docs/api/exposure-exposure.md#calculateequivalentiso): ISO that keeps the same brightness after an aperture or shutter change
21
21
  - [calculateDepthOfField()](https://github.com/Photivra/photivra/blob/main/docs/api/optics-depth-of-field.md#calculatedepthoffield): near and far limits and hyperfocal distance (thin lens)
22
22
  - [calculateDefocusCircle()](https://github.com/Photivra/photivra/blob/main/docs/api/optics-depth-of-field.md#calculatedefocuscircle): blur-circle size for an out-of-focus subject
23
+ - [calculateDefocusDiscKernelRadius()](https://github.com/Photivra/photivra/blob/main/docs/api/optics-defocus-disc-kernel.md#calculatedefocusdisckernelradius): whether `lens.defocus` can render a blur before you render it (the 64-site limit)
23
24
  - [calculateFieldOfView()](https://github.com/Photivra/photivra/blob/main/docs/api/camera-field-of-view.md#calculatefieldofview): angle of view from focal length and sensor size
24
25
  - [calculateEquivalentFocalLength35Mm()](https://github.com/Photivra/photivra/blob/main/docs/api/camera-equivalent-focal-length.md#calculateequivalentfocallength35mm): crop factor and 35 mm-equivalent focal length
25
26
  - [calculateCenteredCrop()](https://github.com/Photivra/photivra/blob/main/docs/api/output-crop.md#calculatecenteredcrop): pixels left after a centred crop
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@photivra/engine",
3
- "version": "2.14.1",
3
+ "version": "2.15.0",
4
4
  "private": false,
5
5
  "description": "Scientific TypeScript engine for camera optics, exposure, focus, motion, sensor sampling, diffraction, and digital imaging calculations.",
6
6
  "type": "module",