Index

catalog filename

Load sources from a source catalog file.

Arguments:
InputFile filename
The name and directory of a readable source-catalog file.

Example:
The following example adds the sources in ~mcs/CBI/ephem/source.cat to the current source catalog. New sources with the same names as ones that are already in the catalog replace the old ones.
 catalog ~mcs/CBI/ephem/source.cat
Context:
Before a source can be tracked by the telescope it must be described to the control program via an entry in a source catalog. Sources can then be refered to by name.

The format of source catalog files:
Source catalogs are text files containing the descriptions of one or more sources, one per line. Blank lines are also legal, as are comments. Comments are introduced with the # character and extend to the end of the line. The following example would be valid as a source catalog, and shows examples of all the supported syntax:
 # This is a comment.

 #-----------------------------------------------------------------------
 # The following entry describes a source called "alyr" by its
 # J2000 Right Ascension, Declination, and its J2000 proper motion
 # per Julian year in Right Ascension and Declination.
 #
 #   Source         Equatorial position          Proper motion/yr
 #                     RA         Dec             RA           Dec
 # type  name     hh:mm:ss.sss  dd:mm:ss.ss   h:m:ss.ssss   d:m:ss.sss
 #-----------------------------------------------------------------------

 J2000   alyr     18:35:14.655  38:44:09.68  +0:0:00.0170  +0:0:00.285

 #-----------------------------------------------------------------------
 # The following entry describes a J2000 source with no proper motion.
 #
 #    Source         Equatorial position
 #                      RA         Dec
 # type  name      hh:mm:ss.sss  dd:mm:ss.ss
 #-----------------------------------------------------------------------

 J2000   0003-066  00:03:40.290  -06:40:17.60

 #-----------------------------------------------------------------------
 # The following entry defines "vega" as an alternate name for "alyr".
 #
 # type  name     existing name
 #-----------------------------------------------------------------------

 alias   vega     alyr

 #-----------------------------------------------------------------------
 # The following entry defines the local zenith in terms of fixed
 # telescope axis positions.
 #
 # type  name     azimuth  elevation   deck-angle
 #-----------------------------------------------------------------------

 FIXED   zenith   0        90.0        0

 #-----------------------------------------------------------------------
 # The following entry defines the sun as a source who's equatorial
 # position is defined by the contents of an ephemeris file.
 #
 # type  name     ephemeris-file
 #-----------------------------------------------------------------------

 EPHEM   sun      ~mcs/CBI/ephem/sun.ephem

The format of source ephemeris files:
Source ephemerides are text files that contain the geocentric equatorial coordinates of a source as a function of time. They are usually used to describe solar system objects. The following example shows the first few lines of the current ephemeris file for mars.
#-----------------------------------------------------------------------
#                     CBI Ephemeris for Mars
#
# Note that TT ~= TAI + 32.184.
# See slaDtt.c for how to convert TT to UTC.
#
# Also note that MJD = JD - 2400000.5
#
# MJD (TT)   Right Ascen    Declination   Distance (au)      Calendar (TT)
#---------  -------------  -------------  ------------     -----------------
50814.0000  20:54:12.9302  -18:39:22.171  2.1366386049  #  1998-Jan-01 00:00
50815.0000  20:57:24.0642  -18:26:03.652  2.1398752328  #  1998-Jan-02 00:00
50816.0000  21:00:34.7660  -18:12:33.346  2.1431046252  #  1998-Jan-03 00:00
50817.0000  21:03:45.0305  -17:58:51.438  2.1463269705  #  1998-Jan-04 00:00

Note that comments are introduced with the '#' character and they extend to the end of the containing line. The CBI ephemerides were produced as follows. JPL provides an E-mail service for generating ephemerides. For each source of interest one submits a batch-job file via E-mail and a few minutes later receives one or more automated replies containing the requested ephemeris entries. One then has to remove the E-mail headers, splice the E-mails together in the correct order and then apply the following awk script to the result to produce the CBI ephemeris of the source. Note that the comments in the header of the script also outline the details of the batch file and its submittal.
 #!/bin/nawk -f
 #-----------------------------------------------------------------------
 # Convert the format of an E-mailed JPL ephemeris to a machine readable
 # form. To have a new ephemeris sent by JPL, change the COMMAND, START_TIME,
 # STOP_TIME and STEP_SIZE parameters of the following, remove the initial
 # # characters and E-mail the result to horizons@ssd.jpl.nasa.gov, along
 # with the subject line: JOB-SUBMITTAL
 #
 #!$$SOF (ssd)         JPL/Horizons Execution Control VARLIST          July, 1997
 # EMAIL_ADDR =  mcs@astro.caltech.edu
 # COMMAND    = 'mars'
 # OBJ_DATA   = NO
 # MAKE_EPHEM = YES 
 # TABLE_TYPE = OBS 
 # CENTER     = GEO
 # COORD_TYPE = GEODETIC
 # SITE_COORD = '0,0,0'
 # START_TIME = '1997-JAN-1 00:00'
 # STOP_TIME  = '1998-JAN-1 00:00'
 # STEP_SIZE  = '1 days'
 # QUANTITIES = '2,20'
 # REF_SYSTEM = J2000 
 # CAL_FORMAT = BOTH
 # ANG_FORMAT = HMS
 # APPARENT   = AIRLESS
 # TIME_TYPE  = TT
 # ELEV_CUT   = -90
 # SKIP_DAYLT = NO
 # AIRMASS    = 38.D0 
 # EXTRA_PREC = YES
 # CSV_FORMAT = NO
 #!$$EOF+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 #
 #-----------------------------------------------------------------------

 # The following variable will be 1 until the start of the ephemeris
 # is seen. This allows for rejection of lines of the header section
 # that might otherwise be interpreted as ephemeris entries.

 BEGIN {
   in_header=1
 }


 # Get the name of the target planet from the header.

 /^Target body/ {
   printf("#                     CBI Ephemeris for %s\n", $4);
 }


 # The following pattern matches the start of the ephemeris table.

 /^\$\$SOE/ {

 # Signal that we have finished reading the header section.

   in_header=0;

 # Describe the contents of the file.

   printf("#\n");
   printf("# Note that TT ~= TAI + 32.184.\n");
   printf("# See slaDtt.c for how to convert TT to UTC.\n");
   printf("#\n");
   printf("# Also note that MJD = JD - 2400000.5\n");
   printf("#\n");
   printf("# MJD (TT)   Right Ascen    Declination   Distance (au)      Calendar (TT)\n");
   printf("#---------  -------------  -------------  ------------     -----------------\n");
 }


 # Output reformatted ephemeris lines.

 /^ [0-9]/ && !in_header {
     printf("%.4f  %s:%s:%s  %s:%s:%s  %s  #  %s %s\n",
	    $3 - 2400000.5, $4,$5,$6, $7,$8,$9, $10, $1, $2);
 }


 # The job is complete when the end of the ephemeris table is reached.

 /^\$\$EOE/ {
   exit
 }
For the standard solar system objects I used that the following values for the COMMAND and STEP_SIZE parameters.
		       COMMAND      STEP_SIZE
 Sun                   'sun'        '1 days'
 Mercury               'mercury'    '12 hours'
 Venus                 'venus'      '1 days'
 Moon                  '301'        '6 hours'
 Mars                  'mars'       '1 days'
 Jupiter Barycenter    '599'        '1 days'
 Saturn Barycenter     '699'        '1 days'
 Uranus Barycenter     '799'        '1 days'
 Neptune Barycenter    '899'        '1 days'
 Pluto Barycenter      '999'        '1 days'
Note that JPL says that the batch program may change over time, so be prepared for the above procedures to need some adjustments. The example batch file that they provided me with listed the following options for requesting up to date information about their "Horizons" facility. Simply send an empty E-mail to horizons@ssd.jpl.nasa.gov with one of the following subjects:
  HORIZONS-BATCH-LONG   (Request latest fully commented example batch file)
  HORIZONS-BATCH-BRIEF  (Request latest example batch file without comments)
  HORIZONS-DOC-TEXT     (Request ASCII version of current documentation)
  HORIZONS-DOC-PS       (Request PostScript version of current documentation)
  HORIZONS-QUESTION     (Message fowarded to cognizant engineer) 
You can also invoke an interactive session by typing:
  telnet ssd.jpl.nasa.gov 6775
Or by accessing http://ssd.jpl.nasa.gov/cgi-bin/eph with a Web browser.

Martin Shepherd (9-Oct-1997)