astropy-astronomy
Core Python library for astronomy/astrophysics: units with dimensional analysis, celestial coordinate transforms (ICRS/Galactic/AltAz/FK5), FITS I/O, tables (FITS/HDF5/VOTable/CSV), cosmology (Planck18, distance/age), precise time (UTC/TAI/TT/TDB, Julian, barycentric), WCS pixel-world mapping, model fitting. For general tables use pandas/polars; for radio interferometry use CASA.
npx skills add BioTender-max/awesome-bio-agent-skills --skill astropy-astronomy --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Guides an agent to perform common astronomy data tasks using Astropy: handle units and quantities, transform between coordinate frames (ICRS, Galactic, FK5, AltAz), read/write FITS files, manipulate tables (including QTable with units), perform cosmological calculations (Planck18, FlatLambdaCDM), work with precise time scales (UTC, TAI, TT, TDB) and formats (JD, MJD), and use WCS for pixel-world mappings. It also covers basic 3D coordinates, time arithmetic, cross-matching catalogs, and simple image analysis workflows. For general tabular data, it recommends pandas or polars; for radio interferometry, CASA. The code examples show creating quantities, transforming coordinates, reading FITS, and simple table operations.
How it works
- Use units and quantities via
astropy.unitsto create and convert physical quantities with automatic unit tracking. - Use
astropy.coordinatesto create coordinates in various frames (e.g., ICRS, Galactic) and transform between frames, including AltAz with a givenobstimeandlocation. - Read, write, and manipulate FITS files with
astropy.io.fits, including headers, data arrays, and multi-extension files; support memory-mapped access withmemmap. - Handle tables with
astropy.tableandQTablefor unit-aware data; perform filters, sorts, joins, and aggregation, and write in FITS or ECSV formats. - Perform cosmological calculations with
Planck18andFlatLambdaCDM, querying luminosity distance, angular diameter distance, comoving distance, age, lookback time, and more. - Work with time scales and formats using
astropy.time.Time, including conversions between UTC, TAI, TT, TDB, JD, MJD, and ISO; execute time arithmetic and array operations. - Use WCS utilities to convert between pixel and world coordinates, read WCS from FITS headers, and apply transformations.
- Follow recommended workflows for coordinate conversion, FITS image analysis, and catalog cross-matching; the skill includes examples for catalog matching and simple source detection.
When to use it
- When converting celestial coordinates between frames (ICRS, Galactic, FK5, AltAz).
- When working with quantities with units or applying domain-specific unit conversions.
- When reading or writing FITS files (images or tables) and manipulating headers.
- When performing cosmology calculations or estimating cosmological distances.
- When handling precise time scales and time formats for astronomy data.
- When cross-matching catalogs or performing basic image analysis with WCS.
- When working with general tabular data (use pandas/polars) or radio interferometry data (use CASA).
What it can touch
astropy.unitsfor unit-aware calculations.astropy.coordinatesfor coordinate frames and transformations.astropy.timefor time scales and arithmetic.astropy.cosmologyfor distance and age calculations.astropy.io.fitsfor FITS I/O and headers.astropy.tablefor table operations, includingQTablewith units.astropy.wcsfor WCS handling and coordinate mapping.- Code samples reference standard Python libraries (e.g., NumPy, Matplotlib) as needed.
Caveats
- For general tabular data use pandas or polars; for radio interferometry use CASA.
- License is BSD-3-Clause; no additional risk statements are provided beyond that.
- The skill emphasizes explicit, concrete tasks with code examples; it does not guarantee specific outcomes.
# Astropy — Astronomy & Astrophysics Toolkit ## Overview Astropy is the core Python package for astronomy, providing essential functionality for astronomical research: unit-aware calculations, celestial coordinate transformations, FITS file I/O, cosmological calculations, precise time handling, tabular data operations, and WCS image coordinate mapping. ## When to Use - Converting between celestial coordinate systems (ICRS, Galactic, FK5, AltAz) - Working with physical quantities and units (Jy→mJy, parsec→km, spectral equivalencies) - Reading, writing, or manipulating FITS files (images and tables) - Cosmological calculations (luminosity distance, lookback time, comoving volume) - Precise time handling with multiple scales (UTC, TAI, TT, TDB) and formats (JD, MJD, ISO) - Cross-matching astronomical catalogs by sky position - WCS transformations between pixel and world coordinates - For **general tabular data**: use pandas or polars instead - For **radio interferometry**: use CASA instead ## Prerequisites ```bash pip install astropy # Core package pip install astropy[all] # With optional dependencies (regions, photutils, etc.) pip install pytz # For timezone conversions ``` ## Quick
- Overview
- When to Use
- Prerequisites
- Quick Start
- Core API
- 1. Units & Quantities (astropy.units)
- 2. Coordinate Systems (astropy.coordinates)
- 3. FITS File Handling (astropy.io.fits)
- 4. Table Operations (astropy.table)
- 5. Time Handling (astropy.time)
- 6. Cosmological Calculations (astropy.cosmology)
- 7. WCS & Image Processing
- Key Concepts
- Unit Equivalency System
pip install astropy # Core package pip install astropy[all] # With optional dependencies (regions, photutils, etc.) pip install pytz # For timezone conversions
What does the astropy-astronomy skill do?
Core Python library for astronomy/astrophysics: units with dimensional analysis, celestial coordinate transforms (ICRS/Galactic/AltAz/FK5), FITS I/O, tables (FITS/HDF5/VOTable/CSV), cosmology (Planck18, distance/age), precise time (UTC/TAI/TT/TDB, Julian, barycentric), WCS pixel-world mapping, model fitting. For general tables use pandas/polars; for radio interferometry use CASA.
How do I install it?
Run `npx skills add BioTender-max/awesome-bio-agent-skills --skill astropy-astronomy --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From BioTender-max/awesome-bio-agent-skills, a repository with 135 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
