code: def compute_u_val_for_sky_loc_stat_no_phase(hplus, hcross, hphccorr,
                                   hpnorm=None , hcnorm=None, indices=None):
      
      if indices is not None:
          hplus = hplus[indices]
          hcross = hcross[indices]
  
      if hpnorm is not None:
          hplus = hplus * hpnorm
      if hcnorm is not None:
          hcross = hcross * hcnorm
  
      rhoplusre=numpy.real(hplus)
      rhocrossre=numpy.real(hcross)
      overlap=numpy.real(hphccorr)
  
      denom = (-rhocrossre+overlap*rhoplusre)
      # Initialize tan_kappa array
      u_val = denom * 0.
      # Catch the denominator -> 0 case
      bad_lgc = (denom == 0)
      u_val[bad_lgc] = 1E17
      # Otherwise do normal statistic
      u_val[~bad_lgc] = (-rhoplusre+overlap*rhocrossre) / \
          (-rhocrossre+overlap*rhoplusre)
      coa_phase = numpy.zeros(len(indices), dtype=numpy.float32)
  
      return u_val, coa_phase
docs: The max-over-sky location (no phase) detection statistic maximizes over
      an amplitude and the ratio of F+ and Fx, encoded in a variable called u.
      Here we return the value of u for the given indices.