GenericSearch.py 文件源码

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

项目:gullikson-scripts 作者: kgullikson88 项目源码 文件源码
def HelCorr(header, observatory="CTIO", idlpath="/Applications/exelis/idl83/bin/idl", debug=False):
    """
    Similar to HelCorr_IRAF, but attempts to use an IDL library.
    See HelCorr_IRAF docstring for details.
    """
    ra = 15.0 * convert(header['RA'])
    dec = convert(header['DEC'])
    jd = float(header['jd'])

    cmd_list = [idlpath,
                '-e',
                ("print, barycorr({:.8f}, {:.8f}, {:.8f}, 0,"
                 " obsname='{}')".format(jd, ra, dec, observatory)),
    ]
    if debug:
        print("RA: ", ra)
        print("DEC: ", dec)
        print("JD: ", jd)
    output = subprocess.check_output(cmd_list).split("\n")
    if debug:
        for line in output:
            print(line)
    return float(output[-2])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号