Python bindings for astroz - high-performance astrodynamics library
Project description
astroz Python Bindings
High-performance SGP4 satellite orbit propagation for Python, powered by Zig with SIMD acceleration.
Quick Start
from astroz import Tle, Sgp4
import numpy as np
# Parse TLE
tle = Tle("""1 25544U 98067A 24127.82853009 .00015698 00000+0 27310-3 0 9995
2 25544 51.6393 160.4574 0003580 140.6673 205.7250 15.50957674452123""")
# Single propagation
sgp4 = Sgp4(tle)
pos, vel = sgp4.propagate(30.0) # 30 minutes after TLE epoch
# Batch propagation (fastest)
times = np.arange(0, 1440, 1.0, dtype=np.float64) # 1 day, 1-min intervals
positions = np.empty((len(times), 3), dtype=np.float64)
velocities = np.empty((len(times), 3), dtype=np.float64)
sgp4.propagate_into(times, positions, velocities)
Performance
1.3-2.9x faster than python-sgp4:
| Scenario | astroz | python-sgp4 | Speedup |
|---|---|---|---|
| 2 weeks (second intervals) | 160 ms | 464 ms | 2.9x |
| 1 month (minute intervals) | 5.9 ms | 16.1 ms | 2.7x |
API
Tle
tle = Tle(tle_string)
tle.satellite_number # NORAD catalog number
tle.epoch # Epoch (J2000 seconds)
tle.inclination # Degrees
tle.eccentricity
tle.mean_motion # Rev/day
Sgp4
sgp4 = Sgp4(tle, gravity_model=WGS84) # WGS84 (default) or WGS72
# Single point
pos, vel = sgp4.propagate(tsince) # tsince in minutes
# Returns ((x,y,z), (vx,vy,vz)) in km and km/s (TEME frame)
# Batch (fastest) - writes directly to pre-allocated arrays
sgp4.propagate_into(times, positions, velocities)
Building
Requires Zig and Python 3.10+.
zig build python-bindings \
-Dpython-include=$(python -c "import sysconfig; print(sysconfig.get_path('include'))") \
-Dpython-lib=python3.12 \
-Dpython-lib-path=$(python -c "import sysconfig; print(sysconfig.get_config_var('LIBDIR'))") \
-Doptimize=ReleaseFast
cp zig-out/bindings/python/astroz/lib_astroz.so bindings/python/astroz/_astroz.so
pip install -e bindings/python
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file astroz-0.4.2.tar.gz.
File metadata
- Download URL: astroz-0.4.2.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0559d721c75c060e5019eed40bf6c9e6af84ae68daba7e26a06c8bb303ef08dc
|
|
| MD5 |
c1dbb96f1b0573a03d935cb83389cfd0
|
|
| BLAKE2b-256 |
4cc0e12acf5621e8add9b31a824aa7c7a1076e137299e910deb2f8622419e0b3
|
Provenance
The following attestation bundles were made for astroz-0.4.2.tar.gz:
Publisher:
python.yaml on ATTron/astroz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
astroz-0.4.2.tar.gz -
Subject digest:
0559d721c75c060e5019eed40bf6c9e6af84ae68daba7e26a06c8bb303ef08dc - Sigstore transparency entry: 834362919
- Sigstore integration time:
-
Permalink:
ATTron/astroz@64c3fdacca091ad1189d8f014c9ed8cfa509cca8 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/ATTron
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python.yaml@64c3fdacca091ad1189d8f014c9ed8cfa509cca8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file astroz-0.4.2-cp312-cp312-manylinux_2_38_x86_64.whl.
File metadata
- Download URL: astroz-0.4.2-cp312-cp312-manylinux_2_38_x86_64.whl
- Upload date:
- Size: 295.6 kB
- Tags: CPython 3.12, manylinux: glibc 2.38+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8dd505558cac6ef9344b25e9df7f8dcd6c8ce9ff3a3d8698436c84dc0723168f
|
|
| MD5 |
cd55ca20f7f9492d750fb05af43bee7b
|
|
| BLAKE2b-256 |
2fd39a516b381b6c9a2eb78bf81d94baa3b8fdb0c5a0f02237ec7c08e3739cfe
|
Provenance
The following attestation bundles were made for astroz-0.4.2-cp312-cp312-manylinux_2_38_x86_64.whl:
Publisher:
python.yaml on ATTron/astroz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
astroz-0.4.2-cp312-cp312-manylinux_2_38_x86_64.whl -
Subject digest:
8dd505558cac6ef9344b25e9df7f8dcd6c8ce9ff3a3d8698436c84dc0723168f - Sigstore transparency entry: 834362924
- Sigstore integration time:
-
Permalink:
ATTron/astroz@64c3fdacca091ad1189d8f014c9ed8cfa509cca8 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/ATTron
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python.yaml@64c3fdacca091ad1189d8f014c9ed8cfa509cca8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file astroz-0.4.2-cp312-cp312-macosx_15_0_universal2.whl.
File metadata
- Download URL: astroz-0.4.2-cp312-cp312-macosx_15_0_universal2.whl
- Upload date:
- Size: 117.4 kB
- Tags: CPython 3.12, macOS 15.0+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37835b2307136e2e4a9588e159a65cd839bc008f99f3ab9abaceecd56ac7f951
|
|
| MD5 |
a5de0ee7ce04b0d9a7e477d384321360
|
|
| BLAKE2b-256 |
8c4d661ca64fc9bd91dade6c4efe9e3509d39b2e8461a680a98d864b63f59b6a
|
Provenance
The following attestation bundles were made for astroz-0.4.2-cp312-cp312-macosx_15_0_universal2.whl:
Publisher:
python.yaml on ATTron/astroz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
astroz-0.4.2-cp312-cp312-macosx_15_0_universal2.whl -
Subject digest:
37835b2307136e2e4a9588e159a65cd839bc008f99f3ab9abaceecd56ac7f951 - Sigstore transparency entry: 834362935
- Sigstore integration time:
-
Permalink:
ATTron/astroz@64c3fdacca091ad1189d8f014c9ed8cfa509cca8 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/ATTron
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python.yaml@64c3fdacca091ad1189d8f014c9ed8cfa509cca8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file astroz-0.4.2-cp311-cp311-manylinux_2_38_x86_64.whl.
File metadata
- Download URL: astroz-0.4.2-cp311-cp311-manylinux_2_38_x86_64.whl
- Upload date:
- Size: 293.8 kB
- Tags: CPython 3.11, manylinux: glibc 2.38+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2820babf402838f689bee22d753f6c4fb66bf0df8a1b5762ed136846e4a4baa
|
|
| MD5 |
4dfbce08bd9fda226760ba6e2054f066
|
|
| BLAKE2b-256 |
722250d3566e3242344df65025602c9e5a04fb36bae6e75ea13d25148c557d0d
|
Provenance
The following attestation bundles were made for astroz-0.4.2-cp311-cp311-manylinux_2_38_x86_64.whl:
Publisher:
python.yaml on ATTron/astroz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
astroz-0.4.2-cp311-cp311-manylinux_2_38_x86_64.whl -
Subject digest:
c2820babf402838f689bee22d753f6c4fb66bf0df8a1b5762ed136846e4a4baa - Sigstore transparency entry: 834362923
- Sigstore integration time:
-
Permalink:
ATTron/astroz@64c3fdacca091ad1189d8f014c9ed8cfa509cca8 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/ATTron
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python.yaml@64c3fdacca091ad1189d8f014c9ed8cfa509cca8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file astroz-0.4.2-cp311-cp311-macosx_15_0_universal2.whl.
File metadata
- Download URL: astroz-0.4.2-cp311-cp311-macosx_15_0_universal2.whl
- Upload date:
- Size: 117.5 kB
- Tags: CPython 3.11, macOS 15.0+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9ffd50773f29a5eccd648f75df8d407667367127b0daf35f80eef1afff67a00
|
|
| MD5 |
57023041eb4fc16d98dcb2127fa029e9
|
|
| BLAKE2b-256 |
c756b390c5fab84deffd283927d2d75cafb5482f5d18588180f45f01586aefa5
|
Provenance
The following attestation bundles were made for astroz-0.4.2-cp311-cp311-macosx_15_0_universal2.whl:
Publisher:
python.yaml on ATTron/astroz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
astroz-0.4.2-cp311-cp311-macosx_15_0_universal2.whl -
Subject digest:
c9ffd50773f29a5eccd648f75df8d407667367127b0daf35f80eef1afff67a00 - Sigstore transparency entry: 834362928
- Sigstore integration time:
-
Permalink:
ATTron/astroz@64c3fdacca091ad1189d8f014c9ed8cfa509cca8 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/ATTron
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python.yaml@64c3fdacca091ad1189d8f014c9ed8cfa509cca8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file astroz-0.4.2-cp310-cp310-manylinux_2_38_x86_64.whl.
File metadata
- Download URL: astroz-0.4.2-cp310-cp310-manylinux_2_38_x86_64.whl
- Upload date:
- Size: 295.2 kB
- Tags: CPython 3.10, manylinux: glibc 2.38+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4345b7e2b1659143f1bc44c9d2a12e480a7a9b8803bdd732be6cc5e965ecbd7
|
|
| MD5 |
151981f6a856cc13d3fca635b44daf4f
|
|
| BLAKE2b-256 |
88852578f09703132d0605d3654a4102c9e68bb9092544ecc7a2a2b935556f8f
|
Provenance
The following attestation bundles were made for astroz-0.4.2-cp310-cp310-manylinux_2_38_x86_64.whl:
Publisher:
python.yaml on ATTron/astroz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
astroz-0.4.2-cp310-cp310-manylinux_2_38_x86_64.whl -
Subject digest:
a4345b7e2b1659143f1bc44c9d2a12e480a7a9b8803bdd732be6cc5e965ecbd7 - Sigstore transparency entry: 834362933
- Sigstore integration time:
-
Permalink:
ATTron/astroz@64c3fdacca091ad1189d8f014c9ed8cfa509cca8 -
Branch / Tag:
refs/tags/v0.4.2 - Owner: https://github.com/ATTron
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python.yaml@64c3fdacca091ad1189d8f014c9ed8cfa509cca8 -
Trigger Event:
push
-
Statement type: