2MAPPS Software Interface Specification DBM03 3.1  97/08/26

Interface Name:     DBMAN/DB Minor Planet Data Interface
Type of Interface:  Database (Informix) Field Data Specification

Written By:         DBMAN   _______________________________ T. Evans

Read By:            Informix DB

Description:  DBMAN loads 2MASS data into the Informix 2MASS database.  This 
SIS describes the DB fields (AKA "table columns") for the minor planet data. 
Each of these entries contains a minor planet position prediction that has
been positionally matched to a 2MASS src (given by the hemis + date + scan + 
id key).  Descriptions of other DB data are found in the other DBMxx SISs.
Also, information from each DBMAN run will also be written to a UNIX summary 
file.

The DB table containing this data from survey scans is named "mp_mch", and the
table containing this data from calibration scans is named "mp_mch_c".  Both
are in the "tmass" DB.

If a field is not applicable or contains a "bad or N/A measurement value" (see
previous 2MAPPS SISs for details) for a certain source, the field will contain
"NULL" values as defined by the DB.

The descriptions below contain the following information:

1. "Name" contains the names of the DB fields or table columns.  Note that they
are all in lower case, because the DB doesn't distinguish between upper and 
lower case names.  If there is a number in parentheses after the name, please
refer to the numbered notes at the end of the descriptions for more information.
Some fields are repeated 3 times, once for each band, but are found only once 
in the description below; these fields contain "<b>" in the name, where "b" is 
understood to mean "j", "h", and "k".
NOTE: The "cntr" column MUST be the first column in each table. 

2. "Description" contains short descriptions of the field contents.

3. "Units" contains the units of the values in the fields.

4. "DBType" contains the DB data storage types for the fields.  Note that some 
data types are further defined by values in parentheses following the type name.
Also, these types are NOT cast in stone and could change, especially for the 
position fields.

5. "Null" indicates (y/n) whether the DB fields accept NULL values.

6. "Idx" contains a code indicating whether fields are indexed and what type
of indexes they have.  If the code is "0", the field is not indexed.  If it
is "1", the field has a simple index.  If there is a "u" after the digit(s),
the index is a "unique" one.  If the code has a 2-digit number, the first digit
indicates to which composite index the field belongs, and the second digit
indicates the ordering of the fields within the composite index. 

7. "Fmt" contains a C-like description of the best formats for displaying the
field contents, *excluding* a leading space for field separation.

8. "Tbl" contains the (sub-)table ID to which the fields belong.
NOTE: The "cntr" field will be the first field in each sub-table, and is used
as a join index.  The 1st sub-table ("01") is the "main" sub-table, and must
contain one entry per table cntr number; any other sub-table will not contain 
an entry for a cntr number if its fields would all be NULL.

9. "Min" and "Std" indicate (y/n) whether the DB fields are found in the "mini"
and "standard" table output views.

NOTE:  A line beginning with "-------" can only be used herein to delineate the
section of field/data dictionary lines seen below.

Name               Description                                                  Units  DBType      Null Idx Fmt               Tbl Min Std
-----------------------------------------------------------------------------------------------------------------------------------------
cntr               entry counter (key) number (unique within table)             -      integer       n   1u 8d                 01   y   y
hemis              hemisphere (N/S) of observation                              -      char(1)       n  21  1s                 01   n   y
date               observation date                                             -      date          n  22  yymmdd             01   n   y
scan               scan number (unique within date)                             -      smallint      n  23  3hd                01   n   y
id                 2MASS source ID number                                       -      integer       n  24  6d                 01   y   y
mch_cnf        (1) match confidence parameter                                   -      decimal(4,2)  n   1  5.2f               01   y   y
id_mp              minor planet ID                                              -      char(35)      n   1  35s                01   y   y
ra                 right ascension (J2000 decimal deg)                          deg    decimal(8,5)  n   1  9.5f               01   y   y
dec                declination (J2000 decimal deg)                              deg    decimal(7,5)  n   1  9.5f               01   y   y
x                  unit sphere x value                                          -      decimal(9,9)  n   0  12.9f              01   n   n
y                  unit sphere y value                                          -      decimal(9,9)  n   0  12.9f              01   n   n
z                  unit sphere z value                                          -      decimal(9,9)  n   0  12.9f              01   n   n
<b>_noise      (2) noise in <band> coadd image                                  DN     decimal(4,2)  n   0  5.2f               01   n   n
r_helio            MP heliocentric distance                                     AU     decimal(8,6)  n   0  9.6f               01   n   n
r_geo              MP geocentric distance                                       AU     decimal(8,6)  n   0  9.6f               01   n   n
phase              MP phase angle                                               deg    decimal(6,3)  n   0  7.3f               01   n   n
v_mag              MP visual magnitude                                          mag    decimal(5,3)  n   1  6.3f               01   y   y
mu                 MP proper motion                                             "/hr   decimal(6,3)  n   0  7.3f               01   n   n
theta              MP angle of proper motion (E of N)                           deg    decimal(4,1)  n   0  5.1f               01   n   n
err_maj        (3) major axis of 1-sigma error ellipse                          arcsec decimal(4,1)  n   1  5.1f               01   n   y
err_min            minor axis of 1-sigma error ellipse                          arcsec decimal(4,1)  n   1  5.1f               01   n   y
err_ang            angle of error ellipse major axis (E of N)                   deg    decimal(4,1)  n   0  5.1f               01   n   y
pts_key        (4) key to point src data DB record                              -      integer       n   0  9d                 01   n   n
spt_ind            spatial (x,y,z) index key                                    -      integer       y   0  9d                 01   n   n
-----------------------------------------------------------------------------------------------------------------------------------------
total # columns = 26, # bytes/row = 139 
-----------------------------------------------------------------------------------------------------------------------------------------

NOTES:

(1) MchCnf is expected to be a 2-D chisquare parameter; it will be clipped
    on the high side at 99.99 if necessary.

(2) The coadd-image noise is the noise quoted in the header of the coadd
    image file covering the part of the scan where the minor planet was
    predicted to be.

(3) The last three parameters refer to the error ellipse associated with
    a two-dimensional Gaussian model for the position uncertainty, with the
    ellipse being the isodensity contour that crosses the major and minor axes
    at one sigma on those axes; ErrAng is the angle eastward from north to the
    nearest major axis of the error ellipse.

(4) Point src record key: no default (non-null)
    This field will be set to the key of the record containing the associated 
    point src data (see SIS DBM01).  The point src data will also have the 
    same date, hemisphere, scan, id keys.