tetra3rs¶
A fast, robust lost-in-space star plate solver written in Rust with Python bindings.
Given a set of star centroids extracted from a camera image, tetra3rs identifies the stars against a catalog and returns the camera's pointing direction as a quaternion — no prior attitude estimate required.
Alpha Status
The core solver is based on well-vetted algorithms but has only been tested against a limited set of images. The API is not yet stable and may change between releases.
Features¶
- Lost-in-space solving — determines attitude from star patterns with no initial guess
- Fast — geometric hashing of 4-star patterns with breadth-first (brightest-first) search
- Robust — statistical verification via binomial false-positive probability
- Multiscale — supports a range of field-of-view scales in a single database
- Proper motion — propagates Hipparcos catalog positions to any observation epoch
- Zero-copy deserialization — databases serialize with rkyv for instant loading
- Centroid extraction — detect stars from images with local background subtraction, connected-component labeling, and quadratic sub-pixel peak refinement
- Camera model — unified intrinsics struct (focal length, optical center, parity, distortion) used throughout the pipeline
- Distortion calibration — fit SIP polynomial or radial distortion models from one or more solved images
- WCS output — solve results include FITS-standard WCS fields (CD matrix, CRVAL) and pixel↔sky coordinate conversion methods
- Stellar aberration — optional correction for the ~20″ apparent shift caused by the observer's barycentric velocity
Quick Links¶
| Installation | Install from PyPI or build from source |
| Quick Start | Get solving in minutes |
| Concepts | Understand the algorithm and coordinate conventions |
| API Reference | Full Python API documentation |
| Tutorials | Interactive Jupyter notebook examples |
Credits¶
This project is based upon the tetra3 / cedar-solve algorithms:
- cedar-solve — Steven Rosenthal's Python plate solver
- tetra3 — the original Python implementation by Gustav Pettersson at ESA
- Paper: G. Pettersson, "Tetra3: a fast and robust star identification algorithm," ESA GNC Conference, 2023
License¶
MIT License. See LICENSE for details.