From 9add285aa051cf74d99732e72668ef300d9039c4 Mon Sep 17 00:00:00 2001 From: Romain Hugonnet Date: Thu, 5 Dec 2024 13:52:55 -0900 Subject: [PATCH] Linting --- doc/source/sliderule.md | 8 ++++---- xdem/dem.py | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/source/sliderule.md b/doc/source/sliderule.md index a5d70101..dca3e16f 100644 --- a/doc/source/sliderule.md +++ b/doc/source/sliderule.md @@ -16,10 +16,10 @@ kernelspec: # Pair with SlideRule for reference -Most analysis of **xDEM relies on independent, high-precision elevation data to use as reference**, whether for +Most analysis of **xDEM relies on independent, high-precision elevation data to use as reference**, whether for coregistration, bias-corrections or uncertainty analysis. -[SlideRule](https://slideruleearth.io/) provides the ideal way to retrieve such data by accessing big data archives +[SlideRule](https://slideruleearth.io/) provides the ideal way to retrieve such data by accessing big data archives of high-precision elevations, such as ICESat-2 or GEDI, efficiently in the cloud. Below, a short example to coregister and perform uncertainty analysis of a DEM with ICESat-2 ATL06. @@ -53,7 +53,7 @@ inlier_mask = ~glacier_outlines.create_mask(dem) bounds = list(dem.get_bounds_projected(4326)) region = sliderule.toregion(bounds)["poly"] -# Initiliaze SlideRule client +# Initialize SlideRule client sliderule.init("slideruleearth.io") # Define desired parameters for ICESat-2 ATL06 @@ -109,4 +109,4 @@ vect.plot(column="dh_aft", cmap='RdYlBu', vmin=-10, vmax=10, ax=ax[1], markersiz _ = ax[1].set_yticklabels([]) plt.tight_layout() plt.savefig("/home/atom/ongoing/test.png", dpi=400) -``` \ No newline at end of file +``` diff --git a/xdem/dem.py b/xdem/dem.py index 441d08e2..17f31bef 100644 --- a/xdem/dem.py +++ b/xdem/dem.py @@ -490,7 +490,7 @@ def coregister_3d( def estimate_uncertainty( self, other_elev: DEM | gpd.GeoDataFrame, - stable_terrain: Mask | NDArrayb = None, + stable_terrain: Mask = None, approach: Literal["H2022", "R2009", "Basic"] = "H2022", precision_of_other: Literal["finer"] | Literal["same"] = "finer", spread_estimator: Callable[[NDArrayf], np.floating[Any]] = nmad, @@ -542,7 +542,7 @@ def estimate_uncertainty( # Stable terrain depending on input if stable_terrain is None: - stable_terrain = np.ones(self.shape, dtype="uint8") + stable_terrain = self.copy(new_array=np.ones(self.shape, dtype=bool)) # Elevation change with the other DEM or elevation point cloud if isinstance(other_elev, DEM):