ngamsCmd_GLEAMCUTOUT.py 文件源码

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

项目:ngas 作者: ICRAR 项目源码 文件源码
def overlap_check(ra, dec, radius):
    """
    A very rough implementation, not using any distance or coverage calculation
    for efficiency
    """
    for i, re in enumerate(overlap_regions):
        if (ra >= re[0] and ra <= re[1] and dec >= re[2] and dec <= re[3] and
        radius <= re[4]):
            #raise Exception("Sorry the region '{0}' does not contain any GLEAM sources".format(overlap_names[i]))
            raise Exception(overlap_err)

    icrs_coord = SkyCoord(ra * u.degree, dec * u.degree, frame='icrs')
    gg = icrs_coord.galactic
    b = float(str(gg.to_string().split(',')[0]).split()[1])
    if (b < 9 and b > -9):
        #raise Exception("Sorry Galactic Plane does not contain any GLEAM sources.")
        raise Exception(overlap_err)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号