API reference¶
These pages are generated automatically on each documentation build from
the installed astra package (sphinx-apidoc). Narrative guides:
Interactive API Discovery (v3.6.2+)¶
Added in version 3.6.2.
Use astra.help(topic) for in-terminal API discovery:
>>> import astra
>>> astra.help() # Quick reference
>>> astra.help("propagation") # Propagation functions
>>> astra.help("conjunction") # Conjunction analysis
>>> astra.help("visibility") # Pass prediction
>>> astra.help("data") # Fetch TLE/OMM
>>> astra.help("frames") # Coordinate transforms
>>> astra.help("maneuver") # Delta-V planning
>>> astra.help("config") # Runtime configuration
>>> astra.help("errors") # Exception hierarchy
>>> astra.help("env") # Environment variables
The help() function prints formatted reference cards to stdout,
including function signatures, return types, and environment variable
names — useful when working in a REPL or notebook.
Quick API map¶
The table below groups the most important top-level names by use-case so you can find the right function without scrolling through the full auto-generated index.
Data ingestion¶
Function |
Returns |
Notes |
|---|---|---|
|
|
Full active catalog, no auth |
|
|
e.g. |
|
|
Recommended for new code |
|
|
OMM with mass, RCS metadata |
|
|
Multi-source merged catalog |
|
|
Requires |
|
|
Authenticated Space-Track fetch |
|
|
SATCAT metadata records |
|
|
Spacebook Extended-Precision TLEs |
|
|
Standard Spacebook TLE catalog |
|
|
Raw STK ephemeris text (Spacebook) |
|
|
Per-object Spacebook metadata |
|
|
Force-refresh Spacebook NORAD-to-GUID cache |
|
|
COMSPOC live space weather |
|
|
COMSPOC live Earth Orientation Parameters |
Parsing¶
Function |
Returns |
Notes |
|---|---|---|
|
|
Single TLE from two lines |
|
|
Bulk TLE text parser |
|
|
Checksum + range check |
|
|
CCSDS JSON string |
|
|
Single OMM dict |
|
|
From disk |
|
|
Required-field check |
|
|
Convert |
|
|
STK |
|
|
CCSDS CDM XML (defusedxml) |
|
|
CCSDS OCM (auto XML/KVN) |
|
|
CCSDS OCM XML |
|
|
CCSDS OCM KVN |
|
|
Export to CCSDS OCM XML |
Filtering & catalog¶
Function / Class |
Signature |
Notes |
|---|---|---|
|
|
Wraps TLE or OMM |
|
|
LEO / MEO / GEO band filter |
|
|
Geographic region filter; latitude-only bounds are valid |
|
|
Epoch freshness filter |
|
|
Chained via |
|
|
LEO/MEO/GEO/type counts |
Orbit propagation¶
Function |
Returns |
Notes |
|---|---|---|
|
|
Single satellite, SGP4 |
|
|
Vectorized SGP4 positions and velocities |
|
generator of |
Memory-efficient streaming |
|
|
Single-satellite trajectory arrays |
|
|
lat/lon/alt at each step |
|
|
High-fidelity numerical integrator |
Conjunction analysis¶
Function |
Returns |
Notes |
|---|---|---|
|
|
Full 3-phase screening pipeline |
|
|
Single pair TCA refinement |
|
|
Per-timestep Euclidean distance |
|
|
Analytical Foster / Chan P_c |
|
|
Monte Carlo P_c (6D sampling) |
|
|
Heuristic diagonal RTN (relaxed mode only) |
|
|
STM-based covariance propagation |
|
|
RTN → ECI rotation |
|
|
Fetch + parse Spacebook |
Maneuvers¶
Function / Class |
Signature / Returns |
Notes |
|---|---|---|
|
|
Single-burn parameter check |
|
|
Overlap + ordering check |
|
|
VNB frame rotation matrix |
|
|
RTN frame rotation matrix |
|
|
Direction → inertial |
|
|
Thrust vector in ECI km/s² |
|
dataclass |
|
|
dataclass |
|
Visibility¶
Function |
Returns |
Notes |
|---|---|---|
|
|
AOS / TCA / LOS per pass |
|
|
Visible objects at a single epoch |
Utilities & configuration¶
Function / Symbol |
Signature / Returns |
Notes |
|---|---|---|
|
|
Interactive API discovery (v3.6.2+) |
|
|
Pre-compile Numba JIT kernels |
|
|
Thread-safe strict / relaxed toggle |
|
|
Direct mode flag |
|
varies |
UTC ↔ JD ↔ ISO conversions |
|
|
WGS-84 great-circle distance |
|
|
Keplerian period |
|
|
Classical elements from TLE line 2, Cartesian vectors, or state object |
|
class |
cKDTree wrapper for catalog screening |
|
|
Geocentric Sun (GCRS, km) from DE421 |
|
|
Geocentric Moon (GCRS, km) from DE421 |
|
|
Geocentric Sun (TEME, km) from DE421 |
|
|
Geocentric Moon (TEME, km) from DE421 |
|
|
NRLMSISE-00 density model |
|
|
TEME → ECEF (with EOP) |
|
|
ECEF → WGS-84 Geodetic |
|
|
Batch Spacebook EOP fetch |
|
|
Non-blocking IERS load |
|
|
Julian Date → UTC datetime |
|
|
UTC datetime → Julian Date |
|
|
Physical and simulation constants |
Key data types¶
Type |
Description |
|---|---|
|
Legacy TLE satellite record (NORAD, epoch, orbital elements) |
|
Modern CCSDS OMM record — adds mass, RCS, ballistic coefficient |
|
|
|
Enriched catalog entry with altitude, period, radius, source |
|
Cowell output: position, velocity, optional mass and 6×6 covariance |
|
Drag + SRP parameters for |
|
State Noise Compensation (process noise PSD) for covariance propagation |
|
Finite burn definition: thrust, Isp, timing, direction frame |
|
Screening result with TCA, miss distance, P_c, risk level, covariance source |
|
Parsed CCSDS CDM XML |
|
Ground station: |
|
Ground pass: |
|
SGP4 output: position, velocity, altitude, frame |
|
|
|
|
Error types¶
All errors inherit from AstraError.
Exception |
Raised when |
|---|---|
|
TLE checksum mismatch or out-of-range field |
|
SGP4 error code; NaN trajectory in strict mode |
|
DE421 unavailable in strict mode |
|
Space weather data missing in strict mode |
|
Frame transformation failure |
|
Invalid burn sequence or parameter |
|
Catalog filter configuration error |
|
Spacebook network / HTTP failure; disabled module |
|
NORAD ID not found in Spacebook SATCAT |
—