# Converting coordinates from celestial reference frame to terrestrial reference frame

I was working on how to transform celestial reference frame (Right Ascension and Declination) of a particular quasar at J2000.0 to terrestrial reference frame at the epoch of October 22 2019 (00:00 UTC).

1) I would like to know whether I have to find the Right Ascension and Declination values of the quasar on October 22 2019 at 00:00 UTC first, (from the Astronomical Almanac) and then convert that value to the terrestrial reference frame. I am bit confused here in the sense that in transforming from celestial frame to terrestrial frame, are we trying to relate the right ascension and declination values to longitude and latitude values on earth?

2) I was wondering how to obtain the transformation matrices in order to carry out this conversion! Is there any software code for this or do we have to do it manually? I searched in the SOFA and IERS sites (US Naval Observatory site is down!) but could not find any information. I am just a beginner to this field and any sort of help would be highly appreciated.

1) You are translating from celestial (ICRS) to terrestrial (ITRS) coordinates. Each of them can have rectangular (cartesian) or spherical (RA/Dec or Lat/Long) representations. One difference is that the origin of the ICRS frame is at the solar system barycentre, while ITRS is at the centre of the earth. For very far distance objects like quasars this makes little difference. ICRS has a fixed orientation in space, while ITRS co-rotates with the earth. So ITRS coordinates depend on date of observation. In practice, so do ICRS coordinates because of axial precession, so that any given ICRS measurement will specify an epoch.

2) You can convert the epoch of the coordinates (e.g. from J2000 to 2019-10-22) either before or after converting from ICRS to ITRS.

I don't know how you would implement the transformations yourself -- it looks complicated. But astropy (and astroplan if you want to do a catalog lookup) can do it for you. Here's some simplest possible code demonstrating coordinates in ICRS, ITRS (cartesian and spherical representations), and for a particular date of observation:

from astropy.coordinates import ICRS, ITRS
from astropy.time import Time
from astroplan import FixedTarget

quasar = FixedTarget.from_name('3C 273')
print(quasar)

itrs = quasar.coord.transform_to(ITRS)
print(itrs)

itrs.representation_type = 'spherical'
print(itrs)

t = Time('2019-10-22T00:00:00.0', format='isot', scale='utc')
itrs_t = quasar.coord.transform_to(ITRS(obstime=t))
itrs_t.representation_type = 'spherical'
print(itrs_t)


And here's a longer, more explanatory version:

from astropy.coordinates import SkyCoord, ITRS
from astropy.time import Time
import astropy.units as u
from astroplan import FixedTarget

'''
ICRS coord. (ep=J2000) : 12 29 06.6996828061 +02 03 08.598846466
'''

# Some equivalent ways to set up coordinates in astropy:
coord=SkyCoord(
(12 + 29/60 + 6.6996828061/3600) * u.hourangle,
(2 + 3/60 + 8.598846466/3600) * u.degree)

# ... or:
coord=SkyCoord('12h29m06.6996828061s +02d03m08.598846466s')

quasar = FixedTarget(coord = coord, name = '3C 273')

# We'll take the easy route and look it up direct from SIMBAD ...
quasar = FixedTarget.from_name('3C 273')
print(quasar)

# Convert ICRS coordinates to ITRS:
itrs = quasar.coord.transform_to(ITRS)
print(itrs)

# Show the ITRS coordinates in spherical units:
itrs.representation_type = 'spherical'
print(itrs)

# Show quasar in spherical ITRS coordinates for a particular observation date/time:
t = Time('2019-10-22T00:00:00.0', format='isot', scale='utc')
itrs_t = quasar.coord.transform_to(ITRS(obstime=t))
itrs_t.representation_type = 'spherical'
print(itrs_t)


The output from this code (showing ICRS, cartesian ITRS, spherical ITRS, and spherical ITRS on date of observation) is:

<FixedTarget "3C 273" at SkyCoord (ICRS): (ra, dec) in deg (187.27791535, 2.05238857)>
<SkyCoord (ITRS: obstime=J2000.000): (x, y, z) [dimensionless]
(-0.05083637, -0.99806403, 0.03583086)>
<SkyCoord (ITRS: obstime=J2000.000): (lon, lat, distance) in (deg, deg, )
(267.08416068, 2.05339649, 1.)>
<SkyCoord (ITRS: obstime=2019-10-22T00:00:00.000): (lon, lat, distance) in (deg, deg, )
(157.38603886, 1.94708618, 1.)>

• I actually have to work with transformation matrices arising from the motion of the celestial pole in the celestial reference frame, arising from the rotation of earth around the axis associated with the celestial pole and that accounting for polar motion of earth. I was wondering how I would calculate them or atleast examples to get an idea of calculating transformation matrices. The following is the link to the IERS website which mentions about the transformation.(iers.org/SharedDocs/Publikationen/EN/IERS/Publications/tn/…) – budding physicist Nov 4 '19 at 3:55
• I rewrote the answer to demo using astropy to perform the IERS transformation. By default it uses IAU2006 model for precession and nutation when you transform to different epoch. If you are looking to implement the transformation matrices yourself instead of using a package like astropy, I'm afraid I can't help but the astropy source code is available. – Peter Swords Nov 6 '19 at 3:47
• Thank you so much for the help. I actually wanted to do the transformation matrices by hand but this code will help me to crosscheck with the answers that I get. I have a final (minor) doubt regarding the final output. Are these the final coordinate values of the Quasar (in ITRS) as seen on 2019-11-06 UTC 00:00:00, which were obtained by starting from the initially given right ascension and declination values of the Quasar at the epoch J2000 and by applying precession, nutation, frame bias and also the rotation and the polar motion of the earth! – budding physicist Nov 6 '19 at 4:20
• Sorry, was still editing when you posted. Look at the latest answer. I changed the date to the one you were working with and added some further explanation and code cleanup. Yes, the astropy calculations implement the proper IERS specification including using the IERS tables for variable earth rotation rate. In fact, if you run this code yourself you will see it prompting you to download the latest IERS Bulletin A table. The four outputs from the code are quasar ICRS coordinates at epoch J2000, cartesian ITRS of J2000, spherical ITRS of J2000 and spherical ITRS of 2019-10-22. – Peter Swords Nov 6 '19 at 4:25
• Thank you very much Peter. I was actually wondering which angle did you use to calculate the earth rotation: is it the earth Rotation angle (ERA) or the Greenwich Apparent Sidereal Time (GAST). I want to use both and compare the results since the former corresponds to the CIO method and the latter corresponds to equinox method, and I expect different results for both methods! – budding physicist Nov 6 '19 at 22:54