Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,050 changes: 1,050 additions & 0 deletions lgmartinez1/FINAL_scripted.ipynb

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions lgmartinez1/animation_script.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#Import these libraries in one cell:

from matplotlib import animation
from JSAnimation import IPython_display
from JSAnimation.IPython_display import display_animation
from moviepy.editor import *

import pylab
import types

##############################################################

#Use these animation functions:

def animate(data):
im = ax.contourf(my,mx,data,cmap='jet')
return im

fig = pyplot.figure(figsize=(8,5))
ax = pyplot.axes()
im = ax.contourf(my, mx, US[0,2,:,:], cmap='jet')

anim = animation.FuncAnimation(fig, animate, frames=US[:1500:10,2,:,:], interval=100)
#to display:
# display_animation(anim, default_mode='once')
#to save mp4 file
# anim.save('ymom.mp4', writer='ffmpeg')


##############################################################

#Make a gif!

clip = VideoFileClip("ymom.mp4").subclip(0,10)
clip.write_gif("ymom.gif", fps=10)

#Have Fun!
Binary file added lgmartinez1/figures/bc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgmartinez1/figures/computational_domain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added lgmartinez1/figures/flow_diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading