optiland icon indicating copy to clipboard operation
optiland copied to clipboard

Comprehensive optical design, optimization, and analysis in Python, including GPU-accelerated and differentiable ray tracing via PyTorch.

Forks Watchers License Stars

Optiland

Table of Contents
  1. Introduction
  2. Installation
  3. Functionalities
  4. Learning Guide
  5. License
  6. Contact
  7. Acknowledgements & References

Introduction

Optiland is a lens design and analysis program written in Python 3. It provides an intuitive and efficient interface for defining and visualizing lens systems, performing optimization of lens systems based on user-defined merit functions and variables, as well as analyzing optical systems using geometric and diffraction-based methods. Leveraging computational libraries such as NumPy and SciPy, Optiland delivers exceptional performance and efficiency in handling complex optical computations.

Get started immediately with Optiland Tutorial #1 or see the extensive Learning Guide.

U.S. patent 2959100

Python code to generate this 3D visualization:

from optiland.samples.objectives import ReverseTelephoto
lens = ReverseTelephoto()
lens.draw3D()

Installation

You can install the package using pip. To do so, follow these steps:

  1. Open a terminal or command prompt.

  2. Run the following command to install the package:

    pip install git+https://github.com/HarrisonKramer/optiland.git
    

Functionalities

  • Lens entry
  • 2D/3D visualization
  • Paraxial analysis
  • Real and paraxial ray tracing
  • Real analysis functions (spot diagrams, ray aberration fans, OPD fans, distortion, MTF, etc.)
  • Glass catalogue and index/abbe v-number determination (based on refractiveindex.info)
  • Design optimization
  • Wavefront and Zernike analysis
  • Coating analysis

The code itself is in constant flux and new functionalities are always being added.

Learning Guide

This guide gives a step-by-step approach to learning how to use Optiland.

  1. Introduction to Optiland
  2. Real Raytracing & Analysis
  3. Aberrations
  4. Optical Path Difference (OPD), Point Spread Functions (PSF) & Modulation Transfer Function (MTF)
  5. Optimization
  6. Coatings & Polarization
  7. Advanced Optical Design
    • Tutorial 7a - Designing a Complex System - Update in progress (target completion: Sept. 2024)
    • Tutorial 7b - Surface Roughness & Scattering - Update in progress (target completion: Sept. 2024)
    • Tutorial 7c - Freeform Surfaces - Update in progress (target completion: Sept. 2024)
  8. Tolerancing
    • Tutorial 8a - Introduction to Tolerancing - Update in progress (target completion: Sept. 2024)
      • Sensitivity studies
    • Tutorial 8b - Advanced Tolerancing - Update in progress (target completion: Sept. 2024)
      • Monte Carlo-based Tolerancing
  9. Extending Optiland
    • Tutorial 9a - Custom Surface Types - Update in progress (target completion: Sept. 2024)
      • Adding new surface types
    • Tutorial 9b - Custom Coating Types - Update in progress (target completion: Sept. 2024)
      • Adding new coating types
    • Tutorial 9c - Custom Optimization Algorithms - Update in progress (target completion: Sept. 2024)
      • Adding new optimization approaches
  10. Machine Learning in Optical Design
    • Tutorial 10a - Reinforcement Learning for Lens Design - Update in progress (target completion: Sept. 2024)

License

Distributed under the GPL-3.0 License. See LICENSE for more information.

Contact

Kramer Harrison - [email protected]

Acknowledgements & References

  • https://www.lens-designs.com/
  • https://github.com/Sterncat/opticspy
  • https://github.com/jordens/rayopt