Astronomical image analysis library
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file astroimg-0.1.0.tar.gz.
File metadata
- Download URL: astroimg-0.1.0.tar.gz
- Upload date:
- Size: 18.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89b7e4790288dbcd90c35f7c42299dc4632f2265a5185b6b67fe2f5de4ebfdf7
|
|
| MD5 |
fa27acf90fd1476823ca1ffc366d11f7
|
|
| BLAKE2b-256 |
31ec7660236e966bfa3d45eb0248ba60cedc4f1a347cc192d062c34ce6a025a5
|
File details
Details for the file astroimg-0.1.0-py3-none-any.whl.
File metadata
- Download URL: astroimg-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
377f3ddf18e675256397a9d41db18af789f546a48d3fad5a23ce6380f034d68b
|
|
| MD5 |
a11919597112ee9d83bf1542cf8fdf8b
|
|
| BLAKE2b-256 |
5f6e121da109e8a83986598844079fd9ffea8e1733c1d680661bba8d627c29e0
|