Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LAMBERT Jean-charles
uns_projects
Commits
7fd8941d
Commit
7fd8941d
authored
Nov 07, 2016
by
LAMBERT Jean-charles
Browse files
add separation max distance parameter
parent
c390ae61
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/mains/merging_time.py
View file @
7fd8941d
...
...
@@ -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
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment