astrom_common.py 文件源码

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

项目:astromalign 作者: dstndstn 项目源码 文件源码
def plotaffine(aff, RR, DD, exag=1000, affineOnly=False, doclf=True, **kwargs):
    import pylab as plt
    if doclf:
        plt.clf()
    if affineOnly:
        dr,dd = aff.getAffineOffset(RR, DD)
    else:
        rr,dd = aff.apply(RR, DD)
        dr = rr - RR
        dd = dd - DD
    #plt.plot(RR, DD, 'r.')
    #plt.plot(RR + dr*exag, DD + dd*exag, 'bx')
    plt.quiver(RR, DD, exag*dr, exag*dd,
               angles='xy', scale_units='xy', scale=1,
               pivot='middle', color='b', **kwargs)
               #pivot='tail'
    ax = plt.axis()
    plt.plot([aff.getReferenceRa()], [aff.getReferenceDec()], 'r+', mew=2, ms=5)
    plt.axis(ax)
    esuf = ''
    if exag != 1.:
        esuf = ' (x %g)' % exag
    plt.title('Affine transformation found' + esuf)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号