Questions tagged [skyfield]

Skyfield high precision scientific astronomy library for Python and NumPy

The Skyfield project provides a modern alternative to the elderly PyEphem astronomy library for Python. Instead of requiring a custom C extension to be built or installed, Skyfield does all of its computation in pure Python and requires only the NumPy high performance numeric library in order to do its work — making Skyfield perfect for developers who can install NumPy directly, or who use scientific distributions that install NumPy automatically.

70 questions
8
votes
1 answer

Determining lunar eclipse in skyfield

I am given a list of dates in UTC, all hours cast to 00:00. I'd like to determine if a (lunar) eclipse occurred in a given day (ie past 24 hours) Considering the python snippet from sykfield.api import load eph = load('de421.bsp') def…
Jernej
  • 244
  • 2
  • 16
6
votes
1 answer

Shape of earth seems wrong in Skyfield - is my python correct?

Mapping the distance from the center of the earth to various (lat, lon) positions using Skyfield shows variation with latitude but independent of longitude (sub-millimeter). This may be a documented approximation in the package, a bug in my script,…
uhoh
  • 3,168
  • 4
  • 26
  • 78
5
votes
1 answer

Efficient way to propagate satellite catalog over time

Problem statement I need to propagate the entire catalog of recent TLEs (need a free account to view) from space-track.org using skyfield or similar. There are typically 15k-16k TLEs in the list. I have it working, but it is very slow. On the order…
Engineero
  • 10,387
  • 3
  • 41
  • 65
5
votes
3 answers

Why does scipy.optimize.minimize (default) report success without moving with Skyfield?

scipy.optimize.minimize using default method is returning the initial value as the result, without any error or warning messages. While using the Nelder-Mead method as suggested by this answer solves the problem, I would like to understand: Why does…
uhoh
  • 3,168
  • 4
  • 26
  • 78
5
votes
1 answer

PyEphem: dates of solstices and equinoxes and their validity on longer time scales

My question is what the time span is over which PyEphem provides accurate results for the dates of the solstices and equinoxes and the solar geometry. So far, I found the limits B.C. 9998-03-20 to A.D. 9999-12-31 in this very informative post on…
Rens
  • 51
  • 2
4
votes
2 answers

Adding a timedelta to a skyfield Time

The skyfield Almanach documentation uses this code to define the points in time between which to compute sunrise & sunset: t0 = ts.utc(2018, 9, 12, 4) t1 = ts.utc(2018, 9, 13, 4) What if I just wanted to use one (start) date and set the next date…
Uli Köhler
  • 11,813
  • 14
  • 55
  • 105
4
votes
1 answer

Better way to calculate apparent angular separation of two objects in Skyfield?

UPDATE: Skyfield has just had a significant revision, including expanded documentation and a method for angular separation - see the accepted answer. I'm calculating the apparent angular separation between two objects using Skyfield. I didn't find a…
uhoh
  • 3,168
  • 4
  • 26
  • 78
4
votes
0 answers

Integration of orbits with solar system gravity fields from Skyfield - speed issues

In the time tests shown below, I found that Skyfield takes several hundred microseconds up to a millisecond to return obj.at(jd).position.km for a single time value in jd, but the incremental cost for longer JulianDate objects (a list of points in…
uhoh
  • 3,168
  • 4
  • 26
  • 78
4
votes
2 answers

Earth to Jupiter distance with Skyfield

I'm trying to use Skyfield to plot the distance in au from Earth to solar system planets as a function of time. This is super simple and is even given in the front page of the package homepage. However while this works perfectly well for mercury,…
Fabio
  • 65
  • 6
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
  • 6
3
votes
2 answers

My Jupiter/Saturn conjunction calculation with skyfield doesn't match wikipedia

Using Python-Skyfield to calculate the upcoming conjunction if Jupiter and Saturn. Wikipedia Great conjunction times (1800 to 2100) Using Right Ascension: Dec 21,2020 13:22:00 UTC - Wikipedia. Dec 21,2020 13:34:33 UTC - My Calculation. Using…
3
votes
1 answer

Skyfield visible area underneath EarthSatellite

How would I calculate the area below an EarthSatellite so that I can plot the swath of land covered as the satellite passes over? Is there anything in Skyfield that would facilitate that? Edit: Just thought I'd clarify what I mean by area below the…
Gordon13
  • 449
  • 3
  • 18
3
votes
2 answers

How to find my IDLE's Python, then apply pip upgrade to a package it uses?

I have two python 2.7's of interest: version with IDLE that came from https://www.python.org/downloads/ anaconda 2.7 installation I use MacOS. (I understand I'm overdue to switch to Python 3) I'd like to apply pip install --upgrade PackageName to…
uhoh
  • 3,168
  • 4
  • 26
  • 78
3
votes
1 answer

How can I use skyfied to convert SGP4 TEME coordinate to ECEF?

I want to plot the satellite tracking on a map. So I use SGP4 1.4 with python .Input the TLE data, but the outdata is not what I want. So I want to convert the output data to the ECEF data and get the longitude and latitude. I know the skyfied can…
X.H Cui
  • 311
  • 1
  • 3
  • 15
3
votes
1 answer

python convert au to km

I'm trying to write a very simple programm, that prints the current distance to any planet in kilometers. I'm using Skyfield. Here's my code for Mars: from skyfield.api import earth, mars, now ra, dec, distance =…
Monotom
  • 33
  • 3
1
2 3 4 5