Repository navigation
DeepLens is a differentiable optical lens simulator for computational imaging and optical design.
This patch release:
- F-number targets are now physical.
set_target_fov_fnumsets the F-number through the ray-traced entrance pupil rather than the stop radius.set_fnumbrackets the stop radius and then bisects it. It raisesValueErrororRuntimeErroron an invalid or unreachable target and restores the original stop radius, including stops abovemax_height(). - More robust real FoV.
calc_fovsweeps the field from on-axis, interpolates the first angle that reaches the sensor half-diagonal, and stops at the peak image height when the image folds back before the corner. A partly vignetted, freshly optimized lens is no longer reported with an inflated FoV. - Tighter geometry constraints.
loss_boundsamples each surface pair only over their shared radius, plus each surface's own rim, so aspheric sags are never extrapolated past a surface's aperture. - Ray throughput in spot analysis.
analysis_spotnow reports a per-fieldthroughput, the fraction of sampled rays that reach the sensor. A lost field no longer looks like a perfect zero-radius spot. - Faster aspheres. Aspheric sag and its derivatives are evaluated in Horner form. Values and gradients are unchanged, checked against explicit powers for degrees 0–10 in fp32 and fp64.
- Zemax export keeps catalog glass names. Glasses from Zemax-known catalogs export as
GCAT/GLASnames. Plastics and optimized materials still export as model glass. - Restored lens data.
datasets/lenses/camera/rf35mm_f1.8.jsonhad been empty since it was added. It is rebuilt from US 2019/0113711 Example 1 (EFL 36.0 mm, F/1.885, 63.2° diagonal). - Script fixes.
scripts/2_autolens_rms.pysaves the curriculum result before any step that can raise, and logs the achieved FoV as diagonal degrees. - Fixes the dead docs badge and stale script paths in the README. Makes the test suite independent of the shell locale.
Install with Python 3.12:
python -m pip install --upgrade deeplens-core==2.5.5For NVIDIA CUDA 12.8:
python -m pip install --upgrade deeplens-core==2.5.5 torch==2.10.0+cu128 torchvision==0.25.0+cu128 --extra-index-url https://download.pytorch.org/whl/cu128Validation: all 672 tests passed with CUDA enabled on an NVIDIA A100 80GB using Python 3.12.14, PyTorch 2.10.0+cu128, and torchvision 0.25.0+cu128. Ruff lint/format and Twine metadata checks passed.