Exemple #1
0
omega0_p = .5

######## END Param ##############

####### 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) ) \
   + lg.LG_xy( l=0, p=p, xx=xx, yy=yy, omega0=.85*2/sqrt(l) )

# normalize lg; we only want the phase information
lg /= abs(lg)
#imshow (angle(lg)); show()
####### END Create LG order

propagate = Propagate(vmin=0., vmax=100.)

F = Field(N, side_length, wavelength)
F.gaussian_aperture(gaussian_size)
#F.lens(f)
F.value[:] *= lg
#propagate(F, z=2*f, dz=.5*cm)

for z in r_[0:(2 * f):(.1 * f)]:
    Fcopy = F.copy()
    Fcopy.lens_forvard(f, z)
    propagate.imshow((Fcopy.value * Fcopy.value.conj()).real)
    raw_input()
Exemple #2
0
l = 2  # azimuthal order of LG beam

######## END Param ##############

####### 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)
Exemple #3
0
  the toroidal lens at the SLM.
  """
  phi = zeros(x.shape)
  r2 = x**2 + y**2
  Ri_2 = (R - 0.5*w)**2
  Rf_2 = (R + 0.5*w)**2
  phi[ nonzero( r2 < Rf_2 ) ] = pi
  phi[ nonzero( r2 < Ri_2 ) ] = 0
  return phi


x = y = grid_dx * r_[-255.5:256:1.]
[xx, yy] = meshgrid(x,y)
torus_phase = tlens(xx,yy,R0,f_torus,wavelength) + phase_ring(xx,yy,R1,w1)

propagate = Propagate()

#print 'press enter to continue'
#propagate.imshow( torus_phase )
#raw_input()

# propagate the field from the SLM and take a look
F = Field( N, side_length, wavelength)     # initial field
F.gaussian_aperture(w)                     # gaussian input
F.circular_aperture(side_length/2.)        # Iris in front of SLM
F.value[:] *= exp(1j * torus_phase )       # apply SLM phase
F.forvard(f_torus)
propagate(F, z=f_torus, dz=f_torus/25.)

print 'press enter to show final phase...'
raw_input()