Map Catalog Files:            CBfccc01.uuu


A.  Overview


Function:  Image header files contain descriptions of the format
     and contents of standard image files.

Names and Locations:  There is an image header file for every image
     stored on disk (MA, UV, SC, or whatever) and cataloged in the
     corresponding CA file.  The header files have physical names
     corresponding to CBfccc01.uuu where f is the format revision
     code, ccc is the catalog number of the image file in the CA
     directory file, and uuu is the user number.   Note that ccc and
     uuu are in hex.


B.  Data Structures and usage notes


     File Structure:  Each catalog header file contains a one block
(256-word) binary header and a number of keyword = value entries in as
many following blocks as are required.  A catalog file must be at least
two blocks long.

     Record Formats:

Catalog Blocks:

OFFSET LENGTH TYPE  POINTER      DESCRIPTION

    0     8   H*8    KHOBJ=  1   Source name
    8     8   H*8    KHTEL=  3   Telescope, i.e., 'VLA'
   16     8   H*8    KHINS=  5   e.g., receiver or correlator
   24     8   H*8    KHOBS=  7   Observer name
   32     8   H*8    KHDOB=  9   Observation date in format 'DD/MM/YY'
   40     8   H*8    KHDMP= 11   Date map created in format 'DD/MM/YY'
   48     8   H*8    KHBUN= 13   Map units, i.e., 'JY/BEAM '
   56   14*8  H*8(*) KHPTP= 15   Random Parameter types
                  ( KIPTPN= 14 )
  168    7*8  H*8(*) KHCTP= 43   Coordinate type, i.e., 'LL'
                  ( KICTPN= 7 )
  224    56   R*8(*) KDCRV= 29   Coordinate value at reference pixel
                  ( KICTPN= 7 )
  280    28   R*4(*) KRCIC= 71   Coordinate value increment along axis
                  ( KICTPN= 7 )
  308    28   R*4(*) KRCRP= 78   Coordinate Reference Pixel
                  ( KICTPN= 7 )
  336    28   R*4(*) KRCRT= 85   Coordinate Rotation Angles
                  ( KICTPN= 7 )
  364     4   R*4    KREPO= 92   Epoch of coordinates (years)
  368     4   R*4    KRDMX= 93   Real value of data maximum
  372     4   R*4    KRDMN= 94   Real value of data minimum
  376     4   R*4    KRBLK= 95   Value of indeterminate pixel (real
                                 maps only)
  380     4   I*4    KIGCN= 96   Number of random par. groups.
                                 This is the number of uv data
                                 records.
  384     4   I*4    KIPCN= 97   Number of random parameters
  388     4   I*4    KIDIM= 98   Number of coordinate axes
  392    28   I*4(*) KINAX= 99   Number of pixels on each axis
                  ( KICTPN= 7 )
  420     4   I*4    KIIMS=106   Image sequence no.
  424    12   H*12   KHIMN=107   Image name
                  ( KHIMNO= 1 )  Character offset in hollerith string
  436     6   H*6    KHIMC=107   Image class
                  ( KHIMCO=13 )  Character offset in hollerith string
  442     2   H*2    KHPTY=107   Map physical type (i.e., 'MA','UV')
                  ( KHPTYO=19 )  Character offset in hollerith string
  444     4   I*4    KIIMU=112   Image user ID number
  448     4   I*4    KIALT=113   Velocity reference frame: 1-3
                                 => LSR, Helio, Observer +
                                 256 if radio definition.
  452     4   R*4    KRBMJ=114   Beam major axis in degrees
  456     4   R*4    KRBMN=115   Beam minor axis in degrees
  460     4   R*4    KRBPA=116   Beam position angle in degrees
  464     4   I*4    KINIT=117   # clean iterations
  468     4   I*4    KITYP=118   Clean map type: 1-4 => normal,
                                 components, residual, points.
                                 For uv data this word contains a
                                 two character sort order code.
* 472     8   R*8    KDORA= 60   Antenna pointing Right Ascension
  480     8   R*8    KDODE= 61   Antenna pointing Declination
  488     8   R*8    KDRST= 62   Rest frequency of line (Hz)
  496     8   R*8    KDARV= 63   Alternate ref pixel value
                                 (frequency or velocity)
  504     4   R*4    KRARP=127   Alternate ref pixel location
                                 (frequency or velocity)
* 508     4   R*4    KRXSH=128   X shift
* 512     4   R*4    KRYSH=129   Y shift
* 516    80   H*4(*) KHEXT=130   Names of subsidiary file types
                  ( KIEXTN=20 )  (i.e., 'PL') 2 char
* 596    80   I*4(*) KIVER=150   Number of versions of corresponding
                  ( KIEXTN=20 )  subsidiary file
  676   348   I*4(*) KIRES=170   Reserved
                  ( KIRESN=87 )

* not preserved in the Image Catalog version of header


                    COMMENTS


General

1.  Standard names are given for the pointer variables.  The values
    for the pointers are computed by the subroutine VHDRIN and are
    machine-dependent.  The values given above are for standard 32-
    bit machines.  The values are found in the common /HDRVAL/ via
    includes 'DHDR.INC' and 'CHDR.INC'.  The characters of each H*8
    variable are packed separately (and left-justified) in as many
    real variables as required.  The image name, class, and physical
    type are packed as a 20-character string in as many real variables
    as required.

2. The header contains 256 words and should be contained in the arrays
   CATBLK(256), CATH(256), CATR(256) and CATD(128) which are  INTEGER,
   HOLLERITH, REAL, and DOUBLE PRECISION resp. and are equivalenced.
   Pointers of the type KI... should refer to CATBLK locations, KH...
   to CATH locations, KR... to CATR locations and KD... to CATD
   locations.  E.g.  CATD(KDORA) contains the R*8 pointing right
   ascension.  The variable names used here are now standards and
   should be used wherever possible.

3. When used in the image catalog (IC file) instead of the CB file
   some parameters are given new meanings.  Bytes 496-503 and
   532-699 are affected.  See the IC file description for details.

Specific

Byte 16:   Any special equipment etc. used during observations
Byte 56:   Random parameters are those associated with an irregularly
           gridded "array".  See latest FITS (u-v) paper for details.
Byte 168:  Seven coordinates!!!  Four will commonly be used; RA,
           DEC, FREQ and STOKES.
Byte 224:  In keeping with the FITS format convention, angles are
           expressed in degrees.
Byte 364:  Somewhat astronomically specific.  1950.0 is used.
Byte 368:  The real value of the max/min, not the pixel value
     372   is used.
Byte 376:  The value used to specify that a pixel is undefined.  Used
           only for floating point maps; usually 'INDE'.  If there
           are no blanked pixels, set to 0.0.
Byte 384:  See Byte 56:
Byte 420:  The user mapname-sequence number
Byte 424:  The user mapname-name
Byte 436:  The user mapname-class
Byte 516:  The types of subsidiary files associated with the
           map are given by a two letter designation; eg.'HI'
           for history files, 'PL' plot file.
Byte 596:  The current highest version number of the associated file
           type listed in the same relative array position in the
           previous type listing.
Byte 676:  Beginning of 87 spare words.


D.  Keywords

     The keyword section contains one or more records beginning in
record two of the file.  The first keyword record uses words one
through six as

          WORD      TYPE      USE
            1        I      Number of 256-integer records in file
            2        I      Number of keywords in file
          3-6        I(4)   Reserved

Keyword N is found in disk record N/51 + 2 at word 5 * MOD(N,51) + 2.
In other words, each keyword logical record requires 5 words, the
first logical record in disk record 2 is logical record 0 used for
the control data listed above, and the first word of all disk
records (except the control) is ignored.  A logical record contains:

          WORD      TYPE      USE
          1-2       H*4(2)    Keyword (8 HOLLERITH characters)
          3-4        *        Keyword value (word 4 used for
                                 type 3 and, if NWDPDP = 2,
                                 for type 1)
           5         I        Keyword type:
                                 1 double precision floating
                                 2 single precision floating
                                 3 character (8 HOLLERITH chars)
                                 4 integer
                                 5 logical



E.  Subroutines

      CATCR   creates CA files
      CATDIR  searches and modifies the catalog directory, creates CB
      CATIO   reads and writes catalog blocks and can modify status
      CATKEY  reads/writes keywords in the CB file
      CATOPN  opens the catalog file (CA) on a given volume
      MCREAT, MAPOPN, MAPCLS, and MDESTR handle most of the
         catalog bookkeeping while creating, opening, closing,
         or destroying map files.
