Commit 7fd8941d authored by LAMBERT Jean-charles's avatar LAMBERT Jean-charles
Browse files

add separation max distance parameter

parent c390ae61
......@@ -17,13 +17,15 @@ def commandLine():
txtfile=None
cod1=None
cod2=None
dmax=1.0
threshold=10000
# help
parser = argparse.ArgumentParser(description="Display merging time",
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
# options
parser.add_argument('simname', help='Simulation name')
parser.add_argument('--dmax', help='max distance of separation (kpc)',default=dmax,type=float)
parser.add_argument('--cod1', help='first cod file',default=cod1)
parser.add_argument('--cod2', help='second cod file',default=cod2)
parser.add_argument('--pngfile', help='png filename, if None interactive plot',default=pngfile)
......@@ -43,7 +45,10 @@ def commandLine():
# process, is the core function
def process(args):
cod = CCod(simname=args.simname,verbose_debug=args.verbose,dbname=args.dbname)
cod.computeMergingTime(halo_1=args.cod1,halo_2=args.cod2,pngfile=args.pngfile,txtfile=None)
try:
cod.computeMergingTime(halo_1=args.cod1,halo_2=args.cod2,pngfile=args.pngfile,txtfile=None,dmax=args.dmax)
except KeyboardInterrupt:
sys.exit()
......
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