Take the 2-minute tour ×  For a given observer (lon, lat, time)
on Earth and a given Galactic coordinate (GLON, GLAT), how can I
compute the corresponding (alt, az) point in the sky with
PyEphem?  share|improve this question add comment  1 Answer  up
vote 2 down vote accepted  Given the way that PyEphem currently
works, there are two steps to answering your question. First,
you have to convert a pair of galactic coordinates into an
equatorial RA/dec pair of coordinates instead.  import ephem  #
Convert a Galactic coordinate to RA and dec
galactic_center = ephem.Galactic(0, 0) eq =
ephem.Equatorial(galactic_center) print 'RA:', eq.ra, 'dec:',
eq.dec  → RA: 17:45:37.20 dec: -28:56:10.2  Those coordinates
are pretty close to the ones that the Wikipedia gives for the
galactic center.  Now that we have a normal RA/dec coordinate,
we just need to figure out where it is in the sky right now.
Since PyEphem is built atop a library that knows only about
celestial “bodies” like stars and plane