Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
rhugonnet committed Dec 5, 2024
1 parent d09cd68 commit 9add285
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions doc/source/sliderule.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
```
```
4 changes: 2 additions & 2 deletions xdem/dem.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 9add285

Please sign in to comment.