docs: def comp_back_with_annulus(img, xc, yc, r_in, r_out, frac=0.1):
      '''
      center: [x,y], center of first pixel is [0,0]
      '''
  
      x_min = -0.5 - xc
      x_max = img.shape[1] - 0.5 - xc
      y_min = -0.5 - yc
      y_max = img.shape[1] - 0.5 - yc
      mm = encloses_annulus(x_min, x_max, y_min, y_max,
                            img.shape[1], img.shape[0],
                            r_in, r_out)
  
      valid = mm > frac
      rr = img[valid]
  
      if rr.size == 0:
          raise ValueError("Not enough points to compute background")
  
      # mode?
      bck = mode_half_sample(rr)
  
      return bck, mm