Making the 2MASS Extended Source Catalog Usable

WCSTools Catalogs
  1. Download all of the gzipped files containing the catalog from in the /pub/2mass/allsky directory. There will be a total of 42,672,321,835 bytes in 2 files.
       $ ftp
       Name ( anonymous
       331 Guest login ok, send your complete e-mail address as password.
       Password: your email address
       > cd /pub/2mass/allsky
       > prompt
       > bin
       > mget xsc_*.gz
        . . .
       > quit

  2. Modify tmxcat.c to put the 2MASS Extended Source Catalog structure where you want it to be by changing the value of the variable "root", and compile the program. It is self-contained C.

  3. gzcat the two compressed files through the program tmxcat to produce 180 directories, each containing sources from 1 degree of declination. They are named from 000-179 for their angular south polar distance (SPD) in degrees), In each of these directories there are 10 RA-sorted files named t000[0-9].cat. The 1800 files contain a total of 11,533,193 bytes of data.
    	gzcat xsc_*.gz | tmxcat

    A file called resort contains all those files where a single object was read out of RA order. You could only sort the files in this file, but there might be some cases with multiple sequential files out of order that would have been missed, so it is recommended that all files be resorted.

  4. List all of the resulting files.
         ls [root]/*/* > filelist

  5. Run the simple nawk script tmcsort to RA-sort all of the catalog files.
        tmcsort filelist

  6. In libwcs/tmcread.c, change tmxpath to value of "root".

  7. Remake WCSTools