Exemplo n.º 1
0
cmd_args = parser.parse_args()
       
movieid = "{}-t{:04}-th{}-ph{}-n{}".format(cmd_args.mode, cmd_args.time, 
                                           cmd_args.orient[0], cmd_args.orient[1], 
                                           cmd_args.frames)
movie = Movie(
    runid=cmd_args.runid, 
    movieid=movieid,
    time=cmd_args.time,
    nframes=cmd_args.frames,
    verbose=1, force=0,
    )
movie.imageprefix = "rgb-{}-{}-{}".format(cmd_args.emshort, movie.runid, movie.movieid)
movie.emtypes = cmd_args.emtypes
movie.brightmax = cmd_args.brightscale
movie.bandscales = cmd_args.bandscales
movie.vcodec = cmd_args.vcodec
movie.containerformat = cmd_args.containerformat
movie.encoder = cmd_args.encoder
movie.boxsize = 4.0
movie.camera.set_angles(*cmd_args.orient)

def bmaxNHO(i): 
    """
    Smoothly varying brightness with time so that the movie looks good
    """
    return cmd_args.brightscale/(1.0+(float(i)/10)**2)

def bmaxCPF(i): 
    """
Exemplo n.º 2
0
from movierot import Movie

movie = Movie(runid="s80-127", movieid="tumble0060", 
	      time=60, nframes=72, verbose=1, force=0)
movie.brightmax = 1.5e8
movie.camera.set_steps(5.0, 5.0)
movie.makemovie()
from movierot import Movie

def brightmax(i): 
    """
    Smoothly varying brightness with time so that the movie looks good
    """
    return brightmax0*(1.0+(float(i)/30)**2)/(1.0+(float(i)/50)**3)

brightmax0 = 1.e6
itime = 1000

n = 9
dth = 360.0/n

movie = Movie(runid="t50m32-weak-dm0", movieid="tumble%4.4i" % itime, 
	      time=itime, nframes=n, verbose=1, force=1) # only recreate images, not maps
movie.brightmax = brightmax(itime)
movie.camera.set_steps(dth, dth)
movie.makemovie()


movie = Movie(runid="t50m32-weak-zerob-e01", movieid="tumble%4.4i" % itime, 
	      time=itime, nframes=n, verbose=1, force=1) # only recreate images, not maps
movie.brightmax = brightmax(itime)
movie.camera.set_angles(360.0, 360.0)
movie.camera.set_steps(dth, dth)
movie.makemovie()
Exemplo n.º 4
0
import sys, os
from movierot import Movie

brightmax0 = 2.e8

# Parse command line arguments
execname = os.path.split(sys.argv[0])[-1]
try: 
    runid = sys.argv[1]
    itime = int(sys.argv[2])
    brightmax0 = float(sys.argv[3])
except IndexError, ValueError:
    print "Usage: %s RUNID ITIME" % execname
    exit

movie = Movie(runid=runid, movieid="tumble-%4.4i" % itime, 
	      time=itime, nframes=72, verbose=1, force=0)
movie.brightmax = brightmax0
movie.boxsize = 4.0
movie.camera.set_steps(5.0, 5.0)
movie.makemovie()