docs: def get_background_sids(self, src_filter):
          """
          We can apply the filtering of the background sites as a pre-processing
          step - this is done here rather than in the sampling of the ruptures
          themselves
          """
          branch_key = self.idx_set["grid_key"]
          idist = src_filter.integration_distance(DEFAULT_TRT)
          with h5py.File(self.source_file, 'r') as hdf5:
              bg_locations = hdf5["Grid/Locations"].value
              distances = min_geodetic_distance(
                  src_filter.sitecol.xyz,
                  (bg_locations[:, 0], bg_locations[:, 1]))
              # Add buffer equal to half of length of median area from Mmax
              mmax_areas = self.msr.get_median_area(
                  hdf5["/".join(["Grid", branch_key, "MMax"])].value, 0.0)
              # for instance hdf5['Grid/FM0_0_MEANFS_MEANMSR/MMax']
              mmax_lengths = numpy.sqrt(mmax_areas / self.aspect)
              ok = distances <= (0.5 * mmax_lengths + idist)
              # get list of indices from array of booleans
              return numpy.where(ok)[0].tolist()