astropy

Automate astronomical data processing with Astropy for FITS I/O and coordinate transforms.

43|13|Updated Oct 10, 2025
One-click install
npx skills add https://github.com/lifangda/claude-plugins --skill astropy-lifangda
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: astropy
Source: https://github.com/lifangda/claude-plugins/tree/main/cli-tool/skills-library/scientific-computing/materials-science/astropy
Command: npx skills add https://github.com/lifangda/claude-plugins --skill astropy-lifangda

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires astropy, numpy, and includes scripts (resource) and references (resource) components.

What problem does it solve?

The Astropy skill bundles core astronomy utilities for handling FITS I/O, celestial coordinates, units, time, and cosmology to enable robust astronomical data analysis.

Core Features & Use Cases

  • FITS I/O: Working with FITS files and tables
  • Coordinate transforms: SkyCoord and frame conversions
  • Units & constants: Managing units and physical constants
  • Time systems: Handling diverse time representations in astronomy

Quick Start

Prompt Claude to read a FITS file or transform a coordinate between frames.

Frequently Asked Questions about astropy

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

FAQPage Schema
How do I read and write FITS files in Python?

FITS I/O with Astropy lets you open, parse, and modify FITS files and their headers using the `fits` module. Load data with `fits.open()`, access table or image data, update headers, and write changes back to disk efficiently.

How do I transform astronomical coordinates between different reference frames?

Coordinate transformations use Astropy's `SkyCoord` object to convert positions between frames like ICRS, Galactic, and AltAz. Specify input coordinates and frame, then transform to your target frame with a single method call.

Can I handle physical units and constants in astronomical calculations?

Astropy's units module attaches physical dimensions to numbers and performs unit-aware arithmetic automatically. Access physical constants via the constants module for calculations without manual conversion.

How do I work with different time representations in astronomy?

The Time class unifies diverse time formats—ISO, JD, MJD, Unix—into a single object, handles timezone conversions, and performs time arithmetic for scheduling observations and calculating exposure timing.

What's the best way to perform cosmology calculations like redshift to distance?

Astropy's cosmology module provides standard models to convert redshift to luminosity distance, compute age of the universe at a given z, and calculate comoving distances without implementing formulas manually.