astropy

Perform astronomy-specific data handling with Astropy for coordinates, units, FITS, and cosmology.

4|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/shushuzn/Rairos --skill astropy-shushuzn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: astropy
Source: https://github.com/shushuzn/Rairos/tree/main/skills/astropy
Command: npx skills add https://github.com/shushuzn/Rairos --skill astropy-shushuzn

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Astropy helps you correctly handle astronomy-specific calculations and file formats so you can avoid unit mistakes, coordinate conversion errors, and brittle data parsing.

Core Features & Use Cases

  • Coordinate transformations and matching: Convert between celestial reference frames (e.g., ICRS to Galactic), compute separations, and cross-match catalogs.
  • Unit-aware physics calculations: Represent physical quantities with units, convert reliably (e.g., parsecs to kilometers), and apply domain-specific equivalencies (spectral, Doppler, parallax).
  • FITS and table workflows: Read and write FITS images and tables, manipulate headers, and join/filter datasets for analysis.
  • Cosmology and precise time: Compute cosmological distances, ages, and times using standard cosmological models, while converting between time scales and formats.
  • WCS for imaging: Transform between pixel and world coordinates using WCS metadata from FITS headers.

Quick Start

Use the astropy skill to convert right ascension/declination coordinates from ICRS to Galactic for a given sky position and return the transformed angles in degrees.

Frequently Asked Questions about astropy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I convert ICRS coordinates to Galactic coordinates for a sky position?

Convert ICRS coordinates to Galactic coordinates by applying astropy.coordinates SkyCoord frame transforms, returning the transformed right ascension and declination angles in degrees for your sky position.

What's the best way to cross-match astronomical catalogs without coordinate errors?

Cross-match astronomical catalogs by using astropy.coordinates SkyCoord to compute separations and match datasets, ensuring precise coordinate-frame transformations without manual conversion errors.

How do I transform pixel coordinates to world coordinates using FITS header WCS metadata?

Transform pixel coordinates to world coordinates by extracting WCS metadata from FITS headers and applying astropy WCS pixel/world conversion for accurate astronomical imaging alignment.

Can I compute cosmological distances and ages using standard cosmology models?

Compute cosmological distances and ages by applying astropy.cosmology standard models to redshift-based calculations, yielding accurate physical distance and universe age results.

How do I handle unit-safe physical calculations and apply spectral equivalencies?

Handle unit-safe physical calculations by representing quantities with astropy units, converting reliably between formats, and applying domain-specific equivalencies like spectral, Doppler, and parallax.

Why does parsing FITS files and manipulating headers manually cause brittle data workflows?

Parsing FITS files manually causes brittle workflows because astropy.io.fits provides reliable FITS image and table I/O, robust header manipulation, and dataset joining to prevent parsing failures.