Skip to main content

Python bindings for astroz - high-performance astrodynamics library

Project description

astroz Python Bindings

High-performance SGP4 satellite propagation, powered by Zig with SIMD acceleration (AVX512/AVX2).

Platforms: macOS, Linux | Requires: Python 3.10+

Quick Start

from astroz import propagate
import numpy as np

# Load and propagate - automatically optimized for 300M+ props/sec
positions = propagate("starlink", np.arange(1440))  # 1 day at 1-min intervals
# positions: (1440, num_satellites, 3) in km, ECEF coordinates

Loading Sources

from astroz import propagate, Constellation

# CelesTrak groups
positions = propagate("starlink", times)
positions = propagate("iss", times)
positions = propagate("gps", times)
positions = propagate("all", times)  # ~13k active satellites

# By NORAD ID
positions = propagate(None, times, norad_id=25544)  # ISS
positions = propagate(None, times, norad_id=[25544, 48274])  # Multiple

# Local file or URL
positions = propagate("satellites.tle", times)
positions = propagate("https://example.com/tles.txt", times)

# For repeated propagation, pre-parse to avoid overhead
c = Constellation("starlink")
positions1 = propagate(c, times1)
positions2 = propagate(c, times2)

Groups: all, starlink, oneweb, planet, spire, gps, glonass, galileo, beidou, stations/iss, weather, geo

Propagation

from astroz import propagate, Constellation
from datetime import datetime, timezone
import numpy as np

times = np.arange(1440)  # 1 day at 1-min intervals

# Simple (defaults: now UTC, ECEF output)
positions = propagate("starlink", times)

# With options
positions = propagate(
    "starlink",
    np.arange(14 * 1440),  # 2 weeks
    start_time=datetime(2024, 6, 1, tzinfo=timezone.utc),
    output="geodetic",  # "ecef" (default), "teme", or "geodetic"
)

# With velocities
positions, velocities = propagate("starlink", times, velocities=True)

Conjunction Screening

from astroz import screen
import numpy as np

times = np.arange(1440)

# Single target (fastest - uses fused propagate+screen, no full position array)
min_dists, min_t_indices = screen("starlink", times, threshold=50.0, target=0)
# Returns per-satellite minimum distance to target and time index

# All-vs-all screening
pairs, t_indices = screen("starlink", times, threshold=10.0)
# Returns all conjunction events within threshold

Performance

Constellation (13,478 sats x 1,440 steps) Throughput
1 thread 37.7M props/sec
16 threads 303M props/sec

Benchmarked on AMD Ryzen 7 7840U with AVX512.

Set ASTROZ_THREADS to control thread count (defaults to all cores).

Building

Requires Zig and Python 3.10+.

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.6.0.tar.gz (6.5 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.6.0-cp312-cp312-manylinux_2_34_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

astroz-0.6.0-cp312-cp312-macosx_15_0_universal2.whl (428.7 kB view details)

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

astroz-0.6.0-cp311-cp311-manylinux_2_34_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

astroz-0.6.0-cp311-cp311-macosx_15_0_universal2.whl (428.7 kB view details)

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

astroz-0.6.0-cp310-cp310-manylinux_2_34_x86_64.whl (2.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

File details

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

File metadata

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

File hashes

Hashes for astroz-0.6.0.tar.gz
Algorithm Hash digest
SHA256 68dffe2cd53e3e17d22cd22ba39e34a0f01964d5d27d97adf1c7b381253d562f
MD5 873f5059b8a64b850636c48c514e6f81
BLAKE2b-256 032acfbb0234fabcb6210b3217bb0ba566d54ab0a348bb4f9a5d8c16e9abc35f

See more details on using hashes here.

Provenance

The following attestation bundles were made for astroz-0.6.0.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.6.0-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for astroz-0.6.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 db7157e1b55b8f6115c8b07b0b0f8492cd863f56012406f871d6726acd7e0c21
MD5 17a6d29cc6e9b98850b1bc70344d86be
BLAKE2b-256 46b3200ddc4596ee0671851937e1ce1cbe7c7ca3e6f30805ce36af529433044a

See more details on using hashes here.

Provenance

The following attestation bundles were made for astroz-0.6.0-cp312-cp312-manylinux_2_34_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.6.0-cp312-cp312-macosx_15_0_universal2.whl.

File metadata

File hashes

Hashes for astroz-0.6.0-cp312-cp312-macosx_15_0_universal2.whl
Algorithm Hash digest
SHA256 a0b2634506cb561662fc3271e36cffd4565f6ce736017a29d30989cb41596a20
MD5 d635628faf422d26cd846d3a2b592fd8
BLAKE2b-256 5383ab69fc64a01c57890f19defeb914e9215783a3119f2bb42f04579fc7c0cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for astroz-0.6.0-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.6.0-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for astroz-0.6.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e4d3a152c05e29d5e7d1384d2be023264f974350b4215dd2a8b5a2b82f30b4d0
MD5 fb90437f0d97c1814f72453648299893
BLAKE2b-256 a7a644a400bc99ce2f19711834017fc6b2e144e73e37315f2e73ed79e550176a

See more details on using hashes here.

Provenance

The following attestation bundles were made for astroz-0.6.0-cp311-cp311-manylinux_2_34_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.6.0-cp311-cp311-macosx_15_0_universal2.whl.

File metadata

File hashes

Hashes for astroz-0.6.0-cp311-cp311-macosx_15_0_universal2.whl
Algorithm Hash digest
SHA256 e00eb5a0bb6c5cf898c2e08960a61bcc71db622affb8bd646a0656ebac9f39eb
MD5 8930ac979c8b87e17fa1606df9b5161d
BLAKE2b-256 dd60114fa4bb89835ba7c9276359f7a37619b7fcf4aa8bf97fc4a29d6d49d6bb

See more details on using hashes here.

Provenance

The following attestation bundles were made for astroz-0.6.0-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.6.0-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for astroz-0.6.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 4e7b874081287a6ea85dd7b909ed506b1b3fb4d9396a484976601f4f0f3080bc
MD5 606a9c3eb00c3a9081f5c8a6c6b5e186
BLAKE2b-256 e9ab1231d10f1ecb5d5c3335b38ee9be5dd3d93bcbcc6b33b33da4e9a3ea09b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for astroz-0.6.0-cp310-cp310-manylinux_2_34_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