Papers
Topics
Authors
Recent
Search
2000 character limit reached

Astropy: A Community Python Package for Astronomy

Published 23 Jul 2013 in astro-ph.IM | (1307.6212v1)

Abstract: We present the first public version (v0.2) of the open-source and community-developed Python package, Astropy. This package provides core astronomy-related functionality to the community, including support for domain-specific file formats such as Flexible Image Transport System (FITS) files, Virtual Observatory (VO) tables, and common ASCII table formats, unit and physical quantity conversions, physical constants specific to astronomy, celestial coordinate and time transformations, world coordinate system (WCS) support, generalized containers for representing gridded as well as tabular data, and a framework for cosmological transformations and conversions. Significant functionality is under active development, such as a model fitting framework, VO client and server tools, and aperture and point spread function (PSF) photometry tools. The core development team is actively making additions and enhancements to the current code base, and we encourage anyone interested to participate in the development of future Astropy versions.

Citations (8,157)

Summary

  • The paper introduces Astropy's core contribution as a unified, community-driven framework for astronomical computing.
  • It details the implementation of sub-packages for units, time, coordinates, and cosmological calculations using robust methodologies.
  • Key implications include streamlined data handling and reproducible research through integrated, standardized tools.

Astropy: A Community Python Package for Astronomy

Introduction

The paper "Astropy: A Community Python Package for Astronomy" describes the initial public release (v0.2) of Astropy, a collaborative open-source Python package designed for the astronomy community. This initiative seeks to provide core functionality frequently required in astronomical research, such as handling astronomical data formats, unit conversion, coordinate transformations, and cosmological computations. The paper highlights the issues faced by fragmented package development and positions Astropy as a unifying framework intended to streamline and standardize tools for astronomical computation.

Core Capabilities

Astropy encompasses several sub-packages, each addressing distinct needs within astronomical computation.

Units, Quantities, and Physical Constants

The astropy.units sub-package provides robust support for attaching and manipulating physical units in calculations, allowing conversions and operations with units systematically. It introduces "equivalencies" to relate disparate physical quantities underpinned by equations, such as frequency and wavelength conversions. Figure 1

Figure 1: Quantity conversion using the astropy.units sub-package.

The astropy.constants sub-package, in accessory to astropy.units, offers a suite of physical constants pertinent to astronomical calculations, harmonizing constant values with their respective uncertainties and units. Figure 2

Figure 2: Using the astropy.constants sub-package.

Time Representation and Transformation

Astropy's time sub-package focuses on the manipulation of astronomical timescales and representations, leveraging the SOFA library to ensure precise and accurate conversions. Figure 3

Figure 3: Time representation and conversion using the astropy.time sub-package.

Celestial Coordinates and Transformations

astropy.coordinates provides a cohesive API for managing celestial coordinates and transformations. It combines functionality from several existing packages, offering comprehensive support for operations like transforming between celestial and other coordinate systems and integrating distance measures. Figure 4

Figure 4: Celestial coordinate representation and conversion.

Data Handling and File Support

Astropy packages such as astropy.table are designed to efficiently manipulate tabular data, offering integrated support for units and metadata. Specialized input/output support is available for astronomical data formats, notably FITS and VOTable. Figure 5

Figure 5: Table input/output and manipulation using the astropy.table sub-package.

Figure 6

Figure 6: Accessing data in FITS format.

Cosmological Calculations

The astropy.cosmology sub-package delivers tools for cosmological computations, supporting widely-used cosmological models and parameters, extending to various dark energy models. Figure 7

Figure 7: Cosmology utilities.

Development and Collaboration

Astropy's development model is centered on community involvement facilitated through open-source platforms such as GitHub. This structure supports coordinated contributions that adhere to best practices in software development, including rigorous testing and consistent use of APIs.

Future Directions

Upcoming developments focus on extending interoperability, enhancing current functionalities, and introducing new modules such as image analysis tools and generalized WCS transformations. There are plans to incorporate advanced functionalities such as Virtual Observatory tools and expanded spectroscopic analysis capabilities.

Conclusion

Astropy represents a comprehensive effort to address the fragmentation in astronomy-specific Python tools by providing a robust, consistent, and extensible package to support the needs of the astronomical community. The continued development and adoption of Astropy are pivotal to creating a standardized suite of tools that facilitate reproducibility and efficiency in astronomical research. As an ongoing project, Astropy encourages community engagement in refining and expanding its capabilities.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.