Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In python ephem I am unable to get position's of certain constellations

Tags:

python

pyephem

import ephem

date = '2018/9/20'

sun = ephem.Sun()
sun.compute(date)
print 'Sun in', list(ephem.constellation(sun))[1]

moon = ephem.Moon()
moon.compute(date)
print 'Moon in', list(ephem.constellation(moon))[1]

mars = ephem.Mars()
mars.compute(date)
print 'Mars in', list(ephem.constellation(mars))[1]

mercury = ephem.Mercury()
mercury.compute(date)
print 'Mercury in', list(ephem.constellation(mercury))[1]

jupiter = ephem.Jupiter()
jupiter.compute(date)
print 'Jupiter in', list(ephem.constellation(jupiter))[1]

venus = ephem.Venus()
venus.compute(date)
print 'Venus in', list(ephem.constellation(venus))[1]

saturn = ephem.Saturn()
saturn.compute(date)
print 'Saturn in', list(ephem.constellation(saturn))[1]

I have found the all 7 planets in their house for the specific date. Now I am in need to find the Rahu and Ketu house in a astro table. How to get that? Is there any functions for it?

like image 515
Aravindh Thirumaran Avatar asked Dec 05 '25 07:12

Aravindh Thirumaran


1 Answers

I am quite sure that only real planets are available in ephem. I found this definition

Astronomically, Rahu and Ketu denote the points of intersection of the paths of the Sun and the Moon as they move on the celestial sphere.

Using some math will tell you the points. Maybe this might help you to transform the coordinates between the different systems.

From that you could derive a view point in ephem, it is called an Observer and pass it to ephem.constellation(o),

like image 77
Joe Avatar answered Dec 07 '25 20:12

Joe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!