Skip to content

Commit

Permalink
fix rv determination that would sometimes crash
Browse files Browse the repository at this point in the history
  • Loading branch information
AWehrhahn committed Nov 26, 2021
1 parent 1c8d178 commit 986be74
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pysme/continuum_and_radial_velocity.py
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,9 @@ def func(rv):
return resid

interpolator = lambda x: np.interp(x, x_syn, y_syn)
res = least_squares(func, x0=rvel, loss="soft_l1", bounds=rv_bounds)
res = least_squares(
func, x0=rvel, loss="soft_l1", bounds=rv_bounds, jac="3-point"
)
rvel = res.x[0]

return rvel
Expand Down

0 comments on commit 986be74

Please sign in to comment.