code: def find_bright_peaks(self, data, threshold=None, sigma=5, radius=5):
          
          if threshold is None:
              # set threshold to default if none provided
              threshold = self.get_threshold(data, sigma=sigma)
              self.logger.debug("threshold defaults to %f (sigma=%f)" % (
                  threshold, sigma))
  
          #self.logger.debug("filtering")
          data_max = filters.maximum_filter(data, radius)
          maxima = (data == data_max)
          diff = data_max > threshold
          maxima[diff == 0] = 0
  
          #self.logger.debug("finding")
          labeled, num_objects = ndimage.label(maxima)
          slices = ndimage.find_objects(labeled)
          peaks = []
          for dy, dx in slices:
              xc = (dx.start + dx.stop - 1) / 2.0
              yc = (dy.start + dy.stop - 1) / 2.0
  
              # This is only an approximate center; use FWHM or centroid
              # calculation to refine further
              peaks.append((xc, yc))
  
          self.logger.debug("peaks=%s" % (str(peaks)))
          return peaks
docs: Find bright peak candidates in (data).  (threshold) specifies a
          threshold value below which an object is not considered a candidate.
          If threshold is blank, a default is calculated using (sigma).
          (radius) defines a pixel radius for determining local maxima--if the
          desired objects are larger in size, specify a larger radius.
  
          The routine returns a list of candidate object coordinate tuples
          (x, y) in data.