import pylab as pl from intensity import * from propagate import * def testlens(w=10e-4): i = intensity(1e-5,-5e-3,5e-3,1e-5,-5e-3,5e-3,532e-9) i.gaussian(w) i.plot() p = propagate() il = p.lens(i,0.5) pl.figure(2) il.plot() pl.figure(3) x = 0.1 y = 1 while x <= 0.5: ip = p.singlefresnel(x,il) pl.figure(3) pl.subplot(3,3,y) ip.phaseplot() pl.title(x) x += 0.05 y += 1 pl.figure(4) x = 0.1 y = 1 while x <= 0.5: ip = p.singlefresnel(x,il) pl.subplot(3,3,y) ip.intensityplot() pl.title(x) x += 0.05 y += 1 x = 0.1 y = 1 m = [] z = [] while x <= 0.7: ip = p.singlefresnel(x,il) z.append(x) m.append(ip.moment()) x += 0.005 y += 1 pl.figure (5) pl.plot(z,m)