PyMsOfa: A Python Package for the Standards of Fundamental Astronomy (SOFA) Service
Abstract
The Standards of Fundamental Astronomy (SOFA) is a service provided by the International Astronomical Union that offers algorithms and software for astronomical calculations, which was released in two versions for FORTRAN 77 and ANSI C, respectively. In this work, we implement the Python package PyMsOfa for SOFA service by three ways: (1) a Python wrapper package based on a foreign function library for Python (ctypes), (2) a Python wrapper package with the foreign function interface for Python calling C code (cffi) and (3) a Python package directly written in pure Python codes from SOFA subroutines. The package PyMsOfa has fully implemented 247 functions of the original SOFA routines released on 2023 October 11. In addition, PyMsOfa is also extensively examined, which is exactly consistent with those test examples given by the original SOFA. This Python package can be suitable to not only the astrometric detection of habitable planets from the Closeby Habitable Exoplanet Survey mission, but also for the frontier themes of black holes and dark matter related to astrometric calculations and other fields. The source codes are available via http://pypi.org/project/PyMsOfa/ and https://github.com/CHES2023/PyMsOfa.
- Publication:
-
Research in Astronomy and Astrophysics
- Pub Date:
- December 2023
- DOI:
- arXiv:
- arXiv:2310.08673
- Bibcode:
- 2023RAA....23l5015J
- Keywords:
-
- Astrometry and Celestial Mechanics;
- planets and satellites: detection;
- planets and satellites: terrestrial planets;
- Astrophysics - Instrumentation and Methods for Astrophysics;
- Astrophysics - Earth and Planetary Astrophysics;
- Astrophysics - Astrophysics of Galaxies;
- Astrophysics - Solar and Stellar Astrophysics
- E-Print:
- 7 pages, 5 figures, accepted to Research in Astronomy and Astrophysics