From 1251050e96ba8e200afd2abd41fac1124ad99c26 Mon Sep 17 00:00:00 2001 From: "Sergey E. Koposov" Date: Tue, 16 Jan 2024 16:54:43 +0000 Subject: [PATCH] fix a couple of bugs in previous change --- py/rvspecfit/make_interpol.py | 2 +- py/rvspecfit/read_grid.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/py/rvspecfit/make_interpol.py b/py/rvspecfit/make_interpol.py index 54a4fe0..e8eac29 100644 --- a/py/rvspecfit/make_interpol.py +++ b/py/rvspecfit/make_interpol.py @@ -199,7 +199,7 @@ def process_all(setupInfo, dbfile=dbfile, prefix=prefix, wavefile=wavefile) - mapper = read_grid.ParamMapper(log_parameters) + mapper = read_grid.LogParamMapper(log_parameters) HR, lamleft, lamright, resol_function, step, log = setupInfo deltav = 1000. # extra padding diff --git a/py/rvspecfit/read_grid.py b/py/rvspecfit/read_grid.py index 17e9f67..34f08df 100644 --- a/py/rvspecfit/read_grid.py +++ b/py/rvspecfit/read_grid.py @@ -126,7 +126,7 @@ def forward(self, vec): ret: numpy array The vector of transformed parameters used in interpolation """ - vec1 = np.array(vec) + vec1 = np.array(vec, dtype=np.float64) for i in self.log_ids: vec1[i] = np.log10(vec1[i]) return vec1 @@ -148,7 +148,7 @@ def inverse(self, vec): ret: numpy array The vector of original atmospheric parameters. """ - vec1 = np.array(vec) + vec1 = np.array(vec, dtype=np.float64) for i in self.log_ids: vec1[i] = 10**(vec1[i]) return vec1