diff --git a/dev-environment.yml b/dev-environment.yml index 1759f338..706f11d1 100644 --- a/dev-environment.yml +++ b/dev-environment.yml @@ -15,7 +15,7 @@ dependencies: - tqdm - scikit-image - scikit-gstat>=1.0 -# - geoutils=0.0.14 + - geoutils=0.0.15 # Development-specific, to mirror manually in setup.cfg [options.extras_require]. - pip @@ -52,4 +52,4 @@ dependencies: - noisyopt # To run CI against latest GeoUtils - - git+https://github.com/GlacioHack/geoutils.git +# - git+https://github.com/GlacioHack/geoutils.git diff --git a/environment.yml b/environment.yml index 82d4e6ae..09090f46 100644 --- a/environment.yml +++ b/environment.yml @@ -15,8 +15,8 @@ dependencies: - tqdm - scikit-image - scikit-gstat>=1.0 -# - geoutils=0.0.14 + - geoutils=0.0.15 - pip - pip: - - git+https://github.com/GlacioHack/geoutils.git +# - git+https://github.com/GlacioHack/geoutils.git diff --git a/tests/test_coreg/test_affine.py b/tests/test_coreg/test_affine.py index 3c553b02..49f45a68 100644 --- a/tests/test_coreg/test_affine.py +++ b/tests/test_coreg/test_affine.py @@ -286,7 +286,7 @@ def test_tilt(self) -> None: assert np.abs(np.mean(periglacial_offset)) < np.abs(np.mean(pre_offset)) # Check that the mean periglacial offset is low - assert np.abs(np.mean(periglacial_offset)) < 2 + assert np.abs(np.mean(periglacial_offset)) < 0.01 def test_icp_opencv(self) -> None: warnings.simplefilter("error") diff --git a/xdem/coreg/affine.py b/xdem/coreg/affine.py index 2f263cec..4462a971 100644 --- a/xdem/coreg/affine.py +++ b/xdem/coreg/affine.py @@ -621,6 +621,7 @@ def _fit_func( ) -> None: """Fit the dDEM between the DEMs to a least squares polynomial equation.""" ddem = ref_dem - tba_dem + ddem[~inlier_mask] = np.nan x_coords, y_coords = _get_x_and_y_coords(ref_dem.shape, transform) fit_ramp, coefs = deramping( ddem, x_coords, y_coords, degree=self.poly_order, subsample=self._meta["subsample"], verbose=verbose