code: def newsnr_threshold(self, threshold):
          
          if not self.opt.chisq_bins:
              raise RuntimeError('Chi-square test must be enabled in order to '
                                 'use newsnr threshold')
  
          remove = [i for i, e in enumerate(self.events) if
                    ranking.newsnr(abs(e['snr']), e['chisq'] / e['chisq_dof'])
                    < threshold]
          self.events = numpy.delete(self.events, remove)
docs: Remove events with newsnr smaller than given threshold