Convert JPL SPK ephemeris to numpy array
Project description
Author: Behrouz Safari
License: MIT
numeph
Convert JPL SPK ephemeris to numpy array
Installation
Install the latest version of numeph from PyPI:
pip install numeph
Requirements are numpy and jplephem
Save some segments from 'de440s.bsp' from 2020 to 2030:
from datetime import datetime
from numeph import save_segments
t1 = datetime(2020, 1, 1)
t2 = datetime(2030, 1, 1)
save_segments(in_file='de440s.bsp',
out_file='de440s_2020_2030.pickle',
t1=t1,
t2=t2,
segs_tup=[(0,10), (0,3), (3,399), (3,301)])
get position of an object from a segment:
from datetime import datetime
from numeph import get_pos
t = datetime.utcnow()
pos = get_pos(file='de440s_2020_2030.pickle',
seg_tup=(0,3), # Earth Barycenter wrt SSB
t=t)
get geocentric position of an object:
from datetime import datetime
from numeph import geocentric
t = datetime.utcnow()
pos = geocentric(target='moon', file='de440s_2020_2030.pickle', t=t)
See more at astrodatascience.net
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
numeph-0.1.0.tar.gz
(5.0 kB
view details)
Built Distribution
File details
Details for the file numeph-0.1.0.tar.gz
.
File metadata
- Download URL: numeph-0.1.0.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/29.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.61.2 importlib-metadata/4.6.1 keyring/18.0.1 rfc3986/1.5.0 colorama/0.4.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2f2387896fcbccb98e2e19f296cd08821571fe5924a725fd0bf2be5307bbff8 |
|
MD5 | cd66b585d1fe214878544798e6e82444 |
|
BLAKE2b-256 | 242258a39a095164af74c98e8e10f81d14a55cb2aa658507be8cc44758fda289 |
File details
Details for the file numeph-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: numeph-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/29.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.61.2 importlib-metadata/4.6.1 keyring/18.0.1 rfc3986/1.5.0 colorama/0.4.3 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f878d4104da22c4c6453ff7474e8edb3d0b76acdb40529a628a55aef8b15e87 |
|
MD5 | b766ec425be27a4fc101e1868feea7d3 |
|
BLAKE2b-256 | c76e3ebb8040806576cb9b2e50e378565f47fb156d14fb6877562afe50e0c40f |