SOFA

(SOFA) is the International Astronomical Union's Standards of Fundamental Astronomy initiative, the task of which is to maintain a set of algorithms and procedures that implement standard models used in fundamental astronomy. It provides a software collection in the form of a library of subprograms that applications can call to address their fundamental-astronomy needs. The library exists in both Fortran 77 and ANSI C versions.

At present there are 192 "astronomy" functions; 59 of these are canonical, realizing (and indeed in some cases defining) IAU standards; there are also 55 utility functions that deal with vectors, matrices, and angles, making a total of 247 functions. These are all building blocks rather than fully-fledged applications, and a typical application will call many of them in order to achieve the desired result. There is no "context" for the application to set up, and calls to SOFA functions can be mingled with calls to other libraries without any side effects.

In the TPOINT context, although SOFA does not include telescope control or pointing analysis tools per se, it does provide a wealth of low-level components for such applications, covering for example the prediction of the apparent directions of celestial sources, computations involving timescales, and basic vector/matrix operations. A high degree of computational efficiency is available, and all of SOFA's C functions are reentrant and thread safe.


Four example SOFA-based applications

Four TPOINT-relevant applications that use SOFA functions are presented here. They are not merely demonstrations: each is offered as a useful tool in its own right, with SOFA in merely a supporting role: versions based on other fundamental astronomy and vector/matrix/angle libraries would be of equal practical value.

Their value to a potential SOFA user is as illustrations of how the library can be brought to bear on real-world problems. It must of course be stressed that they are not themselves part of the SOFA software collection, nor in any way endorsed by SOFA; support is available directly from the original author (P.T.Wallace) only.

All four applications are written in ANSI C, and each comprises (i) a comprehensive user guide in the form of a PDF and (ii) a Zip archive containing all the required (non-SOFA) source code and other files. Apart from SOFA and the C runtime library they are completely self-contained. In each case the individual files contained in the Zip archive are listed in the final section of the PDF.

The four applications are:

  • COCO, a celestial coordinate conversion utility.
  • EPH, some solar-system ephemeris tools.
  • SOL, functions for a solar telescope control system.
  • SPK, a simple pointing kernel.

    All of the software and documentation is free and BSD-licensed.


    Patrick Wallace, 31-Aug-2025