|
| 1 | +This is the source code repository for ERFA (Essential Routines for |
| 2 | +Fundamental Astronomy). ERFA is a C library containing key algorithms for |
| 3 | +astronomy, and is based on the `SOFA library <http://www.iausofa.org/>`_ published by the International |
| 4 | +Astronomical Union (IAU). |
| 5 | + |
| 6 | +ERFA is intended to replicate the functionality of SOFA (aside from possible |
| 7 | +bugfixes in ERFA that have not yet been included in SOFA), but is licensed |
| 8 | +under a three-clause BSD license to enable its compatibility with a wide |
| 9 | +range of open source licenses. Permission for this release has been |
| 10 | +obtained from the SOFA board, and is avilable in the ``LICENSE`` file included |
| 11 | +in this source distribution. |
| 12 | + |
| 13 | +Differences from SOFA |
| 14 | +--------------------- |
| 15 | + |
| 16 | +This version of ERFA (v1.2.0) is based on SOFA version "20150209_a", with the |
| 17 | +differences outlined below. |
| 18 | + |
| 19 | +ERFA branding |
| 20 | +^^^^^^^^^^^^^ |
| 21 | + |
| 22 | +All references to "SOFA" in the source code have been changed to ERFA, and |
| 23 | +functions have the prefix ``era`` instead of ``iau``. |
| 24 | + |
| 25 | +C macro prefixes |
| 26 | +^^^^^^^^^^^^^^^^ |
| 27 | + |
| 28 | +All C macros used in ERFA are the same as their SOFA equivalents, but with an |
| 29 | +``ERFA_`` prefix to prevent namespace collisions. |
| 30 | + |
| 31 | +Bugfixes |
| 32 | +^^^^^^^^ |
| 33 | + |
| 34 | +ERFA includes smaller changes that may or may not eventually make it into SOFA, |
| 35 | +addressing localized bugs or similar smaller issues: |
| 36 | + |
| 37 | +* Typos have been corrected in the documentation of atco13 and atio13 (see https://github.com/liberfa/erfa/issues/29). |
| 38 | + |
| 39 | +Note: Issues identified in ERFA should always be reported upstream to SOFA |
| 40 | + |
| 41 | + |
| 42 | +Building and installing ERFA |
| 43 | +---------------------------- |
| 44 | + |
| 45 | +To build and install a released version of ERFA in your OS's standard |
| 46 | +location, simply do:: |
| 47 | + |
| 48 | + ./configure |
| 49 | + make |
| 50 | + make install |
| 51 | + |
| 52 | +If you want to run the tests to make sure ERFA built correctly, before |
| 53 | +installing do:: |
| 54 | + |
| 55 | + make check |
| 56 | + |
| 57 | + |
| 58 | +For developers |
| 59 | +^^^^^^^^^^^^^^ |
| 60 | + |
| 61 | +If you are using a developer version from github, you will need to first do |
| 62 | +``./bootstrap.sh`` before the above commands. This requires ``autoconf`` and |
| 63 | +``libtool``. |
| 64 | + |
| 65 | +If you wish to build against the ERFA static library without installing, you |
| 66 | +will find it in ``$ERFAROOT/src/.libs/liberfa.a`` after running ``make``. |
| 67 | + |
| 68 | +Creating a single-file version of the source code |
| 69 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 70 | + |
| 71 | +Alternatively, if you wish to bundle the ERFA source code with a separate |
| 72 | +package, you can use the ``source_flattener.py`` script from the |
| 73 | +`erfa-fetch repository`_ to combine |
| 74 | +the ERFA source code into just two files: a ``erfa.c`` source file, and an |
| 75 | +``erfa.h`` include file. You should run this script like this:: |
| 76 | + |
| 77 | + cd /path/to/erfa-source-code |
| 78 | + python /path/to/erfa-fetch/source_flattener.py src -n erfa |
| 79 | + |
| 80 | +If possible, however, it is recommended that you provide an option to use any |
| 81 | +copy of the ERFA library that is already installed on the system. |
| 82 | + |
| 83 | +Travis build status |
| 84 | +------------------- |
| 85 | +.. image:: https://travis-ci.org/liberfa/erfa.png |
| 86 | + :target: https://travis-ci.org/liberfa/erfa |
| 87 | + |
| 88 | +.. _erfa-fetch repository: https://github.com/liberfa/erfa-fetch |
0 commit comments