← Research Software
Astrophysics
AstroPy v6.x
Astronomy Python Library
Astropy is the core community Python package for astronomy. It provides the fundamental building blocks that nearly every Python-based astronomy project depends on: coordinate transformations, FITS file handling, time systems, unit-aware quantities, cosmological distance calculations, and more. Many telescope pipelines and survey tools build directly on Astropy.
$
pip install astropyAstroPy is distributed as a Python package. Install via pip, then use in any Python script or Jupyter notebook.
Key Features
SkyCoord
Unified interface for any sky coordinate system with automatic frame transformations and proper motion support.
FITS I/O
Full read/write support for FITS files, headers, binary tables, and multi-extension FITS (MEF).
Cosmology
Built-in ΛCDM, wCDM, and other cosmological models with Planck, WMAP, and custom parameter sets.
Units & Quantities
Attach physical units to any numerical value; arithmetic propagates units automatically and catches errors.
WCS
World Coordinate System transformations mapping pixel coordinates to sky positions from FITS headers.
Table
Flexible astropy Table class with FITS, ASCII, HDF5, and VOTable I/O for catalog data.
What It's Used For
- Converting between celestial coordinate systems (ICRS, Galactic, AltAz, etc.)
- Reading and writing FITS files from telescope archives
- Computing luminosity distances and angular sizes from redshift
- Working with physical quantities and unit conversions
- Time-tagging observations in UTC, TDB, GPS, and other time scales