code: def template_thinning(self, inj_filter_rejector):
          
          if not inj_filter_rejector.enabled or \
                  inj_filter_rejector.chirp_time_window is None:
              # Do nothing!
              return
  
          injection_parameters = inj_filter_rejector.injection_params.table
          fref = inj_filter_rejector.f_lower
          threshold = inj_filter_rejector.chirp_time_window
          m1= self.table['mass1']
          m2= self.table['mass2']
          tau0_temp, _ = pycbc.pnutils.mass1_mass2_to_tau0_tau3(m1, m2, fref)
          indices = []
  
          for inj in injection_parameters:
              tau0_inj, _ = \
                  pycbc.pnutils.mass1_mass2_to_tau0_tau3(inj.mass1, inj.mass2,
                                                         fref)
              inj_indices = np.where(abs(tau0_temp - tau0_inj) <= threshold)[0]
              indices.append(inj_indices)
              indices_combined = np.concatenate(indices)
  
          indices_unique= np.unique(indices_combined)
          self.table = self.table[indices_unique]
docs: Remove templates from bank that are far from all injections.