From 3d52b6e86c69a99c464c335ad4bc90527a4b3379 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Wed, 13 Jul 2016 15:26:46 +0800 Subject: fit_tprofile.py: force the input temperature data to be 2D --- fit_tprofile.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'fit_tprofile.py') 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) -- cgit v1.2.2