I would like to use pyephem or skyfield to find the degree of the local horizon (starting from South = 0°) at which is located the highest point of the ecliptic. Note that I am not trying to find the culmination of a planet. It could well be that, when looking South, there is no planet on the ecliptic by that time/latitude, but there will still be a highest point of the ecliptic. Can anyone help?
Asked
Active
Viewed 110 times
1
-
`+1` and welcome to Stack Overflow! I see that you've also posted this question in [Astronomy SE](https://astronomy.stackexchange.com/q/41482/7982) and it's strongly discouraged to cross-post the same question in multiple sites for several reasons including *answer fragmentation*. Since this is most relevant to Astronomy I'm going to vote to close this copy of your question. It will still serve a useful purpose of helping direct traffic to the other site. – uhoh Feb 17 '21 at 02:06
-
Voting to close this copy of the question because it was also [asked and answered in Astronomy SE](https://astronomy.stackexchange.com/q/41482/7982). Welcome to the new user to Stack Overflow and I'm sure they won't cross-post again :-) – uhoh Feb 17 '21 at 02:08
-
1Yes. I found Astronomy SE after my first post. – Cirédérf Eniomel Feb 17 '21 at 13:11
1 Answers
1
While it’s likely that someone will soon jump in with a closed-form solution that uses spherical trigonometry — in which case it’s likely that Skyfield or PyEphem will only be used to determine the Earth orientation — here’s a quick way to get an answer within about a degree:
- Generate the ecliptic as 360 points one degree apart across the sky.
- Compute the altitude and azimuth of each one.
- Choose the highest.
The result agrees closely to what I see if I open Stellarium, turn on the ecliptic, and choose a field star right near the point where the ecliptic reaches the highest point in the sky.
import numpy as np
from skyfield import api, framelib
from skyfield.positionlib import Apparent
= api.tau
ts = api.load.timescale()
eph = api.load('de421.bsp')
bluffton = api.Topos('40.74 N', '84.11 W')
t = ts.utc(2021, 2, 16, 22, 52)
angle = np.arange(360) / 360.0 *
zero = angle * 0.0
f = framelib.ecliptic_frame
d = api.Distance([np.sin(angle), np.cos(angle), zero])
v = api.Velocity([zero, zero, zero])
p = Apparent.from_time_and_frame_vectors(t, f, d, v)
p.center = bluffton
alt, az, distance = p.altaz()
i = np.argmax(alt.degrees) # Which of the 360 points has highest altitude?
print('Altitude of highest point on ecliptic:', alt.degrees[i])
print('Azimuth of highest point on ecliptic:', az.degrees[i])
The result:
Altitude of highest point on ecliptic: 67.5477569215633
Azimuth of highest point on ecliptic: 163.42529398930515
This is probably a computationally expensive enough approach that it won’t interest you once you or someone else does the spherical trigonometry to find an equation for the azimuth; but at the very least this might provide numbers to check possible formulae against.

Brandon Rhodes
- 83,755
- 16
- 106
- 147
-
Thank you so much. I checked with Stellarium, and it looks indeed pretty close to it. I am a beginner in astronomy and python, and the last time I did trigonometry was about 40 years ago, so I will probably not propose a better solution any time soon. Thanks again. – Cirédérf Eniomel Feb 17 '21 at 13:09