time = np.squeeze(collect("t_array",path=path,xind=[0,0])) yO = -.5*(dy*ny) xO = -.17949 *(dx*nx) #computer the center of mass #savemovie(n[1:,:,:],data2=phi[1:,:,:],moviename='movie_n_phi'+key+'.avi',cache=cache+"/",overcontour=True,xO=xO,yO=yO,dx=dx,dy=dy,norm=False) #savemovie(n[1:,:,:],data2=phi[1:,:,:],moviename='movie_n_phi'+key+'.avi',cache=cache+"/",overcontour=True,xO=xO,yO=yO,dx=dx,dy=dy,norm=False) #savemovie(np.log(n[1:,:,:]+1.0),data2=phi[1:,:,:],moviename='movie_n_phi'+key+'.avi', # cache=cache+"/",overcontour=True,xO=xO,yO=yO,dx=dx,dy=dy,t_array=time) # savemovie(np.log(n[1:,:,:]+1.0),data2=phi[1:,:,:],moviename='movie_n_phi'+key+'.avi', # cache=cache+"/",overcontour=True,xO=xO,yO=yO,dx=dx,dy=dy,t_array=time) savemovie(np.log(n[1:,:,:]+1.0),data2=alpha,moviename='movie_log(n)_alpha'+key+'.avi', cache=cache+"/",overcontour=True,xO=xO,yO=yO,dx=dx,dy=dy,t_array=time,bk=np.log(1.0)) savemovie(n[1:,:,:]+.10,data2=alpha,moviename='movie_n_alpha'+key+'.avi', cache=cache+"/",overcontour=True,xO=xO,yO=yO,dx=dx,dy=dy,t_array=time,bk=1.0) #savemovie(u[1:,:,:],data2=phi[1:,:,:],moviename='movie_u_phi'+key+'.avi',cache=cache+"/",overcontour=True,xO=xO,yO=yO,dx=dx,dy=dy,norm=False) savemovie(n[1:,:,ny/2],moviename='movie_n_1D'+key+'.avi',cache=cache+"/", overcontour=True,xO=xO, yO=yO,dx=dx,dy=dy,norm=False,t_array=time) #os.rmdir
path=sys.argv[1] key=sys.argv[2] cache='/scratch/01523/meyerson/'+key if os.path.exists(cache): os.rmdir(cache) os.makedirs(cache) print path meta = metadata(path=path) from boutdata import collect from boututils import savemovie gamma = collect("Gammax",yind=[5,5],path=path) ni = collect("Ni",yind=[5,5],path=path) rho = collect("rho",yind=[5,5],path=path) #one movie per cpu print ni.shape, gamma.shape savemovie(gamma[:,:,0,:],ni[:,:,0,:],moviename='movie_'+key+'.avi', meta=meta,cache=cache+"/",overcontour=True) savemovie(rho[:,:,0,:],ni[:,:,0,:],moviename='movie_phi_ni'+key+'.avi', meta=meta,cache=cache+"/",overcontour=True) #os.rmdir(cache)
n = np.squeeze(collect("n",xind=[2,3*nx/4+2],zind=[nz/4,3*nz/4],tind=[0,299],path=path,info=False)) u = np.squeeze(collect("u",xind=[2,3*nx/4+2],zind=[nz/4,3*nz/4],tind=[0,299],path=path,info=False)) phi = np.squeeze(collect("phi",xind=[2,3*nx/4+2],zind=[nz/4,3*nz/4],tind=[0,299],path=path,info=False)) #one movie per cpu # savemovie(u[1:,:,:],data2=phi[1:,:,:],moviename='movie_u_phi'+key+'.avi',cache=cache+"/",overcontour=Trueo,xO=xO,yO=yO,dx=dx,dy=dy) print n.shape nt,nx,ny = n.shape dx = np.squeeze(collect("dx",path=path,xind=[0,0])) dy = np.squeeze(collect("dz",path=path,xind=[0,0])) yO = -.5*(dy*ny) xO = -.17949 *(dx*nx) savemovie(n[1:,:,:]+.1,data2=phi[1:,:,:],moviename='movie_n_phi'+key+'.avi',cache=cache+"/", overcontour=True,xO=xO,yO=yO,dx=dx,dy=dy) savemovie(u[1:,:,:],data2=phi[1:,:,:],moviename='movie_u_phi'+key+'.avi',cache=cache+"/", overcontour=True,xO=xO,yO=yO,dx=dx,dy=dy) savemovie(n[1:,:,ny/2],moviename='movie_n_1D'+key+'.avi',cache=cache+"/", overcontour=True,xO=xO, yO=yO,dx=dx,dy=dy) #savemovie(n,data2=(n*(n>0)+10000000.*n*(n<0)),moviename='movie_n_neg'+key+'.avi', # cache=cache+"/",overcontour=True,xO=xO, yO=yO,dx=dx,dy=dy,norm=False, # nlevels = 3, removeZero = False) #savemovie((n*(n>0)+10000000.*n*(n<0))[:,:,ny/2],moviename='movie_n_1D_neg'+key+'.avi', # cache=cache+"/",overcontour=True,xO=xO, yO=yO,dx=dx,dy=dy,norm=False)