code: def _process_vetoes(self, results, veto_info):
          
          chisq = numpy.array(numpy.zeros(len(veto_info)), numpy.float32, ndmin=1)
          dof = numpy.array(numpy.zeros(len(veto_info)), numpy.uint32, ndmin=1)
          sg_chisq = numpy.array(numpy.zeros(len(veto_info)), numpy.float32,
                                 ndmin=1)
          results['chisq'] = chisq
          results['chisq_dof'] = dof
          results['sg_chisq'] = sg_chisq
  
          keep = []
          for i, (snrv, norm, l, htilde, stilde) in enumerate(veto_info):
              correlate(htilde, stilde, htilde.cout)
              c, d = self.power_chisq.values(htilde.cout, snrv,
                                             norm, stilde.psd, [l], htilde)
              chisq[i] = c[0] / d[0]
              dof[i] = d[0]
  
              sgv = self.sg_chisq.values(stilde, htilde, stilde.psd,
                                         snrv, norm, c, d, [l])
              if sgv is not None:
                  sg_chisq[i] = sgv[0]
  
              if self.newsnr_threshold:
                  newsnr = ranking.newsnr(results['snr'][i], chisq[i])
                  if newsnr >= self.newsnr_threshold:
                      keep.append(i)
  
          if self.newsnr_threshold:
              keep = numpy.array(keep, dtype=numpy.uint32)
              for key in results:
                  results[key] = results[key][keep]
  
          return results
docs: Calculate signal based vetoes