The Fifth USNO CCD Astrograph Catalog
Data Format

WCSTools
Catalogs
a) UCAC5-TGAS   275 MB, compressed = 100 MB
-------------
column name  unit    bytes  description
--------------------------------------------------------------------------------
  1    ra    deg     TGAS right ascension, epoch 2015
  2    dec   deg     TGAS declination,     epoch 2015
  3    gmag  mag     Gaia DR1 G magnitude
  4    gjcol mag     G - J color index (Gaia G, 2MASS J) or -9.000
  5    pmur  mas/yr  proper motion RA*cosDec from UCAC - Gaia epoch data
  6    pmud  mas/yr  proper motion Dec       from UCAC - Gaia epoch data
  7    pmgr  mas/yr  proper motion RA*cosDec copy from Gaia TGAS
  8    pmgd  mas/yr  proper motion Dec       copy from Gaia TGAS
  9    pmdr  mas/yr  difference in proper motion  pmur - pmgr
 10    pmdd  mas/yr  difference in proper motion  pmud - pmgd
 11    eur   mas/yr  formal error of UCAC-Gaia proper motion RA*cosDec
 12    eud   mas/yr  formal error of UCAC-Gaia proper motion Dec
 13    egr   mas/yr  error of TGAS proper motion RA*cosDec
 14    egd   mas/yr  error of TGAS proper motion Dec
 15    srcid         Gaia source ID 
 16    na            number of all images of UCAC data this star
 17    nu            number of images used for UCAC mean position
-------------------------------------------------------------------------
Note: nu (col.17) might be 0 in case all images are excluded from the
  regular, weighted mean position calculation of all individual epoch
  positions.  In that case the mean position given in the catalog is
  the unweighted mean over all images.  Of course those positions,
  as well as those for nu = 1 can not be "trusted" as much as nu >= 2
  positions.


b) UCAC5 main data  (all stars matched, incl. TGAS stars) 
------------------   4.3 GB  (4310340520 byte = 107758513 records of 40 byte)
      INTEGER*8 srcid
      INTEGER*4 ira,idc
      INTEGER*2 epu, pmur,pmud, pmer,pmed
     .         ,gmag,umag,rmag,jmag,hmag,kmag
      INTEGER*1 flg, nu

      OPEN (22,FILE=fnu5,RECL=40)

      READ (22,REC=nu5) srcid, flg,nu,epu   ! 8 + 4       12 byte
     .   ,ira,idc, pmur,pmud, pmer,pmed     ! 8 + 4 + 4 = 16 byte
     .   ,gmag,umag,rmag,jmag,hmag,kmag     ! 6 * 2     = 12 byte

item   name  unit    description
-------------------------------------------------------------------------
  1    srcid         Gaia source ID 
  2    flg           1 = TGAS,  2 = other UCAC-Gaia star, 3 = other NOMAD
  3    nu            number of images used for UCAC mean position
  4    epu   myr     mean UCAC epoch (1/1000 yr after 1997.0)
  5    ira   mas     mean UCAC RA  at epu epoch on Gaia reference frame
  6    idc   mas     mean UCAC Dec at epu epoch on Gaia reference frame
  7    pmur  0.1 mas/yr  proper motion RA*cosDec (UCAC-Gaia)
  8    pmud  0.1 mas/yr  proper motion Dec       (UCAC-Gaia)
  9    pmer  0.1 mas/yr  formal error of UCAC-Gaia proper motion RA*cosDec
 10    pmed  0.1 mas/yr  formal error of UCAC-Gaia proper motion Dec
 11    gmag  mmag    Gaia DR1 G magnitude      (1/1000 mag)
 12    umag  mmag    mean UCAC model magnitude (1/1000 mag)
 13    rmag  mmag    NOMAD photographic R mag  {1/1000 mag)
 14    jmag  mmag    2MASS J magnitude         (1/1000 mag)
 15    hmag  mmag    2MASS H magnitude         (1/1000 mag)
 16    kmag  mmag    2MASS K magnitude         (1/1000 mag)
-------------------------------------------------------------------------


c) UCAC5 main data (alternative to "b)": Dec zone files + more Gaia data
------------------  5.3 GB (5603442676 byte = 107758513 records of 52 byte)

There are 900 individual files (z001 ... z900), each containing stars in
a narrow, 0.2 deg wide Dec zone, beginning at the south celestial pole.
Stars on each "zone file" are sorted by RA.  There are 2 index files
(formatted, binary) which go with these (see below).
The data structure is as follows:

      INTEGER*8 srcid
      INTEGER*4 ira,idc, rag,dcg
      INTEGER*2 epi, pmir,pmid,pmer,pmed, phgm,im1,rmag,jmag,hmag,kmag
     .         ,erg, edg
      INTEGER*1 flg,nu1

      OPEN (11,FILE=fnu5d,ACCESS='direct',RECL=52)

      READ (11,REC=iz,ERR=99)            !     total = 52 b
     .    srcid, rag,dcg, erg,edg        ! 8 + 8 + 4 = 20 b
     .   ,flg,nu1,epi                    ! 4         =  4 b
     .   ,ira,idc, pmir,pmid, pmer,pmed  ! 8 + 4 + 4 = 16 b
     .   ,phgm,im1,rmag,jmag,hmag,kmag   ! 6 * 2     = 12 b

item   name  unit    description
-------------------------------------------------------------------------
  1    srcid         Gaia source ID 
  2    rag   mas     Gaia RA  at epoch 2015.0  (from DR1, rounded to mas)
  3    dcg   mas     Gaia Dec at epoch 2015.0 
  4    erg   0.1 mas Gaia DR1 position error RA  at epoch 2015.0
  5    edg   0.1 mas Gaia DR1 position error Dec at epoch 2015.0
  6    flg           1 = TGAS,  2 = other UCAC-Gaia star, 3 = other NOMAD
  7    nu            number of images used for UCAC mean position
  8    epu   myr     mean UCAC epoch (1/1000 yr after 1997.0)
  9    ira   mas     mean UCAC RA  at epu epoch on Gaia reference frame
 10    idc   mas     mean UCAC Dec at epu epoch on Gaia reference frame
 11    pmur  0.1 mas/yr  proper motion RA*cosDec (UCAC-Gaia)
 12    pmud  0.1 mas/yr  proper motion Dec       (UCAC-Gaia)
 13    pmer  0.1 mas/yr  formal error of UCAC-Gaia proper motion RA*cosDec
 14    pmed  0.1 mas/yr  formal error of UCAC-Gaia proper motion Dec
 15    gmag  mmag    Gaia DR1 G magnitude      (1/1000 mag)
 16    umag  mmag    mean UCAC model magnitude (1/1000 mag)
 17    rmag  mmag    NOMAD photographic R mag  {1/1000 mag)
 18    jmag  mmag    2MASS J magnitude         (1/1000 mag)
 19    hmag  mmag    2MASS H magnitude         (1/1000 mag)
 20    kmag  mmag    2MASS K magnitude         (1/1000 mag)
-------------------------------------------------------------------------


d) ASCII index table to zone file data   u5index.asc  (27 MB)
--------------------------------------
There are 900 zone files (z001 to z900), each 0.2 deg wide in Dec.
There are 1440 bins along each zone file, which is 0.25 deg = 1/60 hour 
along RA for each bin.

sample data:
 ...
 15622    2  38 1437
 15624    7  38 1438
 15631    8  38 1439
 15639   10  38 1440
     0   11  39    1 -82.2
    11    4  39    2
    15    4  39    3
 ...

column data      description
-------------------------------------------------------------
   1   x0(zn,j)  (index of 1st star of zone zn and bin j) - 1
   2   xn(zn,j)  number of stars in that bin
   3   zn        zone number (= 1 to  900)
   4   j         bin  number (= 1 to 1440)
-------------------------------------------------------------
The first line of each new zone has the upper bound Declination
(largest Dec in that zone) appended (degree).


e) Index to zone files as binary data   u5index.unf  (10 MB)
-------------------------------------
      INTEGER    dimz, jmax, rlidx
      PARAMETER (dimz =  900         ! total number of zones
     .          ,jmax = 1400         ! total number of bins along a zone
     .          ,rlidx= dimz*jmax*4) ! record length index file (byte)

      INTEGER x0(dimz,jmax), xn(dimz,jmax)

      OPEN  (15,FILE=fnidxu,ACCESS='direct',RECL=rlidx)
      WRITE (15,REC=1) x0
      WRITE (15,REC=2) xn

Thus the record length of that file is 900 * 1440 * 4 byte = 5184000 byte,
and the total file size is exactly twice of that = 10368000 byte.
The data x0 and xn are explained above in section "d)".
The second record is strictly not needed but convenient for star counting.


f) Gaia -  NOMAD data file (additional stars NOT in above 2 catalogs)
--------------------------  20.5 GB
      INTEGER*8 srcid
      INTEGER*4 rag,dcg
      INTEGER*2 gmag,rmag,jmag, pmnr,pmnd,epm

      OPEN (23,FILE=fnpmn,ACCESS='direct',RECL=38)

      READ (23,REC=nn)
     .  srcid,rag,dcg, gmag,rmag,jmag, pmnr,pmnd  ! 16+6+4 = 26 byte
     . ,epmr,epmd, nepr,nepd, nflg                !  4+4+4 = 12 byte

item   name  unit    description
-------------------------------------------------------------------------
  1    srcid         Gaia source ID 
  2    rag   mas     Gaia position RA  rounded to nearest mas
  3    dcg   mas     Gaia position Dec rounded to nearest mas
  4    gmag  mmag    Gaia G-magnitude
  5    rmag  mmag    NOMAD sky survey R magnitude
  6    jmag  mmag    2MASS J magnitude
  7    pmnr  0.1 mas/yr   PM from Gaia - NOMAD RA*cosDec
  8    pmnd  0.1 mas/yr   ... Dec
  9    epmr  0.1 mas/yr   formal error on PM RA*cosDec
 10    epmd  0.1 mas/yr   formal error on PM Dec
 11    nepr  0.01 yr      NOMAD mean epoch for RA (after 1900)
 12    nepd  0.01 yr      ... for Dec
 13    nflg          original NOMAD flag I*4 (see NOMAD catalog)
-------------------------------------------------------------------------