SuperNOVAS
The Naval Observatory NOVAS C astrometry library, made better
Install / Use
/learn @Sigmyne/SuperNOVASREADME
<a href="https://sigmyne.github.io/SuperNOVAS/doc/html/files.html">
</a>
<a href="https://codecov.io/gh/Sigmyne/SuperNOVAS">
</a>
<br clear="all">
SuperNOVAS
The NOVAS C astrometry library, made better.
- C99 API documentation
- C++ API documentation
- SuperNOVAS pages on github.io
SuperNOVAS is a C/C++ astronomy software library, providing high-precision astrometry such as one might need for running an observatory, a precise planetarium program, or for analyzing astronomical datasets. It started as a fork of the Naval Observatory Vector Astrometry Software (NOVAS) C version 3.1, but since then it has grown into its own, providing bug fixes, tons of new features, and a much improved API compared to the original NOVAS.
SuperNOVAS is easy to use and it is very fast, with 3--5 orders of magnitude faster position calculations than astropy 7.0.0 in a single thread (see the benchmarks), and its performance will scale further with the number of CPUs when calculations are performed in parallel threads.
SuperNOVAS is and it is available through the Sigmyne/SuperNOVAS repository on GitHub, without licensing restrictions. Its source code is compatible with the C99 and C++11 standards, and hence should be suitable for old and new platforms alike. And, despite it being a light-weight library, it fully supports the IAU 2000/2006 conventions for microarcsecond-level position calculations.
This document has been updated for the v1.6 and later releases.
Table of Contents
- Introduction
- Fixed NOVAS C 3.1 issues
- Compatibility with NOVAS C 3.1
- Building and installation
- Celestial coordinate systems (old vs. new)
- Example use cases
- Incorporating Solar-system ephemeris data or services
- Notes on precision
- Runtime debug support
- Representative benchmarks
- SuperNOVAS added features
- Release schedule
<a name="introduction"></a>
Introduction
SuperNOVAS is a fork of the The Naval Observatory Vector Astrometry Software (NOVAS). (It is not related to the separate NOVA / libnova library.)
The primary goal of SuperNOVAS is to improve on the original NOVAS C library via:
- Fixing outstanding issues.
- Improved C99 API documentation.
- Faster calculations.
- New features.
- Refined C99 API to promote best programming practices.
- New, high-level, C++11 API.
- Thread-safe calculations.
- Debug mode with informative error tracing.
- Regression testing and continuous integration on GitHub.
At the same time, SuperNOVAS aims to be fully backward compatible with the intended functionality of the upstream NOVAS C library, such that it can be used as a build-time replacement for NOVAS in your application without having to change existing (functional) code you may have written for NOVAS C.
SuperNOVAS is really quite easy to use. Its new API is just as simple and intuitive as that of astropy (or so
we strive for it to be), and it is similarly well documented also (see the
documentation for the C99) and/or
C++ APIs. You can typically achieve the
same results with similar lines of code on
C or
C++
with SuperNOVAS as with astropy, notwithstanding a little more involved error handling (due to the lack of
try / except style constructs in C/C++).
SuperNOVAS is currently based on NOVAS C version 3.1. We plan to rebase SuperNOVAS to the latest upstream release of the NOVAS C library, if possible when new releases become available.
SuperNOVAS is maintained by Attila Kovács (Sigmyne, LLC),
Outside contributions are very welcome. See how you can contribute on how you can make SuperNOVAS even better.
Related links
- NOVAS home page at the US Naval Observatory.
- CALCEPH C library for integrating Solar-system ephemerides from JPL and/or in INPOP 2.0/3.0 format.
- NAIF SPICE toolkit for integrating Solar-system ephemerides from JPL.
- Sigmyne/cspice-sharedlib for building CSPICE as a shared library for dynamic linking.
- IAU Minor Planet Center provides up-to-date orbital elements for asteroids, comets, and near-Earth objects (NEOs), including newly discovered objects.
- IERS Earth Rotation and Reference Systems Service provides Earth Orientation Parameter (EOP) data for many high accuracy calculations.
<a name="fixed-issues"></a>
Fixed NOVAS C 3.1 issues
SuperNOVAS fixes a number of outstanding issues with NOVAS C 3.1:
<details>-
Fixes the sidereal_time bug, whereby the
sidereal_time()function had an incorrect unit cast. This was a documented issue of NOVAS C 3.1. -
Fixes the ephem_close bug, whereby
ephem_close()ineph_manager.cdid not reset theEPHFILEpointer to NULL. This was a documented issue of NOVAS C 3.1. -
Fixes antedating velocities and distances for light travel time in
ephemeris(). When getting positions and velocities for Solar-system sources, it is important to use the values from the time light originated from the observed body rather than at the time that light arrives to the observer. This correction was done properly for positions, but not for velocities or distances, resulting in incorrect observed radial velocities or apparent distances being reported for spectroscopic observations or for angular-physical size conversions. -
Fixes bug in
ira_equinox()which may return the result for the wrong type of equinox (mean vs. true) if theequinoxargument was changing from 1 to 0, and back to 1 again with the date being held the same. This affected routines downstream also, such assidereal_time(). -
Fixes accuracy switching bug in
cio_basis(),cio_location(),ecl2equ(),equ2ecl_vec(),ecl2equ_vec(),geo_posvel(),place(), andsidereal_time(). All these functions returned a cached value for the other accuracy if the other input parameters are the same as a prior call, except the accuracy. -
Fixes multiple bugs related to using cached values in
cio_basis()with alternating CIO location reference systems. This affected many CIRS-based position calculations downstream. -
Fixes bug in
equ2ecl_vec()andecl2equ_vec()whereby a query withcoord_sys = 2(GCRS) has overwritten the cached mean obliquity value forcoord_sys = 0(mean equinox of date). As a result, a subsequent call withcoord_sys = 0and the same date as before would return the results in GCRS coordinates instead of the requested mean equinox of date coordinates. -
Some remainder calculations in NOVAS C 3.1 used the result from
fmod()unchecked, which resulted in angles outside of the expected [0:2π] range and was also the reason whycal_date()did not work for negative JD values. -
Fixes
aberration()returning NaN vectors if theveargument is 0. It now returns the unmodified input vector appropriately instead. -
Fixes unpopulated
azoutput value inequ2hor()at zenith. While any azimuth is acceptable really, it results in unpredictable behavior. Hence, we setazto 0.0 for zenith to be consistent. -
Fixes potential string overflows and eliminates associated compiler warnings.
-
Nutation series used truncated expressions for the fundamental arguments, resulting in μas-level errors in when
