diff options
author | Aaron LI <aaronly.me@outlook.com> | 2016-07-13 15:26:46 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2016-07-13 15:26:46 +0800 |
commit | 3d52b6e86c69a99c464c335ad4bc90527a4b3379 (patch) | |
tree | d92a20320a8fb39c02b6457bd099cfcc0c96fc31 | |
parent | f0e233031e51a69bd3c23c616ff861d2b2931bd1 (diff) | |
download | cexcess-3d52b6e86c69a99c464c335ad4bc90527a4b3379.tar.bz2 |
fit_tprofile.py: force the input temperature data to be 2D
-rwxr-xr-x | fit_tprofile.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fit_tprofile.py b/fit_tprofile.py index 56f5d23..e1ee9a9 100755 --- a/fit_tprofile.py +++ b/fit_tprofile.py @@ -2,9 +2,11 @@ # # Aaron LI # Created: 2016-07-04 -# Updated: 2016-07-11 +# Updated: 2016-07-13 # # Change logs: +# 2016-07-13: +# * Force the input temperature data to be 2D # 2016-07-11: # * Use a default config to allow a minimal user config # 2016-07-04: @@ -219,14 +221,14 @@ def main(): parser = argparse.ArgumentParser( description="temperature profile fit, interpolate and extrapolate") parser.add_argument("config", nargs="?", default="tprofile.conf", - help="configuration (default: tprofile.conf") + help="configuration (default: tprofile.conf)") args = parser.parse_args() config = ConfigObj(config_default.splitlines()) config_user = ConfigObj(args.config) config.merge(config_user) - tprofile_data = np.loadtxt(config["t_profile_data"]) + tprofile_data = np.loadtxt(config["t_profile_data"], ndmin=2) redshift = config.as_float("redshift") tprofile = TemperatureProfile(tprofile_data, redshift) |