Commit 029ae82f authored by LAMBERT Jean-charles's avatar LAMBERT Jean-charles
Browse files

fixes

parent ce9d46b8
......@@ -5,7 +5,7 @@ import numpy as np
import os,time
import sys
import argparse,textwrap
#sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/','/home/jcl/works/GIT/uns_projects/py/modules/simulations']+sys.path
#sys.path=['/home/jcl/works/GIT/uns_projects/py/modules/']+sys.path
#from IPython import embed
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
......@@ -14,24 +14,35 @@ def commandLine():
# help
parser = argparse.ArgumentParser(description="Display 2D image from UNS data",
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('snapshot', help="uns input snapshot",default=None)
parser.add_argument('component', help="selected component",default=None)
parser.add_argument('--out', help="if blank display on screen, else on given file ",default="",type=str)
parser.add_argument('--range', help="plot range",default=20,type=str)
parser.add_argument('--cmap', help="color map name. You can use a common cmap for all components, or a specific one.\
Syntax is \"component1:cmap1,component2:cmap2\"\
example: stars:Paired,halo:Purples\n \
(to display all colormap available use \"show\" as keyword)",
default="gas:jet,stars:Paired,halo:Accent")
parser.add_argument('--mergers', help="file to re-center, or @sim (ex; @mdf648) to get file automatically from simulation ",default="",type=str)
parser.add_argument('--sigma', help="gaussian sigma ",default=6.,type=float)
parser.add_argument('--noxz',help='no XZ projection',dest="noxz", action="store_true", default=False)
parser.add_argument('--contour',help='toggle contour display',dest="contour", action="store_true", default=False)
parser.add_argument('--contour',help='toggle iso contour display',dest="contour", action="store_true", default=False)
parser.add_argument('--nc',help='#levels contour',default=20,type=int)
parser.add_argument('--cpt', help="index of the image (out.cpt.jpg)",default=0,type=int)
parser.add_argument('--cmap', help="color map (see mathplotlib colormap)",default="gas:jet,stars:Paired,halo:Accent")
parser.add_argument('--cpt', help="index of the image (out.cpt.jpg)",default=0,type=int)
parser.add_argument('--verbose',help='verbose mode',dest="verbose", action="store_true", default=False)
#parser.print_help()
# parse
args = parser.parse_args()
if args.cmap=="show": # show colormap
import general.ctools as ct
ct.displayColormap()
sys.exit()
# start main funciton
process(args)
......
Supports Markdown
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