本文整理汇总了Python中PALutils.calculateMatchedFilterSNR方法的典型用法代码示例。如果您正苦于以下问题:Python PALutils.calculateMatchedFilterSNR方法的具体用法?Python PALutils.calculateMatchedFilterSNR怎么用?Python PALutils.calculateMatchedFilterSNR使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PALutils
的用法示例。
在下文中一共展示了PALutils.calculateMatchedFilterSNR方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: enumerate
# 需要导入模块: import PALutils [as 别名]
# 或者: from PALutils import calculateMatchedFilterSNR [as 别名]
pterm = True
if args.snr is not None:
print 'Scaling distance to give SNR = {0}'.format(args.snr)
snr2 = 0
args.gwdist = 1
for ct, p in enumerate(pp):
inducedRes = (PALutils.createResiduals(psr[ct], np.pi/2-args.gwdec, args.gwra, \
args.gwchirpmass, args.gwdist, args.gwfreq, args.gwphase, \
args.gwpolarization, args.gwinc, psrTerm=pterm))
# compute snr
snr2 += PALutils.calculateMatchedFilterSNR(psr[ct], inducedRes, inducedRes)**2
# get total snr
snr = np.sqrt(snr2)
# scale distance appropiately
args.gwdist = snr/args.snr
print 'Scaled GW distance = {0} for SNR = {1}'.format(args.gwdist, args.snr)
# make residuals
for ct, p in enumerate(pp):
inducedRes = (PALutils.createResiduals(psr[ct], np.pi/2-args.gwdec, args.gwra, \
args.gwchirpmass, args.gwdist, args.gwfreq, args.gwphase, \
args.gwpolarization, args.gwinc, psrTerm=pterm))