Skip to content

Latest commit

 

History

History
98 lines (70 loc) · 4.62 KB

Specification.rst

File metadata and controls

98 lines (70 loc) · 4.62 KB

Astropy Coordinates Benchmark

Introduction

To be able to compare results from different coordinate conversion packages, we need to make sure the input and output "sky definitions" are well defined.

Note that with some conversions arcsecond, milli-arcsecond or even micro-arcsecond precision can be achieved.

We follow http://www.astro.rug.nl/software/kapteyn/celestial.html#sky-definitions which states that a "sky definition" consists of four things:

  • Sky system (equatorial, ecliptic, galactic, supergalactic)
  • Reference system (fk4, fk4_no_e, fk5, icrs, j2000)
  • Equinox (e.g. B1950, J2000)
  • Epoch of observation (e.g. B1950, J2000, J2012)

Although not all four values have to be specified all the time, because for some "sky definitions" only some fixed values are allowed for the other parameters.

To understand this better, you can read these documents:

Or play around with the kapteyn.celestial.skyparser :

>>> from kapteyn.celestial import skyparser
>>> skyparser('fk5')
(0, 6, 2000.0, None)
>>> skyparser('fk4')
(0, 4, 1950.0, None)
>>> skyparser('galactic')
(2, None, None, None)
>>> skyparser('ecliptic')
(1, 7, 2000.0, None)
>>> skyparser('fk4 J2000')
(0, 4, 2000.0012775136654, None)
>>> skyparser('ecliptic B1950')
(1, 4, 1950.0, None)
>>> skyparser('galactic J2000')
(2, None, None, None)
>>> skyparser('galactic B1950')
(2, None, None, None)

Just as an example, you can see that the "galactic" sky system is apparently well-defined, no need to specify a reference system, equinox or epoch of observation. To see why that is you can read the background information at http://www.astro.rug.nl/software/kapteyn/celestialbackground.html#galactic-coordinates

Precision

Celestial Conversions

To test celestial coordinate conversions, we use the list of 1000 (lon, lat) coordinates (in deg) in initial_coords.txt as input. It was generated by generate.py as a uniform random distribution on the sphere. We measure the precision of each tool by looking at the (mean, median, max) difference for all the input coordinates compared to reference results obtained with pyast.

Currently we compare results for all pairs of coordinate conversions between the following sky definitions:

Tag Name Sky System Reference System Equinox Epoch of observation
fk5 equatorial fk5 J2000 J2000
fk4 equatorial fk4 B1950 J2000
icrs equatorial icrs --- J2000
galactic galactic --- --- J2000
ecliptic ecliptic --- J2000 J2000

Notes:

  • The equinox does not enter into the definition of icrs and galactic
  • Galactic coordinates are defined by (ra,dec) positions specified in the FK4 system, but since there is no other alternative (i.e. we are not free to change this definition), the reference system is not a free parameter.
  • For ecliptic, no reference system is needed. Kapteyn allows different reference systems to be associated with ecliptic coords, but looking at the code (function MatrixEq2Ecl in celestial.py) the only use it makes of the reference system is to decide if the supplied epoch is interpreted as Besselian or Julian. This is done differently in AST - you specify B or J when storing the epoch. So if you always make sure that that the Equinox and Epoch of Observation always include a B or J explicitly, the reference system should not be relevant to ecliptic.

The coordinate systems used in the benchmarks are:

  • fk4: FK4 system (with e-terms), equinox B1950 and observation epoch J2000
  • fk5: FK5 system, equinox J2000
  • icrs: ICRS system
  • galactic: Galactic coordinate system
  • ecliptic: Ecliptic coordinate system, observation epoch J2000
  • altaz: Horizontal coordinate system

ICRS -- AltAz Conversions

Transformations between AltAz (a.k.a. horizontal) and celestial coordinate systems have been implemented in Astropy 1.0.

A few checks are available via ./make.py benchmark_horizontal.

Speed

TODO: Speed comparison hasn't started, we want accurate results first.