Skip to content

bryancole/raypier_optics

Repository files navigation

Raypier - A Non-sequential optical ray-tracing framework

Raypier is a non-sequential ray-tracing framework for modelling optical systems. Its main features are:

  1. It's pretty fast. The tracing algorithms are written in Cython (i.e. C) and use efficient data-structures for handling many thousands of rays.
  2. Correctly handles polarisation
  3. Sequential and non-sequential tracing.
  4. Support for dispersion including a comprehensive library of glass-types (taken from refractive-index.info) and diffraction-gratings
  5. Point Spread Function (PSF) and E-Field evaluation by summation of of Gaussian modes.
  6. Paraxial Gaussian mode evaluation covers generally astigmatic modes.
  7. Tracing support for conics section, general aspherics (conic + polnomial) and 2D polynomial surfaces.
  8. Zurnike polynomial surface distortions.
  9. An interactive user-interface with 3D model/ray rendering through VTK. Tracing is performed "live".
  10. A modest selection of optic-types including singlet and achromatic doublet lenses (with AR coating), plane-mirrors, ellipsoidal mirrors, prisms
  11. STEP model/trace export for integration with external CAD systems

There are still a few "big" features missing:

  1. The documentation is not comprehensive (yet).

Requirements

Raypier requires:

  • python >= 3.6
  • numpy
  • scipy
  • traits / traitsui
  • Cython
  • Mayavi (for TVTK) / VTK
  • (Optionally) pythonocc_core - for STEP export
  • (Optionally) Chaco / Enable - for integrating line-plots into the UI

Installation

The best way to install and run Raypier is using a Conda environment.

  1. Install miniconda (or the full Anaconda distribution)
  2. Create a fresh conda-environment using the environment.yml file included in this raypier repo.