Skip to main content

Asteria 🌌

PyPI version Python Versions CI Status License: MIT Documentation Status

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.

Asteria segmentation example
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 Background
    • 1: Source Interior / Core
    • 2: 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 (.asdf Level 2 calibrated exposures and Level 3 mosaics via roman_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.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asteria-roman 0.1.2
File Size Uploaded Provenance Actions
asteria_roman-0.1.2.tar.gz 10.1 MB With provenance Details for asteria_roman-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for asteria-roman 0.1.2
File Interpreter ABI Platform Actions
asteria_roman-0.1.2-py3-none-any.whl Python 3 none any Details for asteria_roman-0.1.2-py3-none-any.whl

Total release size: 10.1 MB

Release files / asteria_roman-0.1.2.tar.gz

Download URL asteria_roman-0.1.2.tar.gz
Size 10.1 MB
Tags Source
SHA-256 checksum
How to use checksums
c27f02501683fc56927ba61d31e4ddde9eadef31a16486f45857ba37291edc65
BLAKE2b-256 checksum
How to use checksums
c77e008e787a0492fb31948c027926abaa28865d354129c6f568d325f4b7fe8a
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 log

Release files / asteria_roman-0.1.2-py3-none-any.whl

Download URL asteria_roman-0.1.2-py3-none-any.whl
Size 80.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
daff7ab156052bd13b9bb78e44a62a18cd0498629f439b726e0f2a2de489814b
BLAKE2b-256 checksum
How to use checksums
2dadcb0bf0914f2b78e6dd2cd3d09a1847272cb614b0b861824c6b529d6f198d
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 log

Security for asteria-roman 0.1.2

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.

Select from 2 files

Attestation for asteria_roman-0.1.2.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 log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page