skyfield

Convert a direction (vector) to R.A. and Dec in Skyfield

烂漫一生 提交于 2019-12-23 02:38:58
问题 Within Skyfield, if I have a vector (x, y, z) from the center of the earth, how can I back-convert it to a point on the "Celestial Sphere" (i.e. Right Ascension and Declination)? For example purposes, suppose I have a few points in the orbit of a telescope around the earth, and I want to calculate the exact RA and Dec of the direction normal to the orbit - for whatever reason. Effects like aberration and gravitation can be neglected here - I'm just looking to transform a direction in ICRF to

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

末鹿安然 提交于 2019-12-21 05:21:19
问题 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 time) is only about one microsecond per point. I see similar speeds using Jplephem and with two different ephemerides. My question here is: if I want to random-access points in time, for example as a slave to an external Runge-Kutta routine which

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

走远了吗. 提交于 2019-12-14 04:27:26
问题 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 method within the package, so I've "invented" a way by calculating the dot product between the two apparent position vectors. Is this the best way to do it currently? Is it essentially correct, within Skyfield's scope? def separation(seconds, lat,

Longitude of lunar nodes using Skyfield

邮差的信 提交于 2019-12-12 04:57:32
问题 I am trying to find out the longitude of ascending/descending moon nodes using Skyfield but unable to find any reference in documentation. Is it possible? Also do any of the JPL Files provide this data already? 回答1: It is easy to at least find them relative to the J2000 ecliptic — which might be fine for dates far from the year 2000 as well, since I think that only the definition of ecliptic longitude changes with the passing years, but not latitude (which is what the nodes care about)? In

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

谁都会走 提交于 2019-12-07 17:08:59
问题 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 a package that IDLE's Python uses, but when I type that in my terminal it tries to apply it to my anaconda version. Is there a way I can find my IDLE's python, point to it, then apply the pip command to it? Here's what I have: $ which python /Users

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

落花浮王杯 提交于 2019-12-03 16:42:05
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 time) is only about one microsecond per point. I see similar speeds using Jplephem and with two different ephemerides. My question here is: if I want to random-access points in time, for example as a slave to an external Runge-Kutta routine which uses its own variable stepsize, is there a way I can do this faster within python (without having to

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

无人久伴 提交于 2019-12-01 22:31:52
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 the default method returns the wrong answer without warning the starting point as the answer - and is there a way I can protect against "wrong answer without warning" avoid this behavior in this case? Note, the function separation uses the python package Skyfield to generate the values to be minimized which is not guaranteed smooth, which may be

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

旧巷老猫 提交于 2019-12-01 21:39:26
问题 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 the default method returns the wrong answer without warning the starting point as the answer - and is there a way I can protect against "wrong answer without warning" avoid this behavior in this case? Note, the function separation uses the python

How to add JulianDate objects or offsets in Skyfield

一笑奈何 提交于 2019-12-01 13:07:05
The JulianDate object in Skyfield is a handy way to quickly produce and hold a set of time values in Julian Days, and pass them to Skyfield's at() method to calculate astronomical positions in various coordinates. (see an example script ) However, I can't seem to find an add or offset method so that I can add a time offset or an iterable of offsets to a JulianDate object. I always seem to struggle with dates and times. Here is a very simple, abstracted example. I generate jd60 which is offset from an arbitrary jd0 by 60 days. As a simple check I calculate the position of the earth at the two

How to add JulianDate objects or offsets in Skyfield

让人想犯罪 __ 提交于 2019-12-01 12:30:55
问题 The JulianDate object in Skyfield is a handy way to quickly produce and hold a set of time values in Julian Days, and pass them to Skyfield's at() method to calculate astronomical positions in various coordinates. (see an example script) However, I can't seem to find an add or offset method so that I can add a time offset or an iterable of offsets to a JulianDate object. I always seem to struggle with dates and times. Here is a very simple, abstracted example. I generate jd60 which is offset