Below is a short movie clip showing a sequence of 200x200 pixel phase screens generated MegaScreen(), embedded in a jupyter notebook. The similarity to clouds is not accidental, as clouds reflect the turbulent structure of the atmosphere, as do phase screens.
To see an infinitely long clip in a Python desktop window, run the script in play_movie.py
.
import context
import numpy as np
from matplotlib.animation import FuncAnimation
import matplotlib.pyplot as plt
from IPython.display import HTML
from play_movie import screen_movie
from speckle_movie import speckle_movie
import numpy.random
numpy.random.seed(1234) # Set to None to get non-repeatable initial state
fig=plt.figure(figsize=(5,5))
anim = FuncAnimation(fig, lambda x:x, frames=screen_movie(), interval=30, blit=True,save_count=200)
plt.close() # Needed to avoid an extra plot
HTML(anim.to_html5_video())
To see an infinitely long clip, run speckle_movie.py
fig=plt.figure(figsize=(5,5))
anim = FuncAnimation(fig, lambda x:x, frames=speckle_movie(windowSize=200), interval=30, blit=True,save_count=200)
plt.close() # Needed to avoid an extra plot
HTML(anim.to_html5_video())