summaryrefslogtreecommitdiffstats
path: root/fit_tprofile.py
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-07-13 21:07:50 +0800
committerAaron LI <aaronly.me@outlook.com>2016-07-13 21:07:50 +0800
commita432fc8608d499ee589f0216b6bf7e2b7a63de18 (patch)
treeefbbb0d626b954fa9ccebf1f7017aeea5866f281 /fit_tprofile.py
parent02fd52ee33542cb0589605c30dede707f85801ba (diff)
downloadcexcess-a432fc8608d499ee589f0216b6bf7e2b7a63de18.tar.bz2
Error on missing user config file
Diffstat (limited to 'fit_tprofile.py')
-rwxr-xr-xfit_tprofile.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/fit_tprofile.py b/fit_tprofile.py
index e1ee9a9..73d7f21 100755
--- a/fit_tprofile.py
+++ b/fit_tprofile.py
@@ -6,6 +6,7 @@
#
# Change logs:
# 2016-07-13:
+# * Error on missing user config file
# * Force the input temperature data to be 2D
# 2016-07-11:
# * Use a default config to allow a minimal user config
@@ -44,7 +45,7 @@ config_default = """
## Configuration for `fit_tprofile.py`
# redshift of the object (for pixel to distance conversion)
-redshift = -1
+redshift = <REDSHIFT>
# input temperature profile data file
t_profile_data = t_profile_data.txt
@@ -225,7 +226,7 @@ def main():
args = parser.parse_args()
config = ConfigObj(config_default.splitlines())
- config_user = ConfigObj(args.config)
+ config_user = ConfigObj(open(args.config))
config.merge(config_user)
tprofile_data = np.loadtxt(config["t_profile_data"], ndmin=2)