예제 #1
0
def write_likelihood_data(filename,
                          coincparamsdistributions,
                          seglists,
                          verbose=False):
    utils.write_filename(ligolw_burca_tailor.gen_likelihood_control(
        coincparamsdistributions, seglists, name=u"string_cusp_likelihood"),
                         filename,
                         verbose=verbose,
                         gz=(filename or "stdout").endswith(".gz"))
예제 #2
0
    ):
        distributions.add_injection(double_params_func(coincs, timeslide))
        x_back_param.append(math.sqrt((coincs.H1.get_effective_snr()) ** 2 + (coincs.L1.get_effective_snr()) ** 2))

    elif (
        opts.statistic == "effective_snr" and opts.coincs == "H2L1" and hasattr(coincs, "H2") and hasattr(coincs, "L1")
    ):
        distributions.add_injection(double_params_func(coincs, timeslide))
        x_back_param.append(math.sqrt((coincs.H2.get_effective_snr()) ** 2 + (coincs.L1.get_effective_snr()) ** 2))


X_back_param = asarray(x_back_param)
#############################################################################
# Finish Smoothening of the Data using Gaussian Filter
#############################################################################
xmldoc = ligolw_burca_tailor.gen_likelihood_control(distributions)
utils.write_filename(xmldoc, "distributions.xml")

distributions.finish()
# 3###########################################################################
# Construction of Histrogram
#############################################################################

p = arange(0, 50.0, 1.0)
X_Inj_norm = hist(X_inj_param, p)[0] * 1.0 / max(hist(X_back_param, p)[0])
clf()

X_Back_norm = hist(X_back_param, p)[0] * 1.0 / max(hist(X_back_param, p)[0])
clf()

##########################################################################
예제 #3
0
def write_likelihood_data(filename, coincparamsdistributions, seglists, verbose = False):
	utils.write_filename(ligolw_burca_tailor.gen_likelihood_control(coincparamsdistributions, seglists, name = u"string_cusp_likelihood"), filename, verbose = verbose, gz = (filename or "stdout").endswith(".gz"))
예제 #4
0
  elif opts.statistic == 'effective_snr' and opts.coincs == "H1L1" and hasattr(coincs, "H1") and hasattr(coincs, "L1"):
        distributions.add_injection(double_params_func(coincs, timeslide))
        x_back_param.append(math.sqrt((coincs.H1.get_effective_snr())**2 + (coincs.L1.get_effective_snr())**2))

  elif opts.statistic == 'effective_snr' and opts.coincs == "H2L1" and hasattr(coincs, "H2") and hasattr(coincs, "L1"):
        distributions.add_injection(double_params_func(coincs, timeslide))
        x_back_param.append(math.sqrt((coincs.H2.get_effective_snr())**2 + (coincs.L1.get_effective_snr())**2))


  
X_back_param = asarray(x_back_param)
#############################################################################
# Finish Smoothening of the Data using Gaussian Filter
#############################################################################
xmldoc = ligolw_burca_tailor.gen_likelihood_control(distributions)
utils.write_filename(xmldoc, "distributions.xml")   

distributions.finish()
#3###########################################################################
# Construction of Histrogram
#############################################################################

p = arange(0, 50.0, 1.0)
X_Inj_norm = hist(X_inj_param,p)[0]*1.0/max(hist(X_back_param,p)[0])
clf()

X_Back_norm = hist(X_back_param,p)[0]*1.0/max(hist(X_back_param,p)[0])
clf()

##########################################################################