Calculation star position in the sky, PyEphem

假如想象 提交于 2019-12-23 16:43:18

问题


I have difficulties with finding current coordinates (RA, DEC) for star in sky. In net I have found only this one tutorial, how to use ephem library: http://asimpleweblog.wordpress.com/2010/07/04/astrometry-in-python-with-pyephem/

As I understood I need to:

  1. create observer
telescope = ephem.Observer()
telescope.long =  ephem.degrees('10')
telescope.lat = ephem.degrees('60')
telescope.elevation = 200
  1. Create a body Object star here is trouble, I have only (RA,DEC) coordinates for star

  2. Calculate position by .calculate(now())

  3. by new coordinates find altitude

One more question about accuracy of this library, how accurate it is? I have compared juliandate and sidestreal time between this program and kstars, looks like quite similar.

and this http://www.jgiesen.de/astro/astroJS/siderealClock/

PS! Or may be some one can reccomend better library for this purposes.


回答1:


I guess you're looking for 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

I don't know about the accuracy; pyephem uses the same code as xephem, and eg the positions of the planets are given by rounded-down VSOP87 solutions (accuracy better than 1 arcsecond); kstars appears to use the full VSOP solution.
But this will really depend on your need; eg don't rely on it blindly guiding your telescope, there are better solutions for that.




回答2:


star = ephem.FixedBody(ra=123.123, dec=45.45)

in my case fixedbody creation does not work, should be

star = ephem.FixedBody()
star._ra = ephem.hours('10:10:10')
star._dec = ephem.degrees('10:10:10')


来源:https://stackoverflow.com/questions/6870743/calculation-star-position-in-the-sky-pyephem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!