Commit ee258d5e authored by LAMBERT Jean-charles's avatar LAMBERT Jean-charles

add post_build_movie2.py

parent 7a4af7b8
......@@ -787,6 +787,44 @@ class C2dplot:
#plt.contour(zd, origin='lower',cmap='winter',norm = matplotlib.colors.LogNorm(), extent=[view_xmin, view_xmax, view_ymin, view_ymax])
#plt.contour(zd,norm = matplotlib.colors.LogNorm(), extent=[view_xmin, view_xmax, view_ymin, view_ymax])
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
def commandLinePbm2():
dbname = None
import argparse
# help
parser = argparse.ArgumentParser(description="Build simulation movie after smart analysis",
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
# options
parser.add_argument('simname', help='Simulation name')
parser.add_argument('--dbname',help='UNS database file name', default=dbname)
parser.add_argument('--verbose',help='verbose mode on', dest="verbose", action="store_true", default=False)
parser.add_argument('--overwrite',help='overwrite file if exist', dest="overwrite", action="store_true", default=False)
parser.add_argument('--ncores', help='#cores used, 0 means all',default=4,type=int)
#parser.add_argument('--no-verbose',help='verbose mode off', dest="verbose", action="store_false", default=True)
# parse
args = parser.parse_args()
# start main funciton
processPbm2(args)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#
def processPbm2(args):
import unsiotools.simulations.c2dplot as c2d
movie = c2d.C2dplot(verbose_debug=args.verbose)
try:
movie.buildMovie(args.simname,overwrite=args.overwrite,ncores=args.ncores)
except Exception as x :
import traceback
print (x,file=sys.stderr)
traceback.print_exc(file=sys.stdout)
except KeyboardInterrupt:
sys.exit()
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# commandLine, parse the command line
def commandLine():
......
......@@ -82,7 +82,7 @@ class build_py(_build_py, object):
#
MAJOR = '0'
MINOR = '0'
MICRO = '7'
MICRO = '8'
VERSION = '%s.%s.%s' % (MAJOR, MINOR, MICRO)
#
......@@ -186,6 +186,7 @@ def setup_package():
"uns_inert.py = unsiotools.simulations.cinert:commandLine",
"uns_plot_inert.py = unsiotools.simulations.cplotinert:commandLine",
"post_build_movie.py = unsiotools.simulations.cmovie:commandLine",
"post_build_movie2.py = unsiotools.simulations.c2dplot:commandLinePbm2",
"process_analysis.py = unsiotools.simulations.cuns_analysis:commandLine",
"remove_sim_halo.py = unsiotools.simulations.creducesim:commandLine",
"ramses2gadget.py = unsiotools.simulations.cramses2gadget:commandLine",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment