272 questions
0
votes
0
answers
27
views
How to calculate the apparent tilt of a planet's axis using PyEphem
In particular, Uranus is practically on its side, so sometimes we see it pole-on and other times edge-on. Admittedly this changes very slowly over its year of 84 years, but that still means we see it ...
0
votes
0
answers
77
views
pyephem/ephem on esp32 micropython
I need astronomical calculations on an ESP-32 microcontroller with Micropython.
The only thing I found is https://github.com/peterhinch/micropython-samples/tree/...
0
votes
0
answers
271
views
Finding the time of the Sun's elevation (Ephem, Astral, PvLib?)
Is there a command in python's ephem, astral, or pvlib packages to find the time of day that the sun is at a particular angle below the horizon (from a specifled lat/long and on a specified date) as a ...
0
votes
2
answers
185
views
How do I access ephem.body fields using python and pyephem and getattr() method?
I am happy with the first part of my code which displays location events OK.
The second part, which uses the eval() method as well as getattr() to display ephem.Body() fields, seems 'unpythonic' to ...
0
votes
1
answer
77
views
Pycharm is not finding the functions in well known and working packages
I am using Pycharm to develop a script, and I would like to compute the beta angle for a specific satellite, i.e the angle between a satellite's orbital plane around Earth and the geocentric position ...
0
votes
2
answers
178
views
Why is the sunrise and sunset time returned by pyephem incorrect for a given location?
I am using the ephem module in Python to calculate the next sunrise and sunset time for a given location (Boston). However, the results returned by the next_rising and next_setting methods are ...
0
votes
1
answer
57
views
Difference between stellarium and pyephem entering the sun a constellation
I've noticed that Stellarium uses the center of the sun for entering a constellation but pyephem seems to use the edge and so there are a few hours of difference.
What's the correct calculation (...
0
votes
0
answers
44
views
while loop slows down over time
I am calculating azimuth and elevation relative to me with Python, which then sends it to an Arduino via a Serial connection. The python program calculates the position, waits 1 second, calculates the ...
2
votes
0
answers
201
views
pyephem : mismatch position of planets with other sources
i am trying to calculate the exact degree of planets on the zodiac by pyephem but i faced with some problems. i need to extract the amounts with high accuracy . i made it better by changing Epoch ...
0
votes
1
answer
263
views
Discrepancy between PyEphem and Skyfield HA/dec results
I'm refactoring some old code that used PyEphem to use Skyfield, and I'm getting a slight difference in the results of the GHA/dec of a body.
def sf(year):
from skyfield.api import N, W, wgs84
...
0
votes
1
answer
129
views
PyEphem: Can't get correct answers (noob)
I copied the script from this post and modified it for a location near me. But when I run it, I'm getting nonsense times for sunrise, sunset, and astronomical twilight even after adjusting for the ...
1
vote
0
answers
698
views
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 ...
1
vote
0
answers
157
views
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. ...
0
votes
2
answers
119
views
PyPy ephem couldn't install on linux
I want to install ephem package on PyPy 3.7 but i couldn't make it. Because i got following message during install. I guess, i'm missing something.
gcc -pthread -DNDEBUG -O2 -fPIC -Ilibastro -I. -I/...
0
votes
2
answers
177
views
PyEphem returning inconsistent right ascension and declination from horizontal coordinates
I have been using PyEphem for a while now and recently an issue was opened on my software in which the calculated declination wasn't constant, despite the altitude on the local horizon being constant. ...
1
vote
4
answers
539
views
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 ...
1
vote
1
answer
577
views
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 ...
1
vote
1
answer
176
views
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 ...
1
vote
1
answer
1k
views
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 ...
1
vote
1
answer
220
views
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 ...
1
vote
1
answer
626
views
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 ...
0
votes
1
answer
444
views
Azimuth/Altitude discrepancy between PyEphem and Skyfield
I cannot resolve why I am getting a different azimuth/altitude for a comet calculation between PyEphem and Skyfield, yet the right ascension and declination match.
Code example:
#!/usr/bin/env python3
...
3
votes
1
answer
502
views
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 ...
0
votes
1
answer
79
views
PyEphem -- satellites with a lunar orbit?
I'm trying to figure out the position of the moon given an observer in a lunar orbit. I have searched the internet already, but cannot find if PyEphem has this capability. Any suggestions?
0
votes
1
answer
185
views
Data Source for PyEphem?
I am trying to reference the use of PyEphem in my code. Their website shows that data sources are listed below "Documentation", but isn't there anymore. Does anyone know where they take their data ...
2
votes
1
answer
224
views
Why the results differ between pyephem sublat and STK LLA?
import ephem
line1 = "WorldView 4"
line2 = '1 41848U 16067A 20074.82580014 -.00000094 00000-0 00000+0 0 9999'
line3 = "2 41848 97.8435 176.0145 0008992 126.7749 233.3766 15....
0
votes
1
answer
765
views
Python ephem calculates sunrise and sunset one hour to early
Ephem is around one hour too early for the sunrise and sunset. Here is my code, the google prediction (which is verified myself) and the ephem prediction. It is almost around one hour different. The ...
1
vote
1
answer
166
views
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 ...
3
votes
1
answer
2k
views
calculate sunrise and sunset times from a datetime index using ephem in Python
I have a daily time series with DateTime index. I want to calculate the sunrise and sunset times for each day in the DataFrame. The result will be presented in columns rise and set. Below is my script ...
1
vote
1
answer
747
views
pyephem - does the right ascension calculation for the sun account for the Equation of Time
I am looking to calculate the highest precision lat lon for the subsolar point, in a particular datetime moment, as is reasonably possible using pyephem, with the help of some other library(s) if they ...
0
votes
1
answer
769
views
How to fix 'NameError: name 'imgpath' is not defined' error in Python3 and tkinter to show a picture
I want to show the current moon phase in tkinter for today or a specific date. When I run the code I get the Error: "NameError: name 'imgpath' is not defined". I understand that I have to press the ...
1
vote
1
answer
623
views
How do I parse timestamps for skyfield?
Given a UTC timestamp (e.g. the string '2006-03-01 11:18:15.500000+11:00'), how should I convert it to a Time object in skyfield (successor of pyEphem)?
For example, can skyfield use standard python ...
0
votes
1
answer
765
views
Is there a replacement for "readtle" in skyfield to pull each entry from TLE files?
I would like to pull and parse the data for individual satellites from the TLE files at celestrak.com using Python. I found code to do so with pyephem using "readtle" but this does not work in ...
1
vote
0
answers
304
views
Calculate when a satellite horizon is overlapping target area on ground
I’m trying to write some python code to work out when the Horizon of the International Space Station is overlapping with a target area on ground. In my case I’ve chosen China. I’ve got some code that ...
1
vote
1
answer
3k
views
python and ephem install
I am new to python. Have installed python ver 3.7.3, visual studio and build tools. Have executed the command 'python -m pip install -U pip setuptools' before installing the ephem. The following ...
1
vote
1
answer
235
views
Ephem sunrise-1minute
I’m trying to make code run a minute before sunrise, but since updating the code (via another question) as I’ve changed time zones from GMT, I’m having trouble getting the syntax right when removing ...
1
vote
1
answer
417
views
Pyephem localtime issue
I have a time lapse python script that works fine in the uk, it now I live in France it’s still calculating on standard GMT time. How can I change the code so it represents my actual location?
...
0
votes
0
answers
360
views
Why can't import ephem though it has been installed (Mac)?
I have installed ephem on my computer. But I face a problem when I try to import it into my project.
x-MacBook-Pro:~ dkfloza$ pip install ephem
Requirement already satisfied: ephem in /Library/...
1
vote
2
answers
170
views
Pyephem 15 minutes discrepancy when manually computing equinoxes and solstices
the code below tries to compute manually the first equinox of 2019.
It returns
('d1=', 2019/3/20 21:43:48)
('d2=', 2019/3/20 21:43:49)
2019/3/20 21:58:31
that is, a discrepancy of 15 minutes with ...
2
votes
1
answer
2k
views
What is the ephem TLE data for the moon?
I am trying to track the position of the moon with ephem TLE data and then store it in data.csv files. However, I can't find it!
The code below is an example on what I am trying to do, this is for ...
2
votes
2
answers
976
views
Calculating satellite apparent magnitude
I'm trying to make an application that calculates ISS flyovers.
I figured out how to actually get the flyover, but I am struggling with figuring out how to calculate the apparent magnitude of the ...
1
vote
0
answers
79
views
Pyephem RA & DEC to GHA & DEC [duplicate]
In Pyephem is there a way to list Greenwich Siderial Time GST so that I can convert Right Ascension RA to Greenwich Hour Angle GHA?
>>>import ephem
>...
1
vote
1
answer
313
views
PyEphem: RA and Separation questions
I am experimenting with the PyEphem library for astronomy, and trying to recreate/understand some of the basic calculations there.
There is a function called separation that, given two planets and a ...
1
vote
1
answer
967
views
Difference in sun-earth distance with compute(date) and compute(observer)
In the code below, computing the earth-sun distance with pyephem agrees well with the one compute from skyfield when using sun.compute(date), but not when doing sun.compute(obs) with obs an observer ...
1
vote
1
answer
48
views
Does celestial body locations reported by PyEphem report apparent or actual positions?
I've been using PyEphem for a couple of things, and I was wondering if the location of celestial bodies are reported as actual or apparent positions. That is to say, does the locations factor in the ...
1
vote
1
answer
436
views
Pyephem and pypredict/gpredict differences
I am trying to use pyephem to predict satellite passes for a ground station. However, the results I get are quite different from the ones I get with pypredict and gpredict. Here is the code I wrote.
...
3
votes
2
answers
1k
views
In python ephem I am unable to get position's of certain constellations
import ephem
date = '2018/9/20'
sun = ephem.Sun()
sun.compute(date)
print 'Sun in', list(ephem.constellation(sun))[1]
moon = ephem.Moon()
moon.compute(date)
print 'Moon in', list(ephem....
1
vote
3
answers
560
views
Confusion with using dec/ra to compute sub-lunar location
I have a need to compute the apparent azimuth and elevation angles as well as the sub-lunar lat/lon for a given date/time. The az/el angles I get generally agree with other sources (MoonCalc.org, ...
1
vote
1
answer
430
views
PyEphem: Problem converting negative angles by parsing the string representation
I've been using PyEphem to play around with the motion of planets relative to a certain position on Earth. However, I notice sometimes that the results I get from PyEphem appear non-continuous for ...
0
votes
1
answer
791
views
Flatlib use current date and time
I am using Flatlib to compute planet positions, but the code for entering the date and time for computation is fixed, so you have to update it each time.
Is there a way to using datetime.now() (or ...