docs: def close_sids(self, rec, trt, mag):
          """
          :param rec:
             a record with fields minlon, minlat, maxlon, maxlat
          :param trt:
             tectonic region type string
          :param mag:
             magnitude
          :returns:
             the site indices within the bounding box enlarged by the integration
             distance for the given TRT and magnitude
          """
          if self.sitecol is None:
              return []
          elif not self.integration_distance:  # do not filter
              return self.sitecol.sids
          if hasattr(rec, 'dtype'):
              bbox = rec['minlon'], rec['minlat'], rec['maxlon'], rec['maxlat']
          else:
              bbox = rec  # assume it is a 4-tuple
          maxdist = self.integration_distance(trt, mag)
          a1 = min(maxdist * KM_TO_DEGREES, 90)
          a2 = min(angular_distance(maxdist, bbox[1], bbox[3]), 180)
          bb = bbox[0] - a2, bbox[1] - a1, bbox[2] + a2, bbox[3] + a1
          if hasattr(self, 'index'):  # RtreeFilter
              return within(bb, self.index)
          return self.sitecol.within_bbox(bb)