GNU Astronomy Utilities



6.2.4.4 Coordinate conversion operators

Different celestial coordinate systems are useful for different scenarios. For example, assume you have the RA and Dec of large sample of galaxies that you plan to study the halos of galaxies from. For such studies, you prefer to stay as far away as possible from the Galactic plane, because the density of stars and interstellar filaments (cirrus) significantly increases as you get close to the Milky way’s disk. But the Equatorial coordinate system which defines the RA and Dec and is based on Earth’s equator; and does not show the position of your objects in relation to the galactic disk.

The best way forward in the example above is to convert your RA and Dec table into the Galactic coordinate system; and select those with a large (positive or negative) Galactic latitude. Alternatively, if you observe a bright point on a galaxy and want to confirm if it was actually a super-nova and not a moving asteroid, a first step is to convert your RA and Dec to the Ecliptic coordinate system and confirm if you are sufficiently distant from the ecliptic (plane of the Solar System; where fast moving objects are most common).

The operators described in this section are precisely for the purpose above: to convert various celestial coordinate systems that are supported within Gnuastro into each other. For example, if you want to convert the RA and Dec equatorial (at the Julian year 2000 equinox) coordinates (within the RA and DEC columns) of points.fits into Galactic longitude and latitude, you can use the command below (the column metadata are not mandatory, but to avoid later confusion, it is always good to have them in your output.

$ asttable points.fits -c'arith RA DEC eq-j2000-to-galactic' \
           --colmetadata=1,GLON,deg,"Galactic longitude" \
           --colmetadata=2,GLAT,deg,"Galactic latitude" \
           --output=points-gal.fits

One important thing to consider is that the equatorial and ecliptic coordinates are not static: they include the dynamics of Earth in the solar system: in particular, the reference point on the equator moves over decades. Therefore these two (equatorial and ecliptic) coordinate systems are defined within epochs: the 1950 epoch is defined by Besselian years, while the 2000 epoch is defined in Julian years. So when dealing with these coordinates one of the ‘-b1950’ or ‘-j2000’ suffixes are necessary (for example eq-j2000 or ec-b1950).

The Galactic or Supergalactic coordinates are not defined based on the Earth’s dynamics; therefore they do not have any epoch associated with them. Extra-galactic studies do not depend on the dynamics of the earth, but the equatorial coordinate system is the most dominant in that field. Therefore in its 23rd General Assembly, the International Astronomical Union approved the International Celestial Reference System or ICRS based on quasars (which are static within our observational limitations)viewed through long baseline radio interferometry (the most accurate method of observation that we currently have). ICRS is designed to be within the errors of the Equatorial J2000 coordinate system, so they are currently very similar; but ICRS has much better accuracy. We will be adding ICRS in the operators below soon.

Floating point errors: The operation to convert between the coordinate systems involves many sines, cosines (and their inverse). Therefore, floating point errors (due to the limited precision of the definition of floating points in bits) can cause small offsets. For example see the code below were we convert equatorial to galactic and back, then compare the input and output (which is in the 5th and 6th decimal of a degree; or about 0.2 or 0.01 arcseconds).

$ sys1=eq-j2000
$ sys2=galactic
$ echo "10.2345689 45.6789012" \
       | asttable -Afixed -B8 \
                  -c'arith $1 $2 '$sys1'-to-'$sys2' \
                           '$sys2'-to-'$sys1' set-lat set-lng \
                           lng $1 - lat $2 -'
0.00000363   -0.00007725

If you set sys2=ec-j2000 or sys2=supergalactic, it will be zero until the full set of 8 decimals that are printed here (the displayed precision can be changed with the value of the -B option above). It is therefore useful to have your original coordinates (in the same table for example) and not do too many conversions on conversions (to propagate this problem).

eq-b1950-to-eq-j2000
eq-b1950-to-ec-b1950
eq-b1950-to-ec-j2000
eq-b1950-to-galactic
eq-b1950-to-supergalactic

Convert Equatorial (B1950 equinox) coordinates into the respective coordinate system within each operator’s name.

eq-j2000-to-eq-b1950
eq-j2000-to-ec-b1950
eq-j2000-to-ec-j2000
eq-j2000-to-galactic
eq-j2000-to-supergalactic

Convert Equatorial (J2000 equinox) coordinates into the respective coordinate system within each operator’s name.

ec-b1950-to-eq-b1950
ec-b1950-to-eq-j2000
ec-b1950-to-ec-j2000
ec-b1950-to-galactic
ec-b1950-to-supergalactic

Convert Ecliptic (B1950 equinox) coordinates into the respective coordinate system within each operator’s name.

ec-j2000-to-eq-b1950
ec-j2000-to-eq-j2000
ec-j2000-to-ec-b1950
ec-j2000-to-galactic
ec-j2000-to-supergalactic

Convert Ecliptic (J2000 equinox) coordinates into the respective coordinate system within each operator’s name.

galactic-to-eq-b1950
galactic-to-eq-j2000
galactic-to-ec-b1950
galactic-to-ec-j2000
galactic-to-supergalactic

Convert Galactic coordinates into the respective coordinate system within each operator’s name.

supergalactic-to-eq-b1950
supergalactic-to-eq-j2000
supergalactic-to-ec-b1950
supergalactic-to-ec-j2000
supergalactic-to-galactic

Convert Supergalactic coordinates into the respective coordinate system within each operator’s name.