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.
Key words: Astrometry and Celestial Mechanics – planets and satellites: detection – planets and satellites: terrestrial planets
There are currently no refbacks.
It accepts original submissions from all over the world and is internationally published and distributed by IOP