eopy
Earth orbits in Python: a compact, fast propagation designed around NumPy arrays and function calls so computationally heavy pieces can later move to low level implementations without changing the public shape of the code.
eopy is licensed under the GNU General Public License version 3. The DTM2000 and isotropic
radiation-pressure implementations contain modified portions adapted from Apache-2.0-licensed
Orekit; the applicable upstream license and attribution notices are included in eopy/assets/.
AI usage disclaimer
GPT-5.6-sol was used to produce an initial translation of most of the tests and data-reading methods, which were then used as a basis for translating the code from Java to Python. It was also used to check for discrepencies in implementation and to implement much of the boilerplate needed, such as file downloading and visualization.
What is implemented
- DOP853/Dormand-Prince 8(5,3) propagation through SciPy
solve_ivp. - Batch Cartesian propagation for states shaped
(N, 6). - Central Earth gravity plus analytic J2.
- Fully normalized spherical-harmonic gravity through a native analytical-gradient kernel.
- DTM2000 density and MSIS 2.1 density through
pymsis. - Drag acceleration with co-rotating atmosphere and ballistic coefficient input.
- Isotropic solar radiation pressure with cylindrical Earth shadowing.
- Point-mass third-body perturbations with fixed or callable position providers, including a lazy Astropy-backed ephemeris helper.
- Basic propagation events through SciPy-compatible callables.
- On-demand data download and parsing helpers for external gravity, EOP and space-weather inputs.
- A C++ library for the most used functions loaded with
ctypes, intended for the computationally heavy gravity parts.
Large data files are not bundled with the package. Use EOPY_DATA_PATH to choose a
cache directory, or let eopy use the platform cache directory. The eopy.data module can download
CelesTrak space-weather/EOP CSVs and arbitrary ICGEM-compatible gravity model files, and can parse
.gfc gravity coefficients into contiguous NumPy arrays.
Native C++ library is built as a shared library with a plain C ABI and loaded from Python with
ctypes. It falls back to Python when the library has not been built. Developers can point the
loader at an out-of-tree build with EOPY_NATIVE_LIBRARY=/path/to/libeopykernels.so.
For source-tree development, build the native library into the package directory with:
cmake -S . -B build/native -DCMAKE_BUILD_TYPE=Release
cmake --build build/native --config Release
The native API is loaded through ctypes.
Precision propagation
High-degree gravity models are defined in ITRS, while propagated Cartesian states are normally GCRS. Build an Earth-orientation provider and pass it with the gravity field so tesseral harmonics and atmospheric drag are evaluated in the correct rotating frame. Time-variable ICGEM 2.0 models also require an evaluation epoch:
from datetime import datetime, timezone
from eopy.data import read_icgem_gfc
from eopy.frames import interpolated_earth_orientation
from eopy.gravity import GravityField
epoch = datetime(2024, 7, 4, tzinfo=timezone.utc)
model = read_icgem_gfc(
"EIGEN-6S4_v2.gfc", max_degree=120, max_order=120, epoch=epoch
)
orientation = interpolated_earth_orientation(epoch, 0.0, 86400.0)
field = GravityField.from_model(model, degree=120, order=120, backend="native")
propagate(..., sample_times=epochs) evaluates a single continuous DOP853 solution at requested
offsets. Historical MSIS inputs can be loaded with CelestrakSpaceWeather.from_csv("SW-All.csv").
The default atmosphere is the lightweight configurable exponential model. DTM2000 propagation must
be selected explicitly and supplied with both an EarthOrientation and an inertial sun_position
provider; this ensures its longitude, season, and local-solar-time terms are evaluated in the
correct Earth-fixed frame. CelesTrak space-weather files provide both the Ap history used by MSIS
and the Kp history used by DTM2000.
Example
import numpy as np
from eopy.constants import EARTH_MU
from eopy.gravity import GravityField
from eopy.integrators import Dop853Options
from eopy.propagator import propagate
r = 7000e3
v = np.sqrt(EARTH_MU / r)
states = np.array([
[r, 0.0, 0.0, 0.0, v, 0.0],
[r + 1000.0, 0.0, 0.0, 0.0, np.sqrt(EARTH_MU / (r + 1000.0)), 0.0],
])
t, propagated, stats = propagate(
states,
0.0,
3600.0,
gravity=GravityField(degree=2),
options=Dop853Options(rtol=1e-10, atol=1e-3, max_step=60.0),
)
More runnable examples are in examples/ and are covered by pytest so they
stay working across updates.
To print a slowest-first breakdown of propagation and force-model costs:
python examples/propagation_profile.py
For native gravity and external data workflows:
python examples/download_data_files.py /tmp/eopy-data \
--no-space-weather \
--no-eop
python examples/native_gravity_model.py \
--gravity-model /tmp/eopy-data/EIGEN-6S4_v2.gfc \
--native-library /path/to/libeopykernels.so \
--degree 4 \
--order 4
Both examples default to the ICGEM EIGEN-6S4 v2 .gfc URL when no gravity URL
or local gravity model path is supplied.
Installation and development
Use Python 3.11 or newer. Linux x86_64 is the initial binary distribution target.
Install the eopy-orbits distribution and use import eopy in Python.
python -m pip install eopy-orbits
# From a checkout, with a C++17 compiler and CMake available:
pip install '.[develop]'
pytest --ignore=tests/precision_orbit
propagate accepts a single (6,) state or an (N, 6) batch, in metres and metres/second. Times
are seconds relative to the epoch supplied to frame, ephemeris, and atmosphere providers. Use
timezone-aware UTC epochs. Force providers must share those axes and epoch. History is (T, 6) or
(T, N, 6); without history, the final state has the input shape. Built-in events apply to one
spacecraft; custom events receive the batch and return a scalar.
sample_times requests output along the integration direction, including for backward propagation.
A terminal event can leave an empty requested history; its state and time remain in the statistics.
Zero-duration integration returns the initial state without evaluating forces or events. For sampled
integrations, accepted/rejected internal step counts are unavailable; use function_evals.
Use backend="native" for high-degree gravity to require compiled kernels; "auto" prefers
"native" but falls back to Python and "python" uses Python. The Python harmonic implementation
is intended for low-degree validation.
Run python examples/atmosphere_models.py for MSIS/DTM2000 density and examples/relativity.py
relativity examples. See The public interface reference describes force inputs,
callbacks, configuration, and return values.
Remeber
Interpolated providers reject requests outside their coverage. Atmosphere altitude clipping, default activity, and the exponential approximation should be considered when interpreting results.
Metadata
Release files for eopy-orbits 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| eopy_orbits-1.0.1.tar.gz | 76.5 kB | Without provenance | Details for eopy_orbits-1.0.1.tar.gz |
Built distributions (wheels)
Total release size: 319.2 kB
Release files / eopy_orbits-1.0.1.tar.gz
| Download URL | eopy_orbits-1.0.1.tar.gz |
|---|---|
| Size | 76.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
504f67879c0ac00abdcfdfc948fa8798e9e4953f540706e8eca15eb67fb620d1
|
|
BLAKE2b-256 checksum How to use checksums |
f4d8e9860b6c5c5428131006e23e04ce7babac05ee0e49fe7b50423ebb787199
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Release files / eopy_orbits-1.0.1-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | eopy_orbits-1.0.1-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 60.7 kB |
| Tags | CPython 3.14 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
ac8e335e71ae23f201a43ca5b23a055b980f9b427039b53b647cbf4209305110
|
|
BLAKE2b-256 checksum How to use checksums |
c489aa6c7c777b188418d04a6719b107da923282c457526822f22f3702cee96a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Release files / eopy_orbits-1.0.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | eopy_orbits-1.0.1-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 60.7 kB |
| Tags | CPython 3.13 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
1d86f5436316196bc4fc1406bd7c7aae380cc76b8fe724782c73537748b4ac61
|
|
BLAKE2b-256 checksum How to use checksums |
b7772f7a79f26e230ac1311aa1759970c6a0061b2dcdac6644fb799b29f1a18d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Release files / eopy_orbits-1.0.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | eopy_orbits-1.0.1-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 60.7 kB |
| Tags | CPython 3.12 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
ba24df218af31954665d5e50eb1abe62f11dd1961ba246dc3355aa36eb85f8c0
|
|
BLAKE2b-256 checksum How to use checksums |
e5d4023f1af51c0f7bb0605326967000b90aa4772d4dc38215b305c98e6acdca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Release files / eopy_orbits-1.0.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | eopy_orbits-1.0.1-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 60.7 kB |
| Tags | CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
6b4e1ad88b9d408fbb8dd435558509c4b9c6ceadeee3441e7177a581ea96379f
|
|
BLAKE2b-256 checksum How to use checksums |
a016723a173fd0263f501746fa53a546d4616674c1becfe0a91ff04cb17b0e5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Security for eopy-orbits 1.0.1
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.