From 07fc51243e701bd9b3641e24b2333c4b543560b5 Mon Sep 17 00:00:00 2001 From: Romain Hugonnet Date: Mon, 9 Oct 2023 18:35:45 -0500 Subject: [PATCH] Try to round c parameter as well --- xdem/coreg/affine.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/xdem/coreg/affine.py b/xdem/coreg/affine.py index 0efc4f09..1206a2db 100644 --- a/xdem/coreg/affine.py +++ b/xdem/coreg/affine.py @@ -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)