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.1.tar.gz (11.2 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.1-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.1-cp312-cp312-macosx_15_0_universal2.whl (433.6 kB view details)

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

astroz-0.6.1-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.1-cp311-cp311-macosx_15_0_universal2.whl (433.4 kB view details)

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

astroz-0.6.1-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.1.tar.gz.

File metadata

  • Download URL: astroz-0.6.1.tar.gz
  • Upload date:
  • Size: 11.2 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.1.tar.gz
Algorithm Hash digest
SHA256 24f3dd8adbb6beb49dab90032a5c9fdcfb7dfa13ffa6790fb9f6d374a3c7e340
MD5 a257a12c1ea6a5e3628c8843ce225b42
BLAKE2b-256 d4ae14a9eae5bc05b8004e3b3a3bf98b0ba11f46665a00c0b554601323785d99

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for astroz-0.6.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 4404120efd6cd6da66975dbd3ff45ada4de2a7172773ec69f807ac657d8b4b5b
MD5 93585ef10a9516fe8016073b7ae37f00
BLAKE2b-256 c23e5c938a6aa5368e7b6671c116ebf285f0a0ffb5a9b7a935e2880b69354634

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for astroz-0.6.1-cp312-cp312-macosx_15_0_universal2.whl
Algorithm Hash digest
SHA256 707c9b38ed365a63f34b6d3f927b21bf7ed115d8829b38fa3afdb949e55c85d0
MD5 e1df930f6faeff374c47545b2788e41b
BLAKE2b-256 7caad7ce8f5755fdcef2d82277a61002dac417d45a880db4211f29f62682d63a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for astroz-0.6.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 15bf2671f27ed933bc177b841702109b1cec7ea70b3618f3fd5b04c21ae361bf
MD5 ba8f71ac5b46296d1ed00e8e66757d27
BLAKE2b-256 3972c788a9e2ba6e0b26707793e7e7a9b0ed6f412216fa2ff0ec7d908e8ce8a6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for astroz-0.6.1-cp311-cp311-macosx_15_0_universal2.whl
Algorithm Hash digest
SHA256 4639b26b3fa36159d26f3576ae7eace27d3678d5ac6a4c141bb3b91d93277866
MD5 f74deb1ae63eec34d108dca2b9d3d079
BLAKE2b-256 ff7ef61552f5881f5b1f12a978ec583612ff794a5fa05382e28996a15a4ca8e5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for astroz-0.6.1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1e305503dfb795a26a36583541b57c758a126d9c0fb9655b33de179a90c6c6a9
MD5 38ca44c8d7c171d6d507e47eb43c465e
BLAKE2b-256 4b5f2faebabfde71e37c6256bdaa135d7b2253e557e6c7b5d49ce72d9f72ce37

See more details on using hashes here.

Provenance

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