code: def brightness(self, x, y, radius, medv, data):
          
          x0, y0, arr = self.cut_region(x, y, radius, data)
          arr2 = np.sort(arr.flat)
          idx = int(len(arr2) * 0.8)
          res = arr2[idx] - medv
          return float(res)
docs: Return the brightness value found in a region (radius) pixels away
          from (x, y) in (data).