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
2
votes
1 answer
Horizon for earth satellites
Adjusting the observer horizion attribute seems to have no effect on the rise / set times for earth satellites. Additionally, I found this in the libastro code:
/* we don't implement a minimum horizon altitude cutoff
SiteMinElev = 0;
*/
Is…

user1739051
- 33
- 2
2
votes
2 answers
Difference in transit time for the Sun
Executing this code fragment:
import ephem
oma=ephem.Observer()
oma.lat='50.7975189'
oma.lon='4.3579155'
oma.elevation=114.43
oma.epoch=ephem.now()
sun=ephem.Sun(oma)
print "object transit time: ",sun.transit_time
print "observer next transit time:…

Marble
- 31
- 2
2
votes
1 answer
How to perturb orbital elements in pyephem?
Does anyone know if pyephem provides a function to compute the "perturbed" orbital element values for a given date/time, given a set of input orbital element values and an associated epoch? I am currently using the sla_pertel function from the…

user1637528
- 21
- 2
2
votes
2 answers
Getting J2000 XYZ coordinates for a location on earth in Python
EDIT: Just found out that I need to convert latitude, longitude and elevation of a location on earth to J2000 coordinates and nothing to do with ra/dec or the moon. Sorry for this. Your answers did give me a lot of insights. Please see the edited…

Aasam Tasaddaq
- 645
- 4
- 13
- 23
1
vote
1 answer
Batch conversion of elevation/azimuth to equatorial coordinates
Is there a way in PyEphem to efficiently convert a large number of apparent coordinates to Equatorial Right Ascension/Declination without using a python loop?
Any hint appreciated, thanks!

Andrea Zonca
- 8,378
- 9
- 42
- 70
1
vote
0 answers
What's the fastest way of calculating if satellite is in camera FOV
I need to find fastest way of checking if satelllite (given its TLE) is visible from camera (given its position on Earth - longitude and latitude - and its field of view). Field of view of camera is defined as a rectangle with 15deg width, 60deg…

jlipinski
- 152
- 12
1
vote
0 answers
pyephem and sundial time
There were 2 questions showing different solutions: "Pyephem calculate current solar time" and "Local solar time function".
I tried both solutions using a timestamp of a transit. And I thought, that should result in 12:00:00 local solar time. But…

roe
- 11
- 2
1
vote
4 answers
Distribute points on a half sphere randomly without clustering in the center
This is a follow up question to this one:
pyephem problem with alt/az to ra/dec and back
I want to distribute stars randomly above an observer. I was able to to do this in the last question.
The issue I now get is that the stars seems clustered…

Taiko
- 51
- 7
1
vote
1 answer
pyephem problem with alt/az to ra/dec and back
i generate random positions above the horizon(az=0-360,alt=0-90)in az/alt and calculate them withradec_to() to RA and DEC. to check the result i retransform them.
so what i don't understand is, why i get around half of coordinates back under the…

Taiko
- 51
- 7
1
vote
1 answer
How to find the local horizon longitude of the highest point of the ecliptic
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,…

Cirédérf Eniomel
- 11
- 1
1
vote
1 answer
How to calculate SUN coordinates in ECEF (geocenter) frame?
I want to find the python library in which I may obtain the SUN coordinates in ECEF (Eart-Centered, Earth-Fixed) frame - geocenter coordinates. I try using jplephem, pyephem etc. but none of them availalbe to give these coordinates. Please give me…

D_K
- 11
- 1
- 2
1
vote
1 answer
why do I get the error "AttributeError: SatTrack instance has no attribute 'show_location"?
I'm very new to python and this is also my first post here, so please don't be angry if I make some mistakes. I'm trying my best to explain my problem :)
I wanted to track the ISS with 2 servos, so I downloaded the SatTrack library (more information…

LUGG4S
- 45
- 5
1
vote
1 answer
Differences between Pyephem and Skyfield for calculating ancient phenomena
I'm trying to calculate ancient phenomena for Babylon before the year 0. And I'm able to get something that aligns with known records from Pyephem, but I'd like to use Skyfield since that seems to be the more modern library. However, when I try…

labarna
- 668
- 1
- 9
- 16
1
vote
1 answer
Why am I getting the wrong solar alt/az from PyEphem?
I've only begun using PyEphem today so I'm at a bit of a loss as to why I get such incredibly incorrect results when I try to calculate the solar altitude and azimuth from an observer point. The code is really simple so I can't imagine where it's…

Miles Zoltak
- 191
- 11
1
vote
1 answer
Pyephem giving next_sunset on the wrong day if called after sunset
When I try and work out the next sunset time using pyephem it gives me sunset time today, even if I am calling after sunset today. The behavior i would expect is to return sunset tomorrow - i.e. the next sunset. Perhaps I am doing something simple…

MorrisseyJ
- 1,191
- 12
- 19