8000 Update cosmic-pop Parsing of Binfrac Model. by MarkGM02 · Pull Request #683 · COSMIC-PopSynth/COSMIC · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update cosmic-pop Parsing of Binfrac Model. #683

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion bin/cosmic-pop
5932
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ def str2bool(v):
###############################################################################
# DEFINE COMMANDLINE ARGUMENTS
###############################################################################

def binfrac_type(value):
try:
return float(value)
except ValueError:
return value

def parse_commandline():
"""Parse the arguments given on the command-line.
"""
Expand Down Expand Up @@ -103,7 +110,7 @@ def parse_commandline():
parser.add_argument("--binary_state", nargs='+', type=int)
parser.add_argument("--sampling_method")
parser.add_argument("--primary_model", help="Chooses the initial primary mass function from: salpeter55, kroupa93, kroupa01", type=str)
parser.add_argument("--binfrac_model", help="Chooses the binary fraction model from: a float between [0,1], vanHaaften, and offner22", type=float)
parser.add_argument("--binfrac_model", help="Chooses the binary fraction model from: a float between [0,1], vanHaaften, and offner22", type=binfrac_type)
parser.add_argument("--ecc_model", help="Chooses the initial eccentricity distribution model from: thermal, uniform, and sana12", type=str)
parser.add_argument("--porb_model", help="Chooses the initial orbital period distribution model from: log_uniform and sana12", type=str)
parser.add_argument("--SF_start", help="Sets the time in the past when star formation initiates in Myr", type=float)
Expand Down
Loading
0