simUtils.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:frequencyDependentAntennas 作者: reedessick 项目源码 文件源码
def cumsum_snr(freqs, detector, data, hpf, hxf, theta, phi, psi, zeroFreq=False, normalizeTemplate=True ):
    """
    returns the cumulative sum of the snr as a function of frequency
    does NOT maximize over the phase at coalescence
    """
    template = detector.project(freqs, hpf, hxf, theta, phi, psi, zeroFreq=zeroFreq)
    PSD = detector.PSD(freqs)
    deltaF = freqs[1]-freqs[0]

    ans = 2*np.cumsum(deltaF*np.conjugate(data)*template/PSD).real 
    if normalizeTemplate:
        ans /= np.sum(deltaF*np.conjugate(template)*template/PSD).real**0.5

    return ans

#------------------------
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号