计算天空中的恒星位置,PyEphem

eki*_*tru 3 python astronomy pyephem

我很难找到天空中星星的当前坐标(RA,DEC).在网上我发现只有这一个教程,如何使用ephem库:http://asimpleweblog.wordpress.com/2010/07/04/astrometry-in-python-with-pyephem/

据我所知,我需要:

  1. 创造观察者
telescope = ephem.Observer()
telescope.long =  ephem.degrees('10')
telescope.lat = ephem.degrees('60')
telescope.elevation = 200
Run Code Online (Sandbox Code Playgroud)
  1. 创建一个body对象星在这里很麻烦,我只有(RA,DEC)坐标为星

  2. 通过.calculate(now())计算位置

  3. 通过新坐标找到高度

关于这个库的准确性还有一个问题,它有多准确?我比较了这个程序和kstars之间的juliandate和sidestreal时间,看起来非常相似.

这个http://www.jgiesen.de/astro/astroJS/siderealClock/

PS!或者可能是某人可以为此目的推荐更好的图书馆.

小智 6

我猜你在寻找FixedBody?

telescope = ephem.Observer()
telescope.long =  ephem.degrees('10')
telescope.lat = ephem.degrees('60')
telescope.elevation = 200
star = ephem.FixedBody()
star._ra = 123.123
star._dec = 45.45
star.compute(telescope)
print star.alt, star.az
Run Code Online (Sandbox Code Playgroud)

我不知道准确性; pyephem使用与xephem相同的代码,例如,行星的位置由向下舍入的VSOP87解决方案给出(精度优于1弧秒); kstars似乎使用完整的VSOP解决方案.
但这真的取决于你的需要; 例如,不要盲目地指导你的望远镜,有更好的解决方案.