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 & Cloud Storage: Direct support for 2D astronomical FITS (.fits, .fits.gz), Roman ASDF (.asdf Level 2 calibrated exposures and Level 3 mosaics via roman_datamodels), raw NumPy arrays, and Amazon Web Services (AWS) S3 URLs (s3://bucket/key... or HTTPS S3 URLs). 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 local file or AWS S3 URL
pred_mask, probs, stretched = segmentor.predict_dense(
    "s3://my-roman-bucket/exposures/r0000101_wfi.asdf",  # or local "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:

# Pre-download official weights for offline/cloud deployment
asteria --download

# Basic prediction and display (local file or S3 URI)
asteria s3://my-roman-bucket/exposures/r0000101_wfi.asdf

# 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.3

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.3
File Size Uploaded Provenance Actions
asteria_roman-0.1.3.tar.gz 10.1 MB With provenance Details for asteria_roman-0.1.3.tar.gz

Built distribution (wheel)

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

Total release size: 10.1 MB

Release files / asteria_roman-0.1.3.tar.gz

Download URL asteria_roman-0.1.3.tar.gz
Size 10.1 MB
Tags Source
SHA-256 checksum
How to use checksums
fbebdb3a9a044e651ef2913e4836f8ea42f9b6c43f05b0334dbc6b9db08f3c24
BLAKE2b-256 checksum
How to use checksums
5f902590929cdc0d5c21456ff11e32375243c72c58b960c6754aa893458293fa
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.3-py3-none-any.whl

Download URL asteria_roman-0.1.3-py3-none-any.whl
Size 82.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
84be40ee94911f422e6e3e91b0c20fc52350f94eebddefff80a636dc0056def6
BLAKE2b-256 checksum
How to use checksums
845424188f14864b27956a9bcb8f795182f879b298cd6309009ef62a8ee6c42d
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.3

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