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])
评论列表
文章目录