我正在使用以下脚本来计算银河坐标(以度为单位)到天体坐标的银河中心 (GC) 位置:
import healpy as hp
r = hp.Rotator(coord = ['G', 'C'], deg=True)
ri = hp.Rotator(coord = ['C', 'G'], deg=True)
gz, ga = 0., 0. # position of GC
gz_e, ga_e = r(gz, ga)
print gz_e, ga_e
zg, ag = ri(gz_e, ga_e)
print zg, ag
这些是我得到的结果:
1.09730865695 -2.91715324734 # celestial
0.0 -1.57079632679 # back to galactical
首先,天体坐标和银河坐标中的数字都是错误的。有可能我使用了错误的函数(我希望如此),或者函数本身有问题。有人知道出了什么问题吗?
第二:看来,我得到了以弧度表示的数字,对吗?