Skip to content

Commit

Permalink
Try to round c parameter as well
Browse files Browse the repository at this point in the history
  • Loading branch information
rhugonnet committed Oct 9, 2023
1 parent da1813b commit 07fc512
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions xdem/coreg/affine.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,9 @@ def residuals(parameters: tuple[float, float, float], y_values: NDArrayf, x_valu

# Round results above the tolerance to get fixed results on different OS
a_parameter, b_parameter, c_parameter = results.x
a_parameter = np.round(a_parameter, 1)
b_parameter = np.round(b_parameter, 1)
a_parameter = np.round(a_parameter, 2)
b_parameter = np.round(b_parameter, 2)
c_parameter = np.round(c_parameter, 2)

# Calculate the easting and northing offsets from the above parameters
east_offset = a_parameter * np.sin(b_parameter)
Expand Down

0 comments on commit 07fc512

Please sign in to comment.