Right Ascension and Declination in astronomical functions

In the process of answering this question, I was forced to confront the various astronomical coordinate systems used by Mathematica.

Background

In astronomy, positions of celestial objects (stars, planets, nebulae, etc.) are commonly given in terms of one of a family of celestial equatorial coordinates, which are a coordinate systems that are centered either on the Earth (geocentric) or the barycenter of the solar system (barycentric) and are fixed relative to the very distant stars (cf. wikipedia). They can be imprecisely defined as projecting the equator and the prime meridian (at noon on the vernal equinox) out onto the sky and using them as the coordinate axes. Right ascension (RA) is the coordinate that measures angle left from the meridian and declination (Dec) measures angle up from the equator It is a bit of a tricky definition, however, as the Earth's axis of rotation precesses and nutates and wobbles, moving with respect to the background stars (precession is the dominant effect, and the slowest; the other effects are much smaller in magnitude but also have a much higher frequency), so coordinates defined this way will slowly change.

In these late times, the International Astronomical Union has defined a fixed system of coordinates called the International Celestial Reference System (ICRS; or ICRF for the reference frame), which is as fixed as possible with respect to the background stars and centered at the barycenter of the solar system, and its cousin the GCRS ("geocentric ICRS"), which is co-centered with the Earth. Although, as in all things in astronomy, older systems are still used, RA and Dec are commonly now given for astronomical objects as ICRS coordinates, and do not change with the motion of the Earth. Observers on the Earth, however, still want to know where to point their telescopes, so there in a fairly complicated set of transformations that have been defined for conversion of ICRS RA and Dec into a longitude and latitude on the Earth (coordinates that can be projected on the sky, but do precess and nutate and wobble, etc.). The technical definitions given for all of the IAU conventions can be found here, for the brave.

Right Ascension and Declination in Mathematica

We can find the right ascension and declination for a astronomical objects using the functions PlanetData, PlanetaryMoonData, and StarData, etc. The Sun and the Moon have the additional position functions SunPosition and MoonPosition that can be used to give positions in terms of "Equatorial" coordinates that the documentation claims are the right ascension and declination.

My question is: which kind of RA and Dec are being used in all of these functions, the ICRS standard, or coordinates that precess with the Earth's axis, or something in between (GCRS, perhaps)? The documentation, unfortunately (and bizarrely, given that the people making these functions had to decide which convention to use), is silent.

Stars

RA and Dec for stars can be fetched via

StarData["Sirius", {"RightAscension", "Declination"}]

(* -> {6 h, 45 m, 9.3 s, -16 degrees, -42 arc minutes, -47.2 arc seconds} *)


Although one can specify a particular date and time for these coordinates, the result Mathematica gives does not actually depend on the date or time at all - an indication that ICRS or some other fixed coordinates are being used. After comparing a few star positions to with those in the SIMBAD online database, I have come to the belief that Mathematica is indeed using ICRS RA and Dec positions for stars (or J2000.0, which doesn't differ from ICRS by much).

The Sun

The Sun is an exception to this rule. The position of the Sun is fetched in Mathematica in two ways:

SunPosition[date, CelestialSystem -> "Equatorial"]


and

StarData["Sun",
{EntityProperty["Star", "RightAscension", {"Date" -> date}],
EntityProperty["Star", "Declination", {"Date" -> date}]}
]


I have specified a date for these, because the results are date-dependent (the Sun moves in the sky). However, they are both date-dependent in the same way, and, for a given date, will always give the same result (up to some uncertainty):

With[{date = DateObject[{2015, 1, 12, 0, 0, 0}, TimeZone -> 0]},
sunpos1 = StarData["Sun",
{EntityProperty["Star", "RightAscension", {"Date" -> date}],
EntityProperty["Star", "Declination", {"Date" -> date}]}
];
sunpos2 = SunPosition[date, CelestialSystem -> "Equatorial"];
{sunpos1, sunpos2}
]

(* -> {{ 18 h, 46 m, 43.8895 s, -23 degrees, 0 arc minutes, -10.5515 arc seconds},
{ 18 h, 46 m, 43.8895 s, -23 degrees, 0 arc minutes, -10.5515 arc seconds}} *)


I have compared the positions generated to those given by the online ephemeris CalSKY, and they appear to agree with RA and Dec as given according the to the equinox of date, that is in precessing coordinates, up to about an arc minute. I also compared them to the ICRF coordinates generated by the de rigueur JPL HORIZONS system, and they definitely don't match. So, my conclusion is the the RA and Dec for the Sun are given in precessing coordinates (although, beware of the uncertainties here, as the precession and nutation is derived from a model, which will get more inaccurate the farther away one goes from the year 2000).

Planets

Planet positions are fetched via

PlanetData["Jupiter",
{EntityProperty["Planet", "RightAscension", {"Date" -> date}],
EntityProperty["Planet", "Declination", {"Date" -> date}]}
]


They also move in the sky, and so need a specified date. Checking against CalSKY and HORIZONS leads me to believe that the RA and Dec for planets are also given in precessing coordinates (with the same uncertainty warning as above).

Planetary moons

Planetary moon positions are fetched via

PlanetaryMoonData["Europa",
{EntityProperty["PlanetaryMoon", "RightAscension", {"Date" -> date}],
EntityProperty["PlanetaryMoon", "Declination", {"Date" -> date}]}
]


They also move in the sky, and so need a specified date. Checking against CalSKY and HORIZONS leads me to believe that the RA and Dec for planetary moons are also given in precessing coordinates (ditto uncertainty warning).

The Moon

The Moon is a special case, as its position can also be fetched with MoonPosition. Like we did for the Sun, we can check both functions:

With[{date = DateObject[{2015, 1, 12, 0, 0, 0}, TimeZone -> 0]},
moonpos1 = PlanetaryMoonData["Moon",
{EntityProperty["PlanetaryMoon", "RightAscension", {"Date" -> date}],
EntityProperty["PlanetaryMoon", "Declination", {"Date" -> date}]}
];
moonpos2 = MoonPosition[date, CelestialSystem -> "Equatorial"];
{moonpos1, moonpos2}
]

(* -> {{ 3 h, 42 m, 43.1002 s, 16 degrees, 15 arc minutes, 48.4015 arc seconds},
{ 3 h, 53 m, 6.2903 s, 16 degrees, 38 arc minutes, 17.4890 arc seconds}} *)


These don't match. I checked these at widely different dates and times and always found a difference, sometimes very big. Comparing to SkyCAL and HORIZONS, it appears PlanetaryMoonData gives RA and Dec for the Moon in precessing coordinates, but MoonPosition gives something else...and not the ICRF position. Very odd. Note that there is another instance of some odd behavior with respect to MoonPosition.

Other things

There are a bunch of other astronomical object that Mathematica knows about:

1. MinorPlanetData
2. ExoplanetData
3. CometData
4. StarClusterData
5. GalaxyData
6. NubulaeData
7. PulsarData
8. SupernovaeData
9. SolarSystemFeatureData
10. SatelliteData
11. DeepSpaceProbeData

I don't have time to check them all at the moment, but I can sense a pattern: very distant objects like stars and galaxies seem to get ICRS coordinates, while solar system objects have precessing ones. SatelliteData provides properties for both "RightAscension" and "Declination" and "Position", the latter of which is given with respect to Earth-coordinates, so there should be an easy way to check for that one. Also, all of the Data-type functions appear to make calls to Wolfram|Alpha, so perhaps querying the folks supporting the knowledgebase is the fastest way to sort it out.

• I suspected that something like this might be the case... I hope they get this sorted out, I'm excited to play with these functions when they get good enough. Commented Apr 24, 2015 at 20:01
• Update: The right ascension values for the position of the Moon are the same when Mathematica 12.0.0.0 is used. Commented Aug 20, 2019 at 15:11