def write_image(k): q,p,mu,q1 = jpf.state_to_weinstein_darboux( y_data[k] ) f = gf.display_velocity(q,p,mu) time_s = str(time_data[k]) plt.suptitle('t = '+ time_s[0:4] , fontsize=16 , x = 0.75 , y = 0.25 ) fname = './movie_frames/frame_%03i.png' % k f.savefig( fname ) plt.close(f) sys.stdout.write(' '+str(k)) sys.stdout.flush()
def write_image(k): q, p, mu, q1 = jpf.state_to_weinstein_darboux(y_data[k]) f = gf.display_velocity(q, p, mu) time_s = str(time_data[k]) plt.suptitle('t = ' + time_s[0:4], fontsize=16, x=0.75, y=0.25) fname = './movie_frames/frame_%03i.png' % k f.savefig(fname) plt.close(f) sys.stdout.write(' ' + str(k)) sys.stdout.flush()
#zero_jet_tackles_another #dynamic_one_jet #state = np.load('./movies/zero_jet_tackles_another.npy') #time = np.load('./movies/zero_jet_tackles_another_time.npy') #step = 100 spin = np.array([ [0. , -1.] , [1. , 0.]]) stretch = np.array([ [0. , 1.] , [1. , 0.]]) shear = np.array([ [0. , 0.] , [1. , 0.]]) q = np.zeros([N,DIM]) p = np.zeros([N,DIM]) mu = np.zeros([N,DIM,DIM]) mu[0] = spin #p[0,0] = 1. #q,p,mu = jpf.state_to_weinstein_darboux(state[step]) #print 'time = ' + str(time[step]) gf.display_velocity(q,p,mu) plt.axis('equal') plt.show() gf.display_vorticity(q,p,mu,quiver="on") plt.axis('equal') plt.show() #gf.display_streamlines(q,p,mu) #plt.axis('equal') #plt.show()
#zero_jet_tackles_another #dynamic_one_jet #state = np.load('./movies/zero_jet_tackles_another.npy') #time = np.load('./movies/zero_jet_tackles_another_time.npy') #step = 100 spin = np.array([[0., -1.], [1., 0.]]) stretch = np.array([[0., 1.], [1., 0.]]) shear = np.array([[0., 0.], [1., 0.]]) q = np.zeros([N, DIM]) p = np.zeros([N, DIM]) mu = np.zeros([N, DIM, DIM]) mu[0] = spin #p[0,0] = 1. #q,p,mu = jpf.state_to_weinstein_darboux(state[step]) #print 'time = ' + str(time[step]) gf.display_velocity(q, p, mu) plt.axis('equal') plt.show() gf.display_vorticity(q, p, mu, quiver="on") plt.axis('equal') plt.show() #gf.display_streamlines(q,p,mu) #plt.axis('equal') #plt.show()