Opticspy has kinds of wave propagation methods

1. Fresnel and Fraunhofer diffraction for different shape aperture(circle, double circle, rectangle, square, double rectangle, double square, slit, double slit, ring and frame aperture)

2. OTF for different shape of aperture.

3. Helpful methods to research wave propagation and specific help manual

In [1]:
%matplotlib inline
import opticspy

Circle Aperture

In [2]:
circle_aperture = opticspy.aperture.Circle(d=100,D=0.005)
circle_aperture.show()
---------show aperture--------
In [3]:
circle_aperture.fresnel(z=1)
---------Fresnel Diffraction----------
Fresnel number =  9.4696969697
Out[3]:
0
In [4]:
circle_aperture.fraunhofer()
---------Fraunhofer Diffraction----------
Out[4]:
0
In [5]:
circle_aperture.otf()
-------------OTF---------------
Out[5]:
0

Double Circle Aperture

In [6]:
doublecircle_aperture = opticspy.aperture.DoubleCircle()
doublecircle_aperture.show()
---------show aperture--------
In [7]:
doublecircle_aperture.fresnel()
---------Fresnel Diffraction----------
doublecircle
Out[7]:
0
In [8]:
doublecircle_aperture.fraunhofer()
---------Fraunhofer Diffraction----------
Out[8]:
0
In [9]:
doublecircle_aperture.otf()
-------------OTF---------------
Out[9]:
0

Rectangle aperture

In [10]:
rect_aperture = opticspy.aperture.Rectangle(height=20, width=40)
rect_aperture.show()
---------show aperture--------
In [11]:
rect_aperture.fresnel(z=1)
---------Fresnel Diffraction----------
rectangle
Out[11]:
0
In [12]:
rect_aperture.fraunhofer()
---------Fraunhofer Diffraction----------
Out[12]:
0
In [13]:
rect_aperture.otf()
-------------OTF---------------
Out[13]:
0

Double Rectangle

In [14]:
doublerectangle_aperture = opticspy.aperture.DoubleRectangle(separation=100)
doublerectangle_aperture.show()
---------show aperture--------
In [15]:
doublerectangle_aperture.fresnel()
---------Fresnel Diffraction----------
doublerectangle
Out[15]:
0
In [16]:
doublerectangle_aperture.fraunhofer()
---------Fraunhofer Diffraction----------
Out[16]:
0
In [17]:
doublerectangle_aperture.otf()
-------------OTF---------------
Out[17]:
0

Ring aperture

In [18]:
ring_aperture = opticspy.aperture.Ring()
ring_aperture.show()
---------show aperture--------
In [19]:
ring_aperture.fresnel()
---------Fresnel Diffraction----------
ring
Out[19]:
0
In [20]:
ring_aperture.fraunhofer()
---------Fraunhofer Diffraction----------
Out[20]:
0
In [21]:
ring_aperture.otf()
-------------OTF---------------
Out[21]:
0

Frame Aperture

In [22]:
Frame_aperture = opticspy.aperture.Frame(outside = 100, inside = 50)
Frame_aperture.show()
---------show aperture--------
In [23]:
Frame_aperture.fresnel(z=1)
---------Fresnel Diffraction----------
frame
Out[23]:
0
In [24]:
Frame_aperture.fraunhofer()
---------Fraunhofer Diffraction----------
Out[24]:
0
In [25]:
Frame_aperture.otf()
-------------OTF---------------
Out[25]:
0

Helpful methods to research wave propagation and specific help manual

In [26]:
help(opticspy.aperture.Circle)
Help on class Circle in module opticspy.aperture:

class Circle(Aperture)
 |  Build a circle aperture example
 |  
 |  Example
 |  ------------------------------------
 |  aperture = opticspy.aper.Circle(200,50)
 |  
 |  Parameters
 |  ------------------------------------
 |  background: int
 |                          Square background
 |  
 |  d: int
 |                          aperture pixel diameter
 |  D: int
 |                          aperture real diameter
 |  
 |  Methods defined here:
 |  
 |  __init__(self, background=500, d=200, D=0.01, scale=5e-05)
 |  
 |  ----------------------------------------------------------------------
 |  Methods inherited from Aperture:
 |  
 |  fraunhofer(self, z=2, lambda1=6.6e-07)
 |      Compute the frauhofer diffraction pattern.
 |      
 |      Output
 |      ------------------------------------
 |      Diffraction pattern figure
 |  
 |  fresnel(self, z=2, lambda1=6.6e-07)
 |      Compute the fresnel diffraction pattern.
 |      
 |      Output
 |      ------------------------------------
 |      Diffraction pattern figure
 |  
 |  otf(self)
 |      Compute an aperture's otf
 |  
 |  show(self)
 |      Show aperture figure
 |      
 |      Output
 |      ------------------------------------
 |      Aperture figure

In [ ]: