code: def range_fltr(dem, rangelim):
      
      print('Excluding values outside of range: {0:f} to {1:f}'.format(*rangelim))
      out = np.ma.masked_outside(dem, *rangelim)
      out.set_fill_value(dem.fill_value)
      return out
docs: Range filter (helper function)