1. Introduction.

Current version = 2.1.4

LightPipes for Python is a set of functions written in Python. It is designed to model coherent optical devices when the diffraction is essential. The toolbox consists of a number of functions. Each function represents an optical element or a step in the light propagation. There are apertures, intensity filters, beam-splitters, lenses and models of free space diffraction in LightPipes. There are also more advanced tools for manipulating the phase and amplitude of the light. The program operates on a large data structure, containing square two-dimensional arrays of complex amplitudes of the optical field of the propagating light beam.

See for more details: https://github.com/opticspy/lightpipes

Originally, LightPipes was made by Gleb Vdovin for MSDOS and Linux.

There are also versions of LightPipes for Matlab, Octave and Mathcad. These can be obtained from:

_images/OKO_logo_new.png

Flexible Optical, Rijswijk, The Netherlands.

LightPipes for Python is open source and can be installed for free on all platforms with Python version 3 by typing at a terminal prompt:

pip install LightPipes

To get started with LightPipes for Python you can examine the examples. There is also a section, Computer practical. with assignments to study optics by performing computer experiments. Although these computer experiments can never replace the real optics laboratory they can serve as an introduction to real optical experiments. In fact this is done at the Applied Physics department of the University of Twente for the Introduction to Optics course of the second years Bachelor.

1.1. Credits.

Gleb Vdovin

LightPipes was written by Gleb Vdovin in 1993 for MS DOS. The output of a command was the input for the next command. Gleb used the “pipe” feature of MS DOS, that’s why it is called LightPipes. The source code of LightPipes for UNIX can be obtained for free from http://www.okotech.com.

Fred van Goor

Fred rewrote the commands for using them in Mathcad and Matlab in 1996. Later he made a version for Python (2017). The Mathcad and Matlab versions (not free) can be obtained from Flexible Optical, http://www.okotech.com. The Python version can be obtained for free from https://github.com/opticspy/lightpipes. He also developed the LightPipes for Python website using Sphinx. Fred used LightPipes for his course “Introduction to Optics” at the University of Twente as an introduction to the optics lab. See how Fred is blowing out a HeNe laser during this lesson. (The laser stops because the outcoupling mirror was covered with vapor from Fred’s breath)

Guyskk

Guyskk’ s contribution to the development of the LightPipes C++ package was very important. His knowledge of Python helped a lot to get the package operative for the windows, macintosh and several linux platforms.

Leonard Doyle

Leonard translated the C++ code of LightPipes into pure Python, using the numpy, scipy and pyFFTW packages. Thanks to the matrix routines of numpy and the fast pyFFTW Fourier transform the speed of the pure python version is as fast as the C++ version. Also parallel processing is possible now, which enhances the speed even more. From LightPipes version 2.0.0 LightPipes is pure python. As usual, it can be installed with pip:

pip install LightPipes

The older C++ versions are still on PyPi and can be installed by typing (for the latest C++ version, 1.2.0):

pip install LightPipes==1.2.0