astrom_common.py 文件源码

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

项目:astromalign 作者: dstndstn 项目源码 文件源码
def plotmatchdisthist(M, mas=True, nbins=100, doclf=True, color='b', **kwa):
    import pylab as plt
    if doclf:
        plt.clf()
    R = np.sqrt(M.dra_arcsec**2 + M.ddec_arcsec**2)
    if mas:
        R *= 1000.
        rng = [0, M.rad*1000.]
    else:
        rng = [0, M.rad]
    print 'Match distances: median', np.median(R), 'arcsec'
    n,b,p = plt.hist(R, nbins, range=rng, histtype='step', color=color, **kwa)
    if mas:
        plt.xlabel('Match distance (mas)')
    else:
        plt.xlabel('Match distance (arcsec)')
    plt.xlim(*rng)
    return n,b,p
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号