Skip to content

Commit

Permalink
Replaced deprecated bytescale function with equivalent from scikit-image
Browse files Browse the repository at this point in the history
  • Loading branch information
daminton committed Jul 24, 2021
1 parent af0fd20 commit 1ae66e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/ctem_io_writers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import shutil
import scipy
from scipy import signal
import skimage

#Set pixel scaling common for image writing, at 1 pixel/ array element
dpi = 72.0
Expand Down Expand Up @@ -160,7 +161,7 @@ def image_shaded_relief(parameters, surface_dem):
dem_scaled = numpy.copy(surface_dem) * 0.0

#Generate shaded depth map with surface_dem color scaling (RGBA)
shaded = scipy.misc.bytescale(convolved_map)
shaded = skimage.img_as_ubyte(convolved_map)
if numpy.amax(shaded) == 0: shaded=255
shadedscl = shaded / 255.0

Expand Down

0 comments on commit 1ae66e8

Please sign in to comment.