diff options
author | Aaron LI <aaronly.me@outlook.com> | 2016-04-22 10:18:38 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2016-04-22 10:18:38 +0800 |
commit | d00a0e6293ff802d642a8c231dc4384a081977cf (patch) | |
tree | ccc92e7638d33ef3e645c694fe70b20f10a29d16 | |
parent | 0e49f1b53891627e59571fffa7297d84eecf7ea1 (diff) | |
download | atoolbox-d00a0e6293ff802d642a8c231dc4384a081977cf.tar.bz2 |
sbp_fit.py: minor adjustments to sample config
-rwxr-xr-x | python/sbp_fit.py | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/python/sbp_fit.py b/python/sbp_fit.py index a654e81..a22dd19 100755 --- a/python/sbp_fit.py +++ b/python/sbp_fit.py @@ -47,8 +47,8 @@ Sample config file: ------------------------------------------------- name = <NAME> obsid = <OBSID> -r500_pix = <R500_pixel> -r500_kpc = <R500_kpc> +r500_pix = <R500_PIX> +r500_kpc = <R500_KPC> sbpfile = sbprofile.txt # unit of radius: pix (default) or kpc @@ -56,7 +56,7 @@ unit = pixel # sbp model: "sbeta" or "dbeta" model = sbeta -#model = dbeta +#model = dbeta # output file to store the fitting results outfile = sbpfit.txt @@ -64,7 +64,7 @@ outfile = sbpfit.txt imgfile = sbpfit.png # data range to be ignored during fitting (same unit as the above "unit") -#ignore = 0.0-20.0, +#ignore = 0.0-20.0, # specify the ignore range w.r.t R500 ("r500_pix" or "r500_kpc" required) #ignore_r500 = 0.0-0.15, @@ -77,11 +77,11 @@ imgfile = sbpfit_sbeta.png [[params]] # model parameters # name = initial, lower, upper, variable (FIXED/False to fix the parameter) - s0 = 1.0e-8, 0.0, 1.0e-6 - rc = 30.0, 1.0, 1.0e4 - #rc = 30.0, 1.0, 1.0e4, FIXED - beta = 0.7, 0.3, 1.1 - bkg = 1.0e-9, 0.0, 1.0e-7 + s0 = 1.0e-8, 0.0, 1.0e-6 + rc = 30.0, 5.0, 1.0e4 + #rc = 30.0, 5.0, 1.0e4, FIXED + beta = 0.7, 0.3, 1.1 + bkg = 1.0e-10, 0.0, 1.0e-8 [dbeta] @@ -90,13 +90,13 @@ imgfile = sbpfit_dbeta.png #ignore = 0.0-20.0, #ignore_r500 = 0.0-0.15, [[params]] - s01 = 1.0e-8, 0.0, 1.0e-6 - rc1 = 50.0, 10.0, 1.0e4 - beta1 = 0.7, 0.3, 1.1 - s02 = 1.0e-8, 0.0, 1.0e-6 - rc2 = 30.0, 1.0, 5.0e2 - beta2 = 0.7, 0.3, 1.1 - bkg = 1.0e-9, 0.0, 1.0e-7 + s01 = 1.0e-8, 0.0, 1.0e-6 + rc1 = 50.0, 10.0, 1.0e4 + beta1 = 0.7, 0.3, 1.1 + s02 = 1.0e-8, 0.0, 1.0e-6 + rc2 = 30.0, 2.0, 5.0e2 + beta2 = 0.7, 0.3, 1.1 + bkg = 1.0e-10, 0.0, 1.0e-8 ------------------------------------------------- """ @@ -704,7 +704,7 @@ def make_model(config, modelname): # double-beta model model = FitModelDBeta() else: - raise ValueError("Invalid model") + raise ValueError("Invalid model: %s" % modelname) # set initial values and bounds for the model parameters params = config[modelname]["params"] for p, value in params.items(): |