本文整理汇总了Python中PALutils.angularSeparation方法的典型用法代码示例。如果您正苦于以下问题:Python PALutils.angularSeparation方法的具体用法?Python PALutils.angularSeparation怎么用?Python PALutils.angularSeparation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PALutils
的用法示例。
在下文中一共展示了PALutils.angularSeparation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: range
# 需要导入模块: import PALutils [as 别名]
# 或者: from PALutils import angularSeparation [as 别名]
# compute pairwise overlap reduction function values
print 'Computing Overlap Reduction Function Values'
ORF = PALutils.computeORF(psr)
# since we have defined our ORF to be normalized to 1
hdcoeff = ORF/2
# compute optimal statistic
print 'Running Cross correlation Statistic on {0} Pulsars'.format(npsr)
crosspower, crosspowererr = PALLikelihoods.crossPower(psr, args.gam)
# angular separation
xi = []
for ll in range(npsr):
for kk in range(ll+1, npsr):
xi.append(PALutils.angularSeparation(psr[ll].theta, psr[ll].phi, \
psr[kk].theta, psr[kk].phi))
# Perform chi-squared fit to determine best fit amplituded to HD curve
hc_sqr = np.sum(crosspower*hdcoeff / (crosspowererr*crosspowererr)) / \
np.sum(hdcoeff*hdcoeff / (crosspowererr*crosspowererr))
hc_sqrerr = 1.0 / np.sqrt(np.sum(hdcoeff * hdcoeff / (crosspowererr * crosspowererr)))
# get reduced chi-squared value
chisqr = np.sum(((crosspower - hc_sqr*hdcoeff) / crosspowererr)**2)
redchisqr = np.sum(chisqr) / len(crosspower)
print 'Results of Search\n'
print '------------------------------------\n'