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
How to plot an orbit with pyephem/matplotlib
With pyephem I can take orbital elements from the Minor Planet Center and add them into a ephem.EllipticalBody().
To plot the orbit I've been getting the computing the sun distance, heliocentric latitiude and longitude over a the period of the orbit…

Albert White
- 21
- 2
2
votes
1 answer
Pyephem: 'Titan' object has no attribute 'mag'
I tried to determine the magnitude of Titan, but the result is this error message:
AttributeError: 'Titan' object has no attribute 'mag'
>>> import ephem
>>> t = ephem.Titan()
>>> t.compute()
>>> t.ra
15:55:10.52
>>> t.mag
Traceback (most recent…

Inaki
- 71
- 5
2
votes
1 answer
Python ephem module not recogizing seemingly valid latitude string
I am trying to calculate the azimuth of the rising and setting sun with the following code:
import ephem
import csv
import math
def convert_angle(angle):
fields = math.modf(angle)
deg = fields[1]
min_dec = abs(fields[0]*60)
…

user3096277
- 107
- 8
2
votes
2 answers
Why do PyEphem docs not mention rise_time or transit_time?
Is there a complete list of all the functions and objects available in PyEphem? I found a list here. But it doesn't seem to contain everything. Attributes like rise_time and transit_time exist, and are briefly mentioned in the tutorial, but are not…

Nabigh
- 91
- 6
2
votes
1 answer
Pyephem: time of a planet will be closest to the horizon
Is it possible to calculate time of a planet will be closest to the horizon, when pyephem throws AlwaysUpError and NeverUpError?

imbolc
- 1,620
- 1
- 19
- 32
2
votes
1 answer
Cannot import ephem on raspberry pi
I'm trying to import pyephem in python on my raspberry pi but I get the following error:
pi@ospi ~/downloads/pyephem-3.7.5.3 $ python
Python 2.7.3 (default, Mar 18 2014, 05:13:23)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or…

Adam
- 31
- 1
- 4
2
votes
2 answers
Human-Readable Names for Phases of the Moon With Pyephem
It seems like pyephem should be able to give me your standard human-type names for where we are in a moon cycle, given a date -- "first quarter," "full," "waxing crescent," "waning gibbous," etc.
Am I right that it does not?
Does anyone know of a…

hanksims
- 1,479
- 2
- 12
- 22
2
votes
0 answers
Geostationary orbit with pyephem?
I am trying to create a geostationary orbit in pyephem (_n = 1.0 revolutions per day). I would like to verify that it is geostationary by placing an observer directly below the satellite and verifying that alt='90.0' and az=0. For my test I am…

Ricky Egeland
- 41
- 5
2
votes
1 answer
How to start process 2hours before sunrise and stop 1 hour before sunset?
I'm checking time about every minute, but don't have a good way to check whether I'm in this 'on' mode of operation. I want to be 'on' 2hours before daylight up until 1 hour before sunset. If I continuously check using next_rising() and…

tarabyte
- 17,837
- 15
- 76
- 117
2
votes
1 answer
pyephem next_pass function returns different result
I'm creating an app to predict satellites visible passes.
In the app, I use 'if' statement to decide whether or not a satellite would be visible.
like follows;
if satellite.neverup is False and satellite.circumpolar is False:
…

mako
- 23
- 2
2
votes
1 answer
localtime not actually giving localtime
there's obviously a time module that works in combination with this problem, but I have not found it yet.
I'm simply trying to use Pyephem on a Raspberry Pi to find out what time sunrise and sunset is for my latitude longitude coordinates.
the code…

Octoth0rpe
- 2,267
- 4
- 19
- 21
2
votes
1 answer
Solar longitude from pyephem?
I'm trying to determine when seasons start and end on Mars. This point is at 0º, 90º, 180º, and 270º Ls (solar longitude).
PyEphem offers Heliocentric longitude and latitude. How can this be correlated to solar longitude displayed…

rtphokie
- 609
- 1
- 6
- 14
2
votes
1 answer
Pyephem Alt. and Az are completely wrong
I'm getting completely incorrect values for altitude and azimuth of the sun when calculated using the pyephem library.
I've already established my observer location, which is determined by raw_input for the lat and lon. I've checked to make sure…

ChuckDavis
- 219
- 1
- 2
- 8
2
votes
0 answers
pyephem set time precedes rise time
When I compute the code on the same object, same observer long, lat, I realize ephem returns set time that precedes the rise time for dates before 2014-04-06.
In my code, the sys.argv[1] date is local, is first converted to utc before passing…

Nutcracker
- 359
- 2
- 8
2
votes
1 answer
date and time to just time in python
I have made a small program for my weather station in python and its all working perfectly, but I have one little problem.
The output displays as
2014/5/18 04:03:41
2014/5/18 19:47:41
I want it to display as
04:03:41
19:47:41
Is there any easy…

hexce
- 151
- 1
- 1
- 12