astropy

Unify astronomical data analysis with Python APIs for coordinates, units, FITS, cosmology, time, and WCS.

4|1|Updated Jun 18, 2025
One-click install
npx skills add https://github.com/HolobiomicsLab/Toolomics --skill astropy-holobiomicslab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: astropy
Source: https://github.com/HolobiomicsLab/Toolomics/tree/main/mcp_host/skills/scientific-skills/scientific-skills/astropy
Command: npx skills add https://github.com/HolobiomicsLab/Toolomics --skill astropy-holobiomicslab

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Astropy provides a comprehensive, standard toolkit for astronomical data analysis, unifying units, coordinates, FITS I/O, cosmology, time handling, and WCS into a single, consistent interface.

Core Features & Use Cases

  • Units and quantities management with astropy.units
  • Celestial coordinates and transformations via astropy.coordinates
  • FITS file handling with astropy.io.fits
  • Table operations with astropy.table
  • Cosmology and distance calculations with astropy.cosmology
  • Time handling with astropy.time
  • World Coordinate System transformations with astropy.wcs

Quick Start

Run a minimal script that converts a SkyCoord from ICRS to Galactic, reads a FITS file, and computes a luminosity distance using Planck18 for z=1.

Frequently Asked Questions about astropy

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

FAQPage Schema
How do I convert celestial coordinates from ICRS to Galactic in Python?

You can convert celestial coordinates from ICRS to Galactic using astropy.coordinates. It provides SkyCoord objects that enable seamless transformations between different astronomical coordinate systems with built-in unit handling.

What is the best way to read and handle FITS files for astronomy data analysis?

The best way to handle FITS files is using astropy.io.fits. It provides a unified Python interface for reading, writing, and manipulating FITS file data, integrating seamlessly with other astronomical data analysis tasks like coordinate transformations and table operations.

How do I compute luminosity distance using Planck18 cosmology parameters?

You compute luminosity distance using astropy.cosmology with Planck18 parameters. It allows you to calculate distances at specific redshifts, such as z=1, by providing built-in cosmological models and distance calculation functions for your astronomical research pipelines.

Does astropy support World Coordinate System transformations for astronomical images?

Yes, astropy supports World Coordinate System transformations through astropy.wcs. It enables you to transform pixel coordinates to sky coordinates and vice versa, integrating with FITS file handling and celestial coordinate systems for comprehensive image analysis workflows.

Can I manage astronomical time formats and units in a single Python toolkit?

Yes, you can manage astronomical time formats using astropy.time and physical units with astropy.units. This unified toolkit provides consistent array support and unit handling across time computations, coordinate transformations, and cosmology calculations within cohesive analysis pipelines.

What Python toolkit unifies astronomical catalogs, images, and simulations workflows?

Astropy unifies astronomical catalogs, images, and simulations workflows into a single Python toolkit. It provides module-level APIs for coordinate transformations, FITS file I/O, cosmology calculations, and WCS transformations, enabling researchers to build cohesive multi-module data analysis pipelines.