示例#1
0
#!/usr/bin/env python
"""
LightPipes for Python Optical Toolbox
"""

import common
from lightpipes import Field
from pylab import *


phi = 178 * (pi/180.)


F = Field(256, 512*15e-6, 780e-9)
F.gaussian_aperture(.75e-3) 
F.axicon(phi, 1.5,   0e-6, 0)
F.forvard(25e-2)

imshow( abs(F.value)**2 )
show()

F.axicon(phi, 1.5,   0e-6, 0)
F.forvard(100e-2)

imshow( abs(F.value)**2 )
show()


#F.lens(-20e-2)
#F.forvard(3e-2)
#    gsplot F7.F.*conj(F7.F);
示例#2
0
####### Create LG order
dx = (2 / (N - 1.))
x = y = 3 * r_[-1:(1 + dx):dx]
[xx, yy] = meshgrid(x, y)

lg = lg.LG_xy(l=l, p=0, xx=xx, yy=yy, omega0=2 / sqrt(l))
# normalize lg; we only want the phase information
lg /= abs(lg)
#imshow (x,y,arg(lg))
####### END Create LG order

propagate = Propagate()

F = Field(N, side_length, wavelength)
F.gaussian_aperture(gaussian_size)
F.axicon(axicon_angle, axicon_n1)
#F4 = propagate(13.*cm, step_size,               F3,0,0,4);
F.forvard(7.5 * cm)
F.axicon(axicon_angle, axicon_n1)

print 'moving towards slm'
#F.forvard(40*cm)
propagate(F, z=40. * cm, dz=10 * cm)

print 'applying slm'
F.value[:] *= lg
propagate(F, z=50. * cm, dz=2 * cm)
print 'press enter to exit'
raw_input()
示例#3
0
####### Create LG order 
dx = (2/(N-1.))
x = y = 3*r_[-1:(1+dx):dx]
[xx, yy] = meshgrid(x, y)

lg = lg.LG_xy( l=l, p=0, xx=xx, yy=yy, omega0=2./sqrt(l) )
# normalize lg; we only want the phase information
lg /= abs(lg)
#imshow (angle(lg)); show(); raw_input()
####### END Create LG order 



propagate = Propagate()

F = Field( N, side_length, wavelength )
F.gaussian_aperture(gaussian_size)
F.axicon(axicon_angle, axicon_n1)
#propagate(F, z=13.*cm, dz=step_size)
F.forvard(7.5*cm)
F.axicon( axicon_angle, axicon_n1, 0, 0)

print 'moving towards slm'
#F.forvard(40*cm)
propagate(F, z=40.*cm, dz=10*cm)

print 'applying slm'
F.value[:] *= lg
propagate(F, z=50.*cm, dz=2*cm)