Ignore:
Timestamp:
Dec 5, 2011, 2:42:33 AM (13 years ago)
Author:
aslmd
Message:

GRAPHICS: PYTHON:
updated movie capabilities with HTML support.
corrected problems with cat, winds, ...
added avi and html possibility to "save" keyword.

-S avi is simply equivalent to --rate 8.
-S html creates automatically webpage with nice animations and controls.

2 examples are commented in README.PP :
http://www.lmd.jussieu.fr/~aslmd/EXAMPLES/LMD_GCM_movie_tsurf_UV/anim.html
http://www.lmd.jussieu.fr/~aslmd/EXAMPLES/LMD_MMM_d1_10km_movie_QDUST_-1000m-AMR_lat_-3_Ls134.8/anim.html

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/PYTHON/pp.py

    r444 r451  
    2727    if opt.fref is not None and opt.operat is not None and opt.itp is not None: interpref=True
    2828    else:   interpref=False
     29    if opt.rate is not None:      opt.save = "avi"
     30    elif opt.save == "avi":       opt.rate = 8   ## this is a default value for -S avi
     31    if opt.save == "html":        opt.rate = -1  ## this is convenient because everything is done in planetoplot with mrate
    2932
    3033    #############################
     
    137140                ope=opt.operat,fileref=reffile,minop=opt.vminope,maxop=opt.vmaxope,titleref=opt.titref,\
    138141                invert_y=opt.inverty,xaxis=zexaxis,yaxis=zeyaxis,ylog=opt.logy,yintegral=opt.column,\
    139                 blat=opt.blat,tsat=opt.tsat,flagnolow=opt.nolow,mrate=opt.rate,mquality=opt.quality)
     142                blat=opt.blat,blon=opt.blon,tsat=opt.tsat,flagnolow=opt.nolow,mrate=opt.rate,mquality=opt.quality)
    140143        print 'DONE: '+name
    141144        system("rm -f to_be_erased")
     
    146149    for arg in sys.argv: command = command + arg + ' '
    147150    #if typefile not in ["meso","mesoapi"]: name = 'pycommand'
    148     if opt.save is "gui": name = 'pycommand'
     151    if opt.save == "gui":    name = 'pycommand'
     152    elif opt.save == "avi":  system("mv -f movie*.avi "+name+".avi")
     153    elif opt.save == "html": system("cat $PYTHONPATH/header.html > anim.html ; cat zepics >> anim.html ; cat $PYTHONPATH/body.html >> anim.html ; rm -rf zepics "+name+" ; mkdir "+name+" ; mv anim.html image*png "+name)
    149154    f = open(name+'.sh', 'w')
    150155    f.write(command)
Note: See TracChangeset for help on using the changeset viewer.