Asteria 🌌
Asteria is a lightweight, high-performance deep learning inference engine and instance deblender for stars in astronomical imaging, powered by boundary-aware UNet++ (Nested U-Net).
Designed for the Nancy Grace Roman Space Telescope, Asteria provides promptless, end-to-end star detection in a single neural forward pass.
Example of Asteria star detection on a simulated Roman WFI exposure.
Key Features
- Lightweight & Self-Contained: Pure PyTorch UNet++ architecture without bulky dependencies or heavyweight vision foundation models.
- Hardware Acceleration with Automatic Fallback: Auto-detects and optimizes execution across NVIDIA CUDA (with TF32 and AMP), Apple Silicon MPS (Metal Performance Shaders on macOS), and universal CPU.
- Physical Boundary-Aware Deblending: Trained with 3-class supervision:
0: Sky Background1: Source Interior / Core2: Deblending Boundary / Contact Interface
- Seamless Tiled Dense Inference (
predict_dense): Sliding-window 2D Hann/cosine window blending to process arbitrary image sizes (from local cutouts up to full $4088 \times 4088$ Roman WFI exposures) with bounded memory ($< 350$ MB VRAM). - Photometric LeakySB Stretch: Non-linear surface brightness transformation that preserves stellar point-spread functions (PSFs) while lifting faint, diffuse galactic wings.
- Unified Astronomical I/O: Direct support for 2D astronomical FITS (
.fits,.fits.gz), Roman ASDF (.asdfLevel 2 calibrated exposures and Level 3 mosaics viaroman_datamodels), and raw NumPy arrays. Automatically converts Level 2 exposures to surface brightness units ($\text{MJy/sr}$) using calibrated photometry and enables $\text{ZP}=20.472$.
Installation
From PyPI
pip install asteria-roman
From Source
git clone https://github.com/PabloMSanAla/asteria.git
cd asteria
pip install -e .
Quickstart
1. Python API
import asteria
# 1. Load pre-trained model (auto-downloads weights on first run, auto-selects device)
segmentor = asteria.load_model("latest")
# 2. Run dense 3-class segmentation inference on a FITS or ASDF exposure
pred_mask, probs, stretched = segmentor.predict_dense(
"scene_0001_F106.fits",
tile_size=512,
overlap=64,
)
# 3. Render publication-ready side-by-side 2-panel figure
fig = asteria.plot_two_panel(
stretched=stretched,
pred_mask=pred_mask,
save_path="prediction.png",
)
2. Command-Line Interface (CLI)
Asteria includes the asteria (and asteria-predict) CLI command:
# Basic prediction and display
asteria scene.fits
# Full-field tiled inference with saving and FITS export
asteria scene.fits \
--tile_size 512 \
--overlap 64 \
--output results.png \
--export_fits segmap.fits \
--no_display
Model Architecture & Weights History
| Weight Version | Backbone | Resolution | Training Set | Epochs | Interior IoU | Edge IoU (tol=1px) | Macro IoU | Training cutouts | Hardware |
|---|---|---|---|---|---|---|---|---|---|
v0.1.0 (latest) |
UNet++ (32-512) | $512 \times 512$ | Roman WFI Synthetic | 80 | 0.754 | 0.513 | 0.6335 | 2800 | NASA NAS GH200 |
For comprehensive architectural details and benchmark comparisons, see the Asteria Documentation.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for asteria-roman 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| asteria_roman-0.1.1.tar.gz | 10.1 MB | With provenance | Details for asteria_roman-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| asteria_roman-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for asteria_roman-0.1.1-py3-none-any.whl |
Total release size: 10.1 MB
Release files / asteria_roman-0.1.1.tar.gz
| Download URL | asteria_roman-0.1.1.tar.gz |
|---|---|
| Size | 10.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
94bbef6f5a9a91f24fe342100349f137012946ab9973997d0fdd23f04c114ffa
|
|
BLAKE2b-256 checksum How to use checksums |
a3bff6b9dc62eee9694f5bbc39f672aeff5485ac5484976e41acfa8856dd26d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logRelease files / asteria_roman-0.1.1-py3-none-any.whl
| Download URL | asteria_roman-0.1.1-py3-none-any.whl |
|---|---|
| Size | 81.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
281db9c3d5fe56df5eb120e5aa05d7aea6c53dfa0080523db4d8eb29285e6171
|
|
BLAKE2b-256 checksum How to use checksums |
4aa67257d08a1103f5060ce67edafcd0d301eacd407c8356815b296640d97c2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logSecurity for asteria-roman 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for asteria_roman-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 9, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.