Lentil is a Python package for developing high-performance diffraction simulations. Lentil provides an easy to use framework for modeling optical systems and simulating the wave propagation of light through them. Traditional Fourier optics-based approaches for numerically modeling diffraction rely on the Fast Fourier Transform (FFT) for simulating free space propagation. Despite computational efficiencies provided by the FFT, these simulations can be slow and memory-intensive due to very large array sizes needed to satisfy numerical sampling requirements imposed by the FFT algorithm. Modeling large apertures, highly aberrated or misaligned systems, or small features like primary mirror segment gaps demand even finer sampling, further degrading performance. Directly computing the discrete Fourier transform (DFT) in diffraction calculations provides greater flexibility and increased performance when compared with computing an equivalent FFT. Lentil offers generalized diffraction propagation routines using the DFT that improve simulation performance substantially, with additional optimizations for modeling segmented apertures. Lentil also implements a hybrid propagation algorithm blending physical and geometric optics to greatly improve performance in simulations where representing large tilts is required. Additionally, Lentil includes tools for modeling static and dynamic wavefront errors, radiometry, and focal plane arrays. The Lentil package and its accompanying documentation are freely available as open-source software.
|