Skip to content

Commit

Permalink
add test code to infinite phase screen module
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Reeves committed Feb 13, 2017
1 parent 18209bb commit 9fd756d
Showing 1 changed file with 13 additions and 35 deletions.
48 changes: 13 additions & 35 deletions aotools/turbulence/infinitephasescreen_fried.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,46 +284,24 @@ def phaseCovariance(r, r0, L0):

if __name__ == "__main__":


scrn = PhaseScreen(128, 4./64, 0.2, 50, nCol=4)


from matplotlib import pyplot

screen = PhaseScreen(64, 8./32, 0.2, 40)

pyplot.ion()
pyplot.imshow(screen.stencil)

pyplot.figure()
pyplot.imshow(scrn.scrn)
pyplot.imshow(screen.scrn)
pyplot.colorbar()
for i in range(20):
scrn.addRow(5)
pyplot.clf()
pyplot.imshow(scrn.scrn)
pyplot.colorbar()
pyplot.draw()
pyplot.pause(0.00001)

for i in range(20):
scrn.addRow(-5)
pyplot.clf()
pyplot.imshow(scrn.scrn)
pyplot.colorbar()
pyplot.draw()
pyplot.pause(0.00001)

for i in range(20):
scrn.addRow(5, axis=1)
pyplot.clf()
pyplot.imshow(scrn.scrn)
pyplot.colorbar()
pyplot.draw()
pyplot.pause(0.00001)

for i in range(20):
scrn.addRow(-5, axis=1)
for i in range(100):
screen.addRow()

pyplot.clf()
pyplot.imshow(scrn.scrn)
pyplot.imshow(screen.scrn)
pyplot.colorbar()
pyplot.draw()
pyplot.pause(0.00001)



pyplot.pause(0.01)


0 comments on commit 9fd756d

Please sign in to comment.