Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyEphem Angle Clarification

I'd just like to make sure I understand what PyEphem is doing with angles.

Let's say I have an observer at 30° S, 60° W looking at the sky today at noon. So I do:

obs = ephem.Observer()
obs.lat, obs.lon = '-30', '-60'
obs.date = '2012/6/22 12:00:00'

Now I want to find which part of the celestial sphere (in RA and declination) the observer sees when looking at a certain azimuth and altitude. I can do:

obs.radec_of(az,alt)

Here is where I'm confused. From what I understand, PyEphem works with all angles as radians, so I should put az and alt in as radians. Is it the case, then, that 0° altitude is the horizon, 90° altitude is directly overhead, and -90° is pointing straight into the ground? In which case, does PyEphem consider 95° altitude to be the same as 85° or does it roll over into -85°?

Also, if the observer wants to look at the south celestial pole, is this the correct code?

az = float( ephem.degree('180') )
alt = float( ephem.degree('30') )
ra, dec = obs.radec_of(az,alt)

Or should the altitude be -30°?

like image 903
user1475412 Avatar asked Feb 20 '23 02:02

user1475412


1 Answers

To answer your other question: an altitude like 95° neither is simply considered simply the same as 85°, nor does PyEphem consider it to be way down below our feet near the nadir at –85° altitude. Instead, it thinks of 95° as meaning “go all the way up the line of azimuth that you are following — up, up, up, until finally you reach the zenith and are at 90° — and then keep going five degrees over into the other side of the sky, bringing you five degrees down the completely opposite line of azimuth.”

So if you ask about the point at azimuth and altitude (15°, 95°) then PyEphem will think of that as going all the way up the 15° line and then going even further so that you start going back down the 195° azimuth line on the other side of the zenith. So the “normalized” name for the azimuth and altitude you are talking about is (195°, 90° – 5°) = (195°, 85°).

like image 95
Brandon Rhodes Avatar answered Feb 25 '23 16:02

Brandon Rhodes