The Astrophysical Journal (Jan 2023)

A Unified Framework for Manipulating N-dimensional Astronomical Data and Coordinate Transformations in Python: The NDCube 2 and Astropy APE-14 World Coordinate System APIs

  • Daniel F. Ryan,
  • Stuart Mumford,
  • Will T. Barnes,
  • Ankit Kumar Baruah,
  • Adwait Bhope,
  • Éric Buchlin,
  • Nabil Freij,
  • Adam Ginsburg,
  • Laura A. Hayes,
  • Derek Homeier,
  • J. Marcus Hughes,
  • Chris Lowder,
  • Richard O’Steen,
  • Baptiste Pellorce,
  • Thomas Robitaille,
  • Yash Sharma,
  • David Stansby,
  • Albert Y. Shih,
  • Erik Tollerud,
  • Micah J. Weberg,
  • Matthew J. West

DOI
https://doi.org/10.3847/1538-4357/ace0bd
Journal volume & issue
Vol. 956, no. 1
p. 44

Abstract

Read online

The NDCube 2 API is a Python application programming interface (API) for storing and manipulating N-dimensional coordinate-aware astronomical data. While there are Python packages for handling astronomical data and coordinate transformations separately and for handling specific combinations of dimensions and transformations, none provide a unified and agnostic way of handling them simultaneously. This leads to a proliferation of different APIs for conducting the same analysis tasks on similar types of observations and introduces technical barriers between multi-instrument studies and cross-community collaboration. In this paper, we outline how the NDCube 2 API and its implementation in the open-source, community-developed ndcube package, together with the AstroPy WCS API, help to solve this problem. We discuss the guiding principles underpinning the API design and provide examples of how it is already being used to serve broad sections of the astronomy community, including agency-funded missions. The aim of this paper is to help users better understand the purpose and potential of the NDCube 2 API and ndcube package and hence how to more effectively deploy them in scientific analyses and software development.

Keywords