Repository navigation
DeepLens v2.3.0
DeepLens v2.3.0
This release unifies the lens PSF/render API across all lens types, adds automatic PSF field upsampling for high-resolution sensors, and lands a large correctness/robustness pass on the core (non-square geometry, device handling, NaN guards) backed by a substantial new test suite.
✨ Features
- Unified lens PSF/render API across
GeoLens,HybridLens,DiffractiveLens,DefocusLens, andPSFNetLens. Every lens now exposes the same canonical contract —psf(points, wvln=None, ks=PSF_KS, **kwargs), pluspsf_rgb()andrender()— so models are interchangeable regardless of concrete type. A newtest_lens_api_conformance.pyenforces the contract. - Automatic PSF field upsampling for large (~4000×4000) sensor resolutions, picking a sensible upsample factor instead of requiring manual tuning.
🐛 Fixes
- Core pressure-test audit: hardened the simulation core against crashes, non-square (W≠H) sensor/wave geometry, device-placement mismatches, and performance regressions.
- Non-square wave geometry: pixel-centred grids in
ComplexWavefactories now respect the[H, W]convention consistently. - DOE aperture shape is preserved through the hybrid/diffractive pipeline.
- Zemax
.zmxexport: corrected aperture size. - Gradient guards: degenerate-but-legal inputs (duplicate interpolation keys, grazing rays, etc.) no longer emit NaN/inf that silently poisoned gradient-based design.
♻️ Refactors
ops.pymerged intoutils.py— the differentiable tensor ops (interp1d,grid_sample_xy,diff_float,diff_quantize) now live alongside the other utilities;deeplens/ops.pyis removed.
📦 Data & Chores
- Sensor datasets reorganized by manufacturer (
datasets/sensors/<vendor>/...); added Canon EOS 5D Mark II/III and FLIR BFS sensor profiles. - Docs moved to a separate repository (
mkdocs.yml/docs/removed from this repo).
✅ Testing
- Full suite green: 446 passed on CPU. New regression/coverage files:
test_crash_regressions,test_device_selection,test_efficiency,test_nan_guards,test_nonsquare_wave,test_minor_cleanup,test_lens_api_conformance.
Full Changelog: v2.2.0...v2.3.0