PyEphem provides the Python language with routines for computing the location of celestial objects like the sun, moon, and planets, as well as for any asteroids, comets, and earth satellites for which the caller can provide orbital elements. Rise, set, and transit times can be computed for any object, and basic coordinate computations are also supported.
Questions tagged [pyephem]
272 questions
5
votes
1 answer
Rectangular Coordinates for Earth Satellites in PyEphem
I have searched through a large number of PyEphem webpages, downloaded code, and investigated objects, but I have not found a way to get the earth-centered rectangular coordinates of an earth satellite in some nominally inertial coordinate system.…

user1619972
- 53
- 4
4
votes
1 answer
Convert topocentric coordinates (Azimuth, Elevation) to equatorial coordinates (RA, Dec) with PyEphem
This looks quite a basic task, but I cannot sort it out.
The PyEphem documentation:
http://rhodesmill.org/pyephem/radec.html
describes how to perform the conversion the other way around, from a Body and an Observer objects to Apparent Topocentric…

Andrea Zonca
- 8,378
- 9
- 42
- 70
4
votes
1 answer
Can PyEphem be used to calculate set and rise times for any object?
Is there a way to use PyEphem to calculate rise/set values for a list of targets? I have an astropy.tableof coordinates (in RA & Dec) for my targets and I would like to use PyEphem (or another package) to produce a further two columns with Rise &…

Dean
- 259
- 3
- 10
4
votes
1 answer
Visualization of satellite track retrieved with pyephem is off
using the code below, and using pyephem and fastkml, I'd like to extract a ground track of a satellite from a TLE. The code looks as follows:
import numpy as np
import ephem
import datetime as dt
from fastkml import kml
from shapely.geometry import…

Dzz
- 543
- 2
- 8
- 18
4
votes
1 answer
pyephem next_pass not matching heavens-above
I am using pyEphem to get the next over pass of the ISS from my location, but the results I get back do not match what I see on heavens-above using the same coordinates
I am probably making a stupid mistake but I can't figure it out
My code below…

kujosHeist
- 810
- 1
- 11
- 25
4
votes
1 answer
Getting latitude and longitude of the Sun on a world map with PyEphem
I'm trying to determine the latitude and longitude of say the Sun, the Moon and Mars. I need the result relative to the Earth's equator and the Prime Meridian in order to produce a result similar to this map.
I believe that's also what the author of…

trehn
- 381
- 2
- 7
4
votes
1 answer
import error: ephem/_libastro.so undefined symbol: PyUnicodeUCS2_AsUTF8String
I just successfully installed PyEphem using pip in a pyenv. However, on import I receive:
ImportError: /python2.7/site-packages/ephem/_libastro.so: undefined symbol: PyUnicodeUCS2_AsUTF8String
In looking around I've seen it mentioned that some…

PilotStew
- 65
- 2
- 6
4
votes
2 answers
Calculating the Phase Angle between the Sun / ISS and an observer on the earth
To help me with calculating the visual magnitude of the International Space Station I need to be able to calculate the phase angle.
Can anyone help me calculate that?
For any moment in time I have generated the Obs object and the ISS object using…

Liam Kennedy
- 86
- 6
4
votes
3 answers
pyEphem - Calculating Positions of non-Earthy Moons
I'm trying to get the Earth distance and the right ascension (relative to my observer point in Earth) of a satellite not orbiting the Earth, but pyEphem isn't returning the same properties as other solar bodies.
With Ganymede (the largest moon of…

Alix Axel
- 151,645
- 95
- 393
- 500
4
votes
1 answer
Python satellite tracking with spg4, pyephem - positions not matching
I'm trying to write a basic python scrip that will track a given satellite, defined with tle's, from a given location. I'm not a asto/orbital person but am trying to become smarter on it.
I am running into a problem where the different models I'm…
user2084330
4
votes
2 answers
Perl equivalent of pyephem?
What's the Perl equivalent of pyephem?
Since pyephem is based on a C library(?), I'm guessing someone's created a Perl version too?
user354134
4
votes
1 answer
What is the range of dates for which pyephem is accurate?
I'm currently using Swiss Ephemeris, but it requires external data files which are quite large. So, I was considering Pyephem, which seems to work well without any data files. But what is the range of dates over which it is valid/accurate? SwissEph…

Stochastic Matrix
- 51
- 3
4
votes
3 answers
Python PyEphem calculation of Azimuth and Altitude
I am new to PyEphem and I am trying to figure out what it can do and how it works. As I do not want to use it as a black box and blindly trust whatever figure I get, I wanted to recreate an example that is explained here.
The example calculates the…

hgus1294
- 747
- 14
- 26
4
votes
2 answers
pyephem conversion of (Alt, Az) to (Ra, Dec) and back not internally consistent
I am finding that when I convert an (Alt, Az) to an (Ra, Dec) and then back with PyEphem, I don't get what I started with. Below is a simple example.
import ephem
print ephem.__version__
# '3.7.3.4'
gbt = ephem.Observer()
gbt.long =…

kiyo
- 1,929
- 1
- 18
- 22
4
votes
1 answer
How to compute (alt, az) for given Galactic coordinate (GLON, GLAT) with PyEphem?
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?

Christoph
- 2,790
- 2
- 18
- 23