Index 5000
----------

These were created from the Gaia-DR2 catalogs.

I only created scales 00 through 07, because at scale 07, the majority
of the stars in the catalog are brighter than G=12, meaning that Gaia
is no longer complete, while Tycho-2 is 90% complete at V=11.5; you
would be better to use Tycho-2 (ie, index-4100) for scales 08 through
20.

RA,Dec positions are the straight Gaia positions -- so, in the J2000
reference frame, at the position at the epoch of observation
(~2015.5).

The catalogs include the Gaia proper motions and parallaxes:

HDU #14  Binary Table:  13 columns x N rows
   NAME             FORMAT
   source_id        1K
   phot_g_mean_mag  1E
   phot_bp_mean_mag 1E
   phot_rp_mean_mag 1E
   parallax         1E
   parallax_error   1E
   pmra             1E
   pmra_error       1E
   pmdec            1E
   pmdec_error      1E
   ra               1D
   dec              1D
   ref_epoch        1E

They were created like this:

for ((s=0; s<2; s++)); do
    S=$(printf %02d $s);
    for ((i=0; i<12; i++)); do
      I=$(printf %02d $i);
      build-astrometry-index -i $CSCRATCH/gaia-dr2-healpixed-48/gaia-dr2-hp$I.fits -o $CSCRATCH/gaia-dr2-index/index-50$S-$I.fits -P $s -S phot_g_mean_mag -H $i -s 2 -r 1 -L 16 -I 50$S -K &
    done
    wait
done

etc.

The healpixed files were created like:

hpsplit -o $CSCRATCH/gaia-dr2-healpixed-48/gaia-dr2-hp%02i.fits -n 2 -m 1 -c source_id -c phot_g_mean_mag -c phot_bp_mean_mag -c phot_rp_mean_mag -c parallax -c parallax_error -c pmra -c pmra_error -c pmdec -c pmdec_error -c ra -c dec -c ref_epoch ~/cosmo/work/gaia/chunks-gaia-dr2-astrom/chunk*.fits > 48.log 2>&1 &


