From 455722aa5e992bd8a8e925cb4b3cfa814d39c3b7 Mon Sep 17 00:00:00 2001 From: "Karl D. Gordon" Date: Sat, 18 Nov 2023 06:45:02 -0500 Subject: [PATCH] fixing tlusty Z determination --- measure_extinction/utils/fit_model.py | 3 ++- measure_extinction/utils/make_all_tlusty_obsdata.py | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/measure_extinction/utils/fit_model.py b/measure_extinction/utils/fit_model.py index 51ead9c..6967d77 100755 --- a/measure_extinction/utils/fit_model.py +++ b/measure_extinction/utils/fit_model.py @@ -162,7 +162,8 @@ def lnprob(params, obsdata, modeldata, fitinfo): information about the fitting """ lnp = fitinfo.lnprior(params) - print(lnp, fitinfo.lnlike(params, obsdata, modeldata)) + # print(params) + # print(lnp, fitinfo.lnlike(params, obsdata, modeldata)) if lnp == lnp_bignnum: return lnp else: diff --git a/measure_extinction/utils/make_all_tlusty_obsdata.py b/measure_extinction/utils/make_all_tlusty_obsdata.py index 24774e7..063c4dd 100644 --- a/measure_extinction/utils/make_all_tlusty_obsdata.py +++ b/measure_extinction/utils/make_all_tlusty_obsdata.py @@ -50,7 +50,10 @@ def decode_params(filename): gpos = filename.find("g", slashpos) vpos = filename.find("v", slashpos) - model_params["Z"] = float(filename[zpos + 1 : tpos]) * 0.01 + if tpos - zpos > 4: + model_params["Z"] = float(filename[zpos + 1 : tpos]) * 0.001 + else: + model_params["Z"] = float(filename[zpos + 1 : tpos]) * 0.01 model_params["Teff"] = float(filename[tpos + 1 : gpos]) model_params["logg"] = float(filename[gpos + 1 : vpos]) * 0.01 model_params["vturb"] = float(filename[vpos + 1 : periodpos])