code: def loggray(x, a, b):
      
      linval = 10.0 + 990.0 * (x-float(a))/(b-a)
      return (np.log10(linval)-1.0)*0.5 * 255.0
docs: Auxiliary function that specifies the logarithmic gray scale.
      a and b are the cutoffs.