From 7bbbdc0acb907eb492ce7e77e113b3601095b499 Mon Sep 17 00:00:00 2001 From: "Sergey E. Koposov" Date: Wed, 7 Aug 2024 17:41:33 +0100 Subject: [PATCH] rename function --- py/rvspecfit/spec_fit.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/py/rvspecfit/spec_fit.py b/py/rvspecfit/spec_fit.py index 9294ebf..f1dfaf2 100644 --- a/py/rvspecfit/spec_fit.py +++ b/py/rvspecfit/spec_fit.py @@ -719,7 +719,7 @@ def get_chisq(specdata, return ret -def quadratic_interp_min(vel_grid, chisq, i): +def _quadratic_interp_min(vel_grid, chisq, i): """Find the minimum using quadratic interpolation Parameters @@ -753,7 +753,7 @@ def find_best(specdata, options=None, config=None, quadratic=True): - """ + """ Find the best fit template and velocity from a grid Parameters @@ -804,7 +804,7 @@ def find_best(specdata, probs = np.exp(-0.5 * (chisq[:, i2] - chisq[i1, i2])) probs = probs / probs.sum() if quadratic: - best_vel = quadratic_interp_min(vel_grid, chisq[:, i2], i1) + best_vel = _quadratic_interp_min(vel_grid, chisq[:, i2], i1) else: best_vel = vel_grid[i1] best_err = np.sqrt((probs * (vel_grid - best_vel)**2).sum())