From efcee39a4ea75d81411b5900ed9c6248615fd624 Mon Sep 17 00:00:00 2001 From: Austin Blevins Date: Mon, 6 Feb 2023 14:05:46 -0500 Subject: [PATCH] surf images now output with the correct orientation --- python/ctem/ctem/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/ctem/ctem/util.py b/python/ctem/ctem/util.py index dab91401..00922421 100644 --- a/python/ctem/ctem/util.py +++ b/python/ctem/ctem/util.py @@ -102,7 +102,7 @@ def image_dem(user, DEM): solar_angle = 20.0 # user['solar_angle'] ls = CTEMLightSource(azdeg=azimuth, altdeg=solar_angle) - dem_img = ls.hillshade(DEM, vert_exag=ve, dx=pix, dy=pix, fraction=1) + dem_img = ls.hillshade(np.flip(DEM,axis=0), vert_exag=ve, dx=pix, dy=pix, fraction=1) # Generate image to put into an array height = gridsize / dpi @@ -174,7 +174,7 @@ def image_shaded_relief(user, DEM): else: shadedmaxh = user['shadedmaxh'] - dem_img = ls.shade(DEM, cmap=cmap, blend_mode=mode, fraction=1.0, + dem_img = ls.shade(np.flip(DEM,axis=0), cmap=cmap, blend_mode=mode, fraction=1.0, vert_exag=ve, dx=pix, dy=pix, vmin=shadedminh, vmax=shadedmaxh)