Skip to content

Commit

Permalink
Simplify mod
Browse files Browse the repository at this point in the history
  • Loading branch information
rhugonnet committed Mar 19, 2024
1 parent 605faab commit 0ec4e73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/advanced/plot_slope_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def plot_attribute(attribute, cmap, label=None, vlim=None):
aspect_zevenberg = xdem.terrain.aspect(dem, method="ZevenbergThorne")

diff_aspect = aspect_horn - aspect_zevenberg
diff_aspect_mod = np.minimum(np.mod(diff_aspect, 360), 360 - np.mod(diff_aspect, 360))
diff_aspect_mod = np.minimum(diff_aspect % 360, 360 - diff_aspect % 360)

plot_attribute(
diff_aspect_mod, "Spectral", "Aspect of Horn (1981) minus\n aspect of Zevenberg and Thorne (1987) (°)", vlim=[0, 90]
Expand Down

0 comments on commit 0ec4e73

Please sign in to comment.