astropy

Perform astronomical data analysis and manipulation using Python with astropy.

Updated Dec 17, 2025
One-click install
npx skills add https://github.com/robotlearning123/claude-scientific-skills --skill astropy-robotlearning123
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: astropy
Source: https://github.com/robotlearning123/claude-scientific-skills/tree/main/scientific-skills/astropy
Command: npx skills add https://github.com/robotlearning123/claude-scientific-skills --skill astropy-robotlearning123

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill empowers users to analyze and process astronomical data, facilitating complex scientific workflows in astronomy and astrophysics.

Core Features & Use Cases

  • Coordinate Transformations: Convert between celestial coordinate systems (ICRS, Galactic, FK5, AltAz, etc.).
  • Physical Units and Quantities: Handle physical quantities with units and perform unit conversions.
  • FITS File Manipulation: Read, write, and manipulate FITS files for astronomical data storage and transmission.
  • Cosmological Calculations: Perform cosmological calculations using standard cosmological models.
  • Table Operations: Work with tabular data, including reading, writing, sorting, filtering, and joining tables.
  • Time Handling: Precise time representation and conversion between time scales and formats.
  • World Coordinate System: Transform between pixel coordinates in images and world coordinates.
  • Use Case: Imagine you are analyzing data from an astronomical observation. Use this Skill to convert celestial coordinates, perform cosmological distance calculations, and manipulate FITS files containing image data.

Quick Start

Use the astropy skill to convert coordinates from ICRS to Galactic frame for the object with RA=10.5 deg and Dec=41.2 deg.

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 the Galactic frame using Python?

To convert celestial coordinates from ICRS to the Galactic frame, you can use Python's astropy package to transform right ascension and declination values directly into the target coordinate system. It natively supports transformations between ICRS, Galactic, FK5, and AltAz frames.

What is the best way to read and manipulate FITS files for astronomical data storage?

The best way to read and manipulate FITS files is using the astropy package, which provides built-in operations for reading, writing, and handling astronomical image and tabular data stored in the FITS format.

Can I perform cosmological distance calculations with Python for standard cosmological models?

Yes, you can perform cosmological distance calculations using Python's astropy package, which supports standard cosmological models to compute distances and other cosmological parameters accurately.

Does astropy support physical unit conversions and handling quantities with units?

Astropy supports physical unit conversions by allowing you to attach units to numerical quantities, perform mathematical operations, and convert between different physical units seamlessly.

How do I transform pixel coordinates in astronomical images to world coordinates?

To transform pixel coordinates in astronomical images to world coordinates, use the World Coordinate System functionality provided by the astropy package to map image pixels to celestial sky coordinates.

What should I use for precise time representation and conversion between time scales in astronomy?

For precise time representation and conversion between time scales and formats in astronomy, use the time handling capabilities of the astropy package to manage exact temporal data.