aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-10-31 16:24:45 +0800
committerAaron LI <aly@aaronly.me>2017-10-31 16:24:45 +0800
commitd1768c0e129b0e51d27277c1ad6608ca1c7246ae (patch)
tree36a74e9c95f8d111af4485fbc81ab611749cbfcb /bin
parent2ac60a1055b953e8a680c504cbd9dcd8a729fd36 (diff)
downloadchandra-acis-analysis-d1768c0e129b0e51d27277c1ad6608ca1c7246ae.tar.bz2
bin/cosmo_calc.py: change -U to -u; update comments/descriptions
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cosmo_calc.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/bin/cosmo_calc.py b/bin/cosmo_calc.py
index 3f0b81f..3b7a71f 100755
--- a/bin/cosmo_calc.py
+++ b/bin/cosmo_calc.py
@@ -1,7 +1,8 @@
#!/usr/bin/env python3
#
-# Copyright (c) 2017 Weitian LI <liweitianux@live.com>
+# Copyright (c) 2017 Weitian LI <weitian@aaronly.me>
# MIT license
+#
"""
Cosmology calculator with support of Chandra ACIS-specific quantities.
@@ -85,15 +86,15 @@ def main():
description="Cosmology calculator with Chandra-specific quantities")
parser.add_argument("-H", "--hubble", dest="H0",
type=float, default=H0,
- help="Present-day Hubble parameter " +
+ help="present-day Hubble parameter " +
"(default: %s [km/s/Mpc])" % H0)
parser.add_argument("-M", "--omega-m", dest="Om0",
type=float, default=Om0,
- help="Present-day matter density (default: %s)" % Om0)
+ help="present-day matter density (default: %s)" % Om0)
parser.add_argument("-b", "--brief", dest="brief", action="store_true",
help="be brief")
- parser.add_argument("-U", "--unit", dest="unit",
- help="unit for output quantity if supported")
+ parser.add_argument("-u", "--unit", dest="unit",
+ help="set the unit for output quantity if supported")
parser.add_argument("-L", "--luminosity-distance",
dest="luminosity_distance",
action="store_true",
@@ -125,6 +126,8 @@ def main():
q_active = get_quantities(args)
if len(q_active) > 1:
+ # Multiple quantities to be calculated, thus unit specification
+ # and brief output are disabled.
if args.unit is not None:
args.unit = None
print("WARNING: ignored argument --unit", file=sys.stderr)