Skip to main content

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.

Supported platforms: macOS and Linux Requires: Python 3.10+

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 (convenience method)
times = np.arange(0, 1440, 1.0, dtype=np.float64)  # 1 day, 1-min intervals
positions, velocities = sgp4.propagate_batch(times)

# Or use propagate_into for zero-copy into pre-allocated arrays
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 (convenience) - returns allocated arrays
positions, velocities = sgp4.propagate_batch(times)

# Batch (zero-copy) - writes directly to pre-allocated arrays
sgp4.propagate_into(times, positions, velocities)

Building

Requires Zig and Python 3.12+.

cd bindings/python
pip install -e .

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

astroz-0.4.3.tar.gz (4.8 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

astroz-0.4.3-cp312-cp312-manylinux_2_38_x86_64.whl (294.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.38+ x86-64

astroz-0.4.3-cp312-cp312-macosx_15_0_universal2.whl (117.9 kB view details)

Uploaded CPython 3.12macOS 15.0+ universal2 (ARM64, x86-64)

astroz-0.4.3-cp311-cp311-manylinux_2_38_x86_64.whl (292.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.38+ x86-64

astroz-0.4.3-cp311-cp311-macosx_15_0_universal2.whl (118.0 kB view details)

Uploaded CPython 3.11macOS 15.0+ universal2 (ARM64, x86-64)

astroz-0.4.3-cp310-cp310-manylinux_2_38_x86_64.whl (293.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.38+ x86-64

File details

Details for the file astroz-0.4.3.tar.gz.

File metadata

  • Download URL: astroz-0.4.3.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for astroz-0.4.3.tar.gz
Algorithm Hash digest
SHA256 6c546710ab59eb80c5706c81ad173614c2026e6b200d50114ce9cc18f5f3bc3f
MD5 c46bbe6c62e922297db6b4619f09bdac
BLAKE2b-256 f78a732541dd81a08bc54957bd438e5265308b9625d0148befaad3c99a8107de

See more details on using hashes here.

Provenance

The following attestation bundles were made for astroz-0.4.3.tar.gz:

Publisher: python.yaml on ATTron/astroz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file astroz-0.4.3-cp312-cp312-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for astroz-0.4.3-cp312-cp312-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 771d52e34dfeaf448a5eec119ce35ae851a520690fd7d7af6b825fb03fe16f5f
MD5 7720f530d066e72d600857213584abb3
BLAKE2b-256 8500cf174abeb838a42178749bec389fc95b01ee501027afd9535b3bb8bf53db

See more details on using hashes here.

Provenance

The following attestation bundles were made for astroz-0.4.3-cp312-cp312-manylinux_2_38_x86_64.whl:

Publisher: python.yaml on ATTron/astroz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file astroz-0.4.3-cp312-cp312-macosx_15_0_universal2.whl.

File metadata

File hashes

Hashes for astroz-0.4.3-cp312-cp312-macosx_15_0_universal2.whl
Algorithm Hash digest
SHA256 5aff2dfdfe4cf4a833db076f1d12325ca4e27423502dd1d1b0a66bdf2d73b422
MD5 84090b71ed63575b6abd01f09a3edf0f
BLAKE2b-256 ab3173b6162228a5ace72ae105c66123a659a17528cbb6069a5fe024bdd0c037

See more details on using hashes here.

Provenance

The following attestation bundles were made for astroz-0.4.3-cp312-cp312-macosx_15_0_universal2.whl:

Publisher: python.yaml on ATTron/astroz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file astroz-0.4.3-cp311-cp311-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for astroz-0.4.3-cp311-cp311-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 1fba5372624ce9f605d0f6cb46db80af080a5e157157eb240a43de9d6ce9f3e1
MD5 7c6b2417852598f632ae8904a7d6eb6e
BLAKE2b-256 f7ab4240fd3e79194bcab7351944d8a36eee8028ca9463f9ec83d89eace63fd1

See more details on using hashes here.

Provenance

The following attestation bundles were made for astroz-0.4.3-cp311-cp311-manylinux_2_38_x86_64.whl:

Publisher: python.yaml on ATTron/astroz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file astroz-0.4.3-cp311-cp311-macosx_15_0_universal2.whl.

File metadata

File hashes

Hashes for astroz-0.4.3-cp311-cp311-macosx_15_0_universal2.whl
Algorithm Hash digest
SHA256 a937169ebbdeb92a159ee73f5287e1504f0ea0bccbe41c8546f578a69553c7b6
MD5 e8e9d4c21dd2e48865c0dcc3ba10f7dc
BLAKE2b-256 3e3cc1ae69e69f67ac15b56638f53efcae9058533136bce4ab5d83a6fe6e7ebe

See more details on using hashes here.

Provenance

The following attestation bundles were made for astroz-0.4.3-cp311-cp311-macosx_15_0_universal2.whl:

Publisher: python.yaml on ATTron/astroz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file astroz-0.4.3-cp310-cp310-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for astroz-0.4.3-cp310-cp310-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 a39cb0e44999e43e47a6d5393b4c5726d230882b0077adbfaf996588aedcf54b
MD5 e63ad7779fda34a7a331cd19d7386a92
BLAKE2b-256 babd8ef3387268286a7c106c8cf18c15e9e904093916e89380d4982b0d8d598d

See more details on using hashes here.

Provenance

The following attestation bundles were made for astroz-0.4.3-cp310-cp310-manylinux_2_38_x86_64.whl:

Publisher: python.yaml on ATTron/astroz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page