Skip to main content

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 of 'de440s.bsp' from 2020 to 2030:

from datetime import datetime
from numeph import SPK

t1 = datetime(2020, 1, 1)
t2 = datetime(2030, 1, 1)

spk = SPK(fname='de440s.bsp', t1=t1, t2=t2,
          segs_tup=[(0,10), (0,3), (3,399), (3,301)])

# save as txt file
spk.to_txt('de440s_2020_2030.txt')

# save as pickle
spk.to_pickle('de440s_2020_2030.pickle')

Load .txt or .pickle files:

You can load the above saved files using load_txt and load_pickle functions. The will return a dictionary of Segment objects.

from numeph import load_txt

dc = load_txt('de440s_2020_2030.txt')

To access each segment, pass the (center, target) tuple as dictionary key.

seg = dc[(3,301)]

get position of an object from a segment:

t = datetime.utcnow()
pos = seg.get_pos(t)

See more at astrodatascience.net

Metadata

Release files for numeph 0.3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for numeph 0.3.4
File Size Uploaded Provenance
numeph-0.3.4.tar.gz 5.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for numeph 0.3.4
File Interpreter ABI Platform
numeph-0.3.4-py3-none-any.whl Python 3 none any Details

Total release size: 12.5 kB

Release files / numeph-0.3.4.tar.gz

Download URL numeph-0.3.4.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b79b1b19af9c4a5f57e08d39d300177be6d2400b744a2f157fe06d79c0fac991
BLAKE2b-256 checksum
How to use checksums
7309ddb102f599f715f42a3d9e80e26de1244cdb2e725d6fb488e34382aee1b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.7.8

Release files / numeph-0.3.4-py3-none-any.whl

Download URL numeph-0.3.4-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f82e486ece7bb7cc5c5faee99af1e58b18b07fdfea1c76772ad0014d6edf3051
BLAKE2b-256 checksum
How to use checksums
e1c72b43d4dd8c3a73593879394c8a0ffe6ed69a8152d6e94debd0f12245e528
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.7.8

Security for numeph 0.3.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page