Diffraction Simulations - Angular Spectrum Method

Implementation of the Angular Spectrum method in Python to simulate Diffraction Patterns with arbitrary apertures. You can use it for simulating both monochromatic and polychromatic light also with arbitrary spectrums.

How the method and the simulator work is described in this Article. Take a look to the Youtube video to see the animated simulations!

Installation

  1. Clone repository
  2. Install requirements via pip install -r requirements.txt

Examples

To perform the simulations, just run from the folder proyect in the command prompt the corresponding Python scripts:

python hexagon_monochromatic.py

hexagon_monochromatic

python hexagon_polychromatic.py

hexagon_polychromatic

python rectangular_grating_small.py

rectangular_grating_small

python rectangular_grating.py

rectangular_grating

python circular_rings.py

circular_rings

python text.py

text

For simulating diffraction patterns with lenses, take a look at these examples.

GitHub