Introduction#
optika is a Python package for designing optical systems inspired by
Zemax.
It allows the user to compute the spectral response and resolution of an
arbitrary optical system and optimize it using scipy.optimize.
The main design goals of optika are to
Use
astropy.unitsto specify the parameters of an optical system.Automatically compute the field of view and entrance pupil of a given optical system.
Allow for \(n\)-dimensional configurations of an optical system by allowing its parameters to be array-like.
Compute uncertainties in the performance of an optical system using the Monte-Carlo method.
To satisfy the last two design goals, optika uses the
purpose-built named_arrays package as a backend.
named_arrays is an implementation of a
named tensor,
which allows the user to name the axes in an \(n\)-dimensional array.
This makes specifying \(n\)-dimensional configurations in optika
easier since the user doesn’t have to manually insert singleton dimensions
to broadcast orthogonal configuration changes against each other.
Furthermore, named_arrays provides an implementation of a 3D vector,
Cartesian3dVectorArray, which is convenient to use since
many of the inputs and outputs of optika can be represented as 3D vectors.
Features#
Sequential raytrace modeling of an optical system
Stratified random sampling of input rays for faster convergence
Image simulation of a given scene using an optical system
Spherical, conical, and toroidal surface sag profiles
Circular, rectangular, and polygonal apertures
Support for mirrors and arbitrary multilayer coatings
Diffraction grating support
Constant, polynomial and holographic ruling spacing
Sinusoidal, square, rectangular, sawtooth, and triangular ruling profiles
CCD/CMOS sensor simulation
Quantum efficiency
Noise simulation
Charge diffusion
Limitations#
Polarization. Different polarization states are not propagated through the system.
Physical Optics. Only geometric optics is supported right now, but adding a Fourier optics propagator is a longstanding goal of the project.
Glass Optical Constants.
optikahas a wide array of optical constants from sources such as Palik [1997] and Henke et al. [1993], but it does not yet have a database for different types of glass like Zemax does.
Differences from Zemax#
The position and orientation of surfaces in
optikaare specified in global coordinates instead of coordinates relative to the last surface.The field of view is automatically calculated, there is no need to set the extent of the field.
Diffraction grating rulings are now a parameter of an optical surface. There is no need to change the type of surface to allow for different ruling designs.
Tutorials#
Jupyter notebook examples on how to use optika.
API Reference#
An in-depth description of the interfaces in this package.
A Python package for simulating and designing optical systems. |
References#
B.L. Henke, E.M. Gullikson, and J.C. Davis. X-ray interactions: photoabsorption, scattering, transmission, and reflection at e = 50-30,000 ev, z = 1-92. Atomic Data and Nuclear Data Tables, 54(2):181–342, 1993. URL: https://www.sciencedirect.com/science/article/pii/S0092640X83710132, doi:https://doi.org/10.1006/adnd.1993.1013.
Julian Heymes, Matthew Soman, George Randall, Alexander Gottwald, Andrew Harris, Andrew Kelt, Ian Moody, Xiao Meng, and Andrew D. Holland. Comparison of back-thinned detector ultraviolet quantum efficiency for two commercially available passivation treatments. IEEE Transactions on Nuclear Science, 67(8):1962–1967, 2020. doi:10.1109/TNS.2020.3001622.
James R. Janesick. Scientific Charge-Coupled Devices. The International Society for Optical Engineering, Bellingham, Washington, 2001. ISBN 0-8194-3698-4. URL: https://www.spiedigitallibrary.org/ebooks/PM/Scientific-Charge-Coupled-Devices/eISBN-9780819480392/10.1117/3.374903, doi:10.1117/3.374903.
R. Magnusson and T. K. Gaylord. Diffraction efficiencies of thin phase gratings with arbitrary grating shape. J. Opt. Soc. Am., 68(6):806–809, Jun 1978. URL: https://opg.optica.org/abstract.cfm?URI=josa-68-6-806, doi:10.1364/JOSA.68.000806.
Ian Moody, Marc Watkins, Ray Bell, Matthew Soman, Jonathan Keelan, and Andrew Holland. Ccd qe in the soft x-ray range. Technical Report, e2v, March 2017. URL: https://oro.open.ac.uk/49003/1/Moody%202017%20-%20SXRQE_WhitePaper.pdf.
Edward D. Palik. Handbook of Optical Constants of Solids. Academic Press, Burlington, 1997. ISBN 978-0-12-544415-6. URL: https://www.sciencedirect.com/book/9780125444156/handbook-of-optical-constants-of-solids, doi:https://doi.org/10.1016/B978-012544415-6.50004-2.
Forbes R. Powell, Peter W. Vedder, Joakim F. Lindblom, and Stephen F. Powell. Thin film filter performance for extreme ultraviolet and x-ray applications. Optical Engineering, 29(6):614 – 624, 1990. URL: https://doi.org/10.1117/12.55641, doi:10.1117/12.55641.
K. Ramanathan and N. Kurinsky. Ionization yield in silicon for ev-scale electron-recoil processes. Phys. Rev. D, 102:063026, Sep 2020. URL: https://link.aps.org/doi/10.1103/PhysRevD.102.063026, doi:10.1103/PhysRevD.102.063026.
D. G. Stearns. The scattering of x rays from nonideal multilayer structures. Journal of Applied Physics, 65(2):491–506, 01 1989. URL: https://doi.org/10.1063/1.343131, arXiv:https://pubs.aip.org/aip/jap/article-pdf/65/2/491/8005014/491\_1\_online.pdf, doi:10.1063/1.343131.
Robert A. Stern, Lawrence Shing, and Morley M. Blouke. Quantum efficiency measurements and modeling of ion-implanted, laser-annealed charge-coupled devices: x-ray, extreme-ultraviolet, ultraviolet, and optical data. Appl. Opt., 33(13):2521–2533, May 1994. URL: https://opg.optica.org/ao/abstract.cfm?URI=ao-33-13-2521, doi:10.1364/AO.33.002521.
W.T. Welford. A vector raytracing equation for hologram lenses of arbitrary shape. Optics Communications, 14(3):322–323, 1975. URL: https://www.sciencedirect.com/science/article/pii/0030401875903272, doi:https://doi.org/10.1016/0030-4018(75)90327-2.
David L. Windt. IMD—Software for modeling the optical properties of multilayer films. Computer in Physics, 12(4):360–370, 07 1998. URL: https://doi.org/10.1063/1.168689, arXiv:https://pubs.aip.org/aip/cip/article-pdf/12/4/360/7865280/360\_1\_online.pdf, doi:10.1063/1.168689.
Pochi Yeh. Optical waves in layered media. The Wiley series in pure and applied optics. Wiley, New York, 1988. ISBN 0471828661.
Paul Boerner, Christopher Edwards, James Lemen, Adam Rausch, Carolus Schrijver, Richard Shine, Lawrence Shing, Robert Stern, Theodore Tarbell, Alan Title, C. Jacob Wolfson, Regina Soufli, Eberhard Spiller, Eric Gullikson, David McKenzie, David Windt, Leon Golub, William Podgorski, Paola Testa, and Mark Weber. Initial Calibration of the Atmospheric Imaging Assembly (AIA) on the Solar Dynamics Observatory (SDO). \solphys , 275(1-2):41–66, January 2012. doi:10.1007/s11207-011-9804-8.
James R. Lemen, Alan M. Title, David J. Akin, Paul F. Boerner, Catherine Chou, Jerry F. Drake, Dexter W. Duncan, Christopher G. Edwards, Frank M. Friedlaender, Gary F. Heyman, Neal E. Hurlburt, Noah L. Katz, Gary D. Kushner, Michael Levay, Russell W. Lindgren, Dnyanesh P. Mathur, Edward L. McFeaters, Sarah Mitchell, Roger A. Rehse, Carolus J. Schrijver, Larry A. Springer, Robert A. Stern, Theodore D. Tarbell, Jean-Pierre Wuelser, C. Jacob Wolfson, Carl Yanari, Jay A. Bookbinder, Peter N. Cheimets, David Caldwell, Edward E. Deluca, Richard Gates, Leon Golub, Sang Park, William A. Podgorski, Rock I. Bush, Philip H. Scherrer, Mark A. Gummin, Peter Smith, Gary Auker, Paul Jerram, Peter Pool, Regina Soufli, David L. Windt, Sarah Beardsley, Matthew Clapp, James Lang, and Nicholas Waltham. The Atmospheric Imaging Assembly (AIA) on the Solar Dynamics Observatory (SDO). \solphys , 275(1-2):17–40, January 2012. doi:10.1007/s11207-011-9776-8.
Robert A. Stern, Lawrence Shing, Paul R. Catura, Mons D. Morrison, Dexter W. Duncan, James R. Lemen, Tim Eaton, Peter J. Pool, Roy Steward, Dave M. Walton, and Alan Smith. Characterization of the flight CCD detectors for the GOES N and O solar x-ray imagers. In Silvano Fineschi and Mark A. Gummin, editors, Telescopes and Instrumentation for Solar Astrophysics, volume 5171 of Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series, 77–88. February 2004. doi:10.1117/12.506346.