How to update ephemeris tables used in the CASA (setjy) for solar system objects

This is a record of how it is done to update ephemeris tables used for the Butler-JPL-Horizons 2012 in setjy (for CASA 4.0).

The short version of the description is here.

The tools to query and retrieve the data from the JPL-Horizons System and converting to a CASA table are available as Python functiion in recipes/ephemerides.

Step 1. Access the JPL Horizons System (http://ssd.jpl.nasa.gov/?horizons) using request_from_JPL() in request.py. This will request the data for a given object and send it via e-mail. For the new table, we want to get the following information: J2000 coordinates, apparent planetographic longitude and latitude, solar planetographic longitude and latitude, the north pole position angle and angular distance, apparent heliocentric range(r) and range rate(rdot), apparent observer range(delta) and range rate(delta-dot), and Sun-Target-Observer angle (S-T-O), (or in terms of the column numbers of the Horizons data, #1,14,15,17,19,20,24). The data were requested up to 2020-12-31 in a 1-day increment.

import recipes.ephemerides.request as jplreq
jplreq.request_from_JPL(objnam='Mars',startdate='2010-01-01',enddate='2020-12-31', date_incr='1 d',
       get_axis_orientation=False, get_axis_ang_orientation=True, get_sub_long=True, use_apparent=False, get_sep=False,
       return_address='your_email_address')

Step 2. The data for the individual object is sent to the address specified in return_address. Once received, save it as a text file. Using readJPLephem() in JPLephem_reader.py and giving the saved text file name as a argument of the function, one can convert the file into a CASA table.

If S-T-O is requested the query result now returns 4 values (S-T-O,phi,PAB_LAT,PAB_LOT) and the old JPLephem_reader no longer work correctly, in that case please use JPLephem_reader2.py.
import recipes.ephemerides.JPLephem_reader2 as jplreader
rawdata='mars_ephem.eml' 

# suppose mars_ephem.eml is the ascii query result sent via an e-mail contains the data from JPL-Horizons (no need of editing, it should be fine with all the headers)

outdict=jplreader.readJPLephem(rawdata, version='0004.0002')  

# version is optional. The string will be entered in VS_VERSION keyword in the output table.

readJPLephem() produces a output data in the Python dictionary and now need to convert the output to a CASA table by:

jplreader.ephem_dict_to_table(outdict,outtbname)

The converted CASA table are stored in ephemerides/JPL-Horizons/ in the CASA data directory.

The name convention of the new ephemeris tables

object _MJDstart-MJDenddUTC_J2000.tab (e.g. Mars_55197-59214dUTC_J2000.tab)

This distinguishes the updated tables from the old tables (without _J2000) . Note that the old ones's RA/Dec are in the apparent rather than J2000 coordinates and the new tables contains few new columns. For the values shown as "n.a." in the original JPL-Horizons tables, it is translated as -999.

Column names and their units in the new tables

DEC (deg)
DiskLat (deg)
DiskLong (deg)
MJD (d)
NP_ang (deg)
NP_dist' (deg)
RA (deg)
RadVel (AU/d) <- the requirement of the unit comes from MeasComet
'Rho (AU)
Sl_lat (deg)
Sl_lon (deg)
phang (deg)
r (AU)
rdot (km/s)

-- TakTsutsumi - 2012-10-17

New keyword added: posrefsys (position reference system, 'ICRF/J2000' or 'FK4/B1950.0')

-- TakTsutsumi - 2013-07-02
Topic attachments
ISorted ascending Attachment Action Size Date Who Comment
make-casaephem-from-JPL-Horizons.py.txttxt make-casaephem-from-JPL-Horizons.py.txt manage 4 K 2012-10-17 - 16:25 TakTsutsumi The script used in creating the current ephemeris tables (*_J2000.tab ones)
Topic revision: r5 - 2014-11-06, TakTsutsumi
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback