Skip to main content

Astroimg

A Python library for astronomical image analysis. Download FITS images from sky surveys, detect sources, measure their brightness, and cross-match with the Gaia DR3 catalog.

Installation

pip install astroimg

Or install from source:

git clone https://github.com/Fr-C-S-08/Astroimg-Library.git
cd Astroimg-Library
pip install -e .

Quick Start

from astroimg import download_best, detect_sources, aperture_photometry, crossmatch_gaia

# Download a FITS image
data, header, wcs = download_best(ra=29.23, dec=37.79, radius=0.12)

# Detect sources
sources = detect_sources(data, wcs, kernel="log", threshold=5.0)

# Measure brightness
phot = aperture_photometry(data, sources)

# Cross-match with Gaia DR3
result = crossmatch_gaia(phot)

Pipeline

download_best() → detect_sources() → aperture_photometry() → crossmatch_gaia()
     ↓                  ↓                     ↓                      ↓
 FITS image       source catalog        flux & magnitudes     Gaia match + temp

Modules

Module Description
download Download FITS images from DSS/SkyView
kernels Gaussian, LoG, and matched filter convolution
detection Source detection with local maxima and consensus
photometry Aperture photometry with sky subtraction
crossmatch Cross-match with Gaia DR3 catalog
visualization Highlight stars and plot sources

Features

Download astronomical images

from astroimg import download_best
data, header, wcs = download_best(ra=250.42, dec=36.46, radius=0.15)

Detect and count sources

from astroimg import detect_sources, count_sources
sources = detect_sources(data, wcs, kernel="log", threshold=5.0)
print(f"Found {count_sources(sources)} sources")

Aperture photometry

from astroimg import aperture_photometry
phot = aperture_photometry(data, sources)
print(phot[["x_pixel", "y_pixel", "flux", "mag"]].head())

Cross-match with Gaia

from astroimg import crossmatch_gaia, crossmatch_stats
result = crossmatch_gaia(phot)
crossmatch_stats(result)

Highlight specific stars

from astroimg import highlight_star
highlight_star(data, wcs, name="HD 196885", sources=sources)

Docker

docker compose up

Tests

pip install -e ".[dev]"
pytest tests/ -v

Requirements

  • Python >= 3.9
  • numpy, scipy, matplotlib, astropy, astroquery, pandas

License

MIT

Metadata

Release files for astroimg 0.1.0

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

Source distribution (sdist)

Source distribution for astroimg 0.1.0
File Size Uploaded Provenance
astroimg-0.1.0.tar.gz 18.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for astroimg 0.1.0
File Interpreter ABI Platform
astroimg-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 36.6 kB

Release files / astroimg-0.1.0.tar.gz

Download URL astroimg-0.1.0.tar.gz
Size 18.3 kB
Tags Source
SHA-256 checksum
How to use checksums
89b7e4790288dbcd90c35f7c42299dc4632f2265a5185b6b67fe2f5de4ebfdf7
BLAKE2b-256 checksum
How to use checksums
31ec7660236e966bfa3d45eb0248ba60cedc4f1a347cc192d062c34ce6a025a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / astroimg-0.1.0-py3-none-any.whl

Download URL astroimg-0.1.0-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
377f3ddf18e675256397a9d41db18af789f546a48d3fad5a23ce6380f034d68b
BLAKE2b-256 checksum
How to use checksums
5f6e121da109e8a83986598844079fd9ffea8e1733c1d680661bba8d627c29e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Security for astroimg 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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