Skip to content

Commit

Permalink
rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
segasai committed Aug 7, 2024
1 parent a10841c commit 7bbbdc0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions py/rvspecfit/spec_fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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())
Expand Down

0 comments on commit 7bbbdc0

Please sign in to comment.