Welcome to pyMOE’s documentation!
pyMOE is a Python library for designing and producing masks for Micro Optical Elements.
Features
Mask design features:
Designing multi-layer (grayscale) masks from analytical and/or numerical (e.g. Gerchberg–Saxton) methods
Designing single layer (binary) dithered masks from grayscale masks
Designing rudimentary metasurfaces masks
Numerical scalar propagation methods (Rayleigh-Sommerfeld, Fresnel, Fraunhofer, Angular Spectrum Method, Bluestein) of electric fields from (grayscale) masks
Rudimentary optimization and inverse design based on gradient-descent methods
Mask production features:
Image file (binary/grayscale) <-> CAD files input-output conversion
Operations with/within mask files (e.g. change layer numbers, make intances, CAD file import, merge shapes, …)
Dependencies
A list of dependencies (with versions) is at https://github.com/INLnano/pyMOE/blob/main/requirements.txt . To use the package straighforwardly please make sure you have these dependencies (and versions) installed.
Modular architecture
pyMOE is based on a modular architecture, where each module provides specific functionalities. The use of each module and its inter-modular connections is exemplified at https://www.sciencedirect.com/science/article/pii/S0010465524002546#fg0060 and practically in the example notebooks (there is one notebook for each module).
Literature
For background, theory, package structure, practical results and discussion of package’s performance, please refer to the publication:
Cunha, J. Queiroz, C. Silva, F. Gentile and D. E. Aguiam, pyMOE: Mask Design and Modelling for Micro Optical Elements and Flat Optics, Computer Physics Communications 109331 (2024). Link: https://doi.org/10.1016/j.cpc.2024.109331
Example Notebooks
Check the notebooks in the sidebar menu.
- Example Notebooks
- Example notebook for generating masks with pyMOE
- Example notebook for generating masks for metasurfaces with pyMOE
- Example notebook for import-export operations with pyMOE
- Export a created mask using gdsconverter
- Convert phase mask to height map
- Export mask to gds and dxf files
- Convert height map dxf file to grayvalue from calibration lookup table
- Transform layered .gds file into a grayscale image
- Transform grayscale image into (binary) dithered image
- Transform binary image file into single layered .gds file
- Extra: Merging shapes in the single layer .gds file
- Example notebook for operations with .gds files with pyMOE
- Example notebook for holographic phase mask generator
- Example notebook for implementing numerical propagation using propagate module
- Propagation from a circular aperture
- Propagation from a Fresnel multilevel mask example #1
- Propagation of square apertures
- Propagation from a Fresnel Zone Plate
- Spiral Phase Plate
- Alvarez Lenses Pair
- Dammann Gratings
- Angular Spectrum Method and Scalable Angular Spectrum Method Validation
- Propagation from Computer Generated Holograms
- Near Field: Nanojet generation from a circular aperture illuminated by a Gaussian Beam
- Evaluation of Oblique Incidence fields
- Propagation through two lenses
- Example notebook for optimizer module
- Metrics notebook
Full function/class listings
Please check the function/class Indices and Tables in the sidebar menu or use Search functionality.