We present a new Matlab toolbox for generating phase and amplitude patterns for digital micro-mirror device (DMD) and liquid crystal (LC) based spatial light modulators (SLMs). This toolbox consists of a collection of algorithms commonly used for generating patterns for these devices with a focus on optical tweezers beam shaping applications. In addition to the algorithms provided, we have put together a range of user interfaces for simplifying the use of these patterns. The toolbox currently has functionality to generate patterns which can be saved as an image or displayed on a device/screen using the supplied interface. We have only implemented interfaces for the devices our group currently uses but we believe that extending the code we provide to other devices should be fairly straightforward. The range of algorithms included in the toolbox is not exhaustive. However, by making the toolbox open sources and available on GitHub we hope that other researchers working with these devices will contribute their patterns/algorithms to the toolbox. Program summaryProgram Title: OTSLM Toolbox for Structured Light MethodsProgram Files doi:http://dx.doi.org/10.17632/8sc66m9r7s.1Licensing provisions: GPLv3Programming language: MatlabNature of problem: There are many algorithms for generating computer controlled holograms however the code and descriptions for these algorithms is often provided as supplementary material to research publications which use these methods, and in some cases only the description is provided without code to reproduce the pattern. Furthermore, implementation of these algorithms can be a time consuming task. Even for simple patterns with simple analytical expressions for the far-field phase or amplitude, such as the Laguerre-Gaussian and Hermite-Gaussian beams, time is often wasted by researchers having to re-implement and test these patterns. Existing libraries for generation of SLM patterns focus on specific tasks, methods of pattern generation, or target specific hardware. These libraries are not general purpose or easily modifiable for general use by researchers working with computer controlled holograms in fields such as beam shaping and optical tweezers.Solution method: We have assembled a toolbox containing many methods commonly used with these devices. The number of methods available makes assembling a complete toolbox impossible, instead we have focused on putting together a general collection of methods, in the form of an open source toolbox, with the hope that other researchers will contribute patterns/algorithms they use. The toolbox currently includes a range of simple and iterative methods for beam shaping and steering as well as some of the methods our group currently uses for SLM control, calibration, imaging and optical tweezers beam shaping. To make the tools we have developed easy to use, we have tried to maintain a consistent well documented interface to each of the functions and provided graphical user interfaces to many of the simpler functions enabling code-free pattern generation.Additional comments: Some of the features require the Optical Tweezers Toolbox [1], in particular, the non-paraxial beam visualisation and optimisation routines. Certain functions require components from other Matlab packages such as the image acquisition toolbox, these can be licensed and installed from Mathworks. There is also interest from the authors in providing a Python version that requires no proprietary components depending on interest from the community. A public repository for the toolbox is available on GitHub [2].
Read full abstract