-------------
CONTENTS
-------------

4 IDL programs are provided:
     query_irsa_cat.pro   --  query IRSA catalogs from the IDL command line (returns a structure)
     read_ipac_table.pro  --  read an IPAC table from a file into IDL (returns a structure)
     read_ipac_var.pro    --  read an IPAC table from an internal IDL variable (returns a structure) - used by query_irsa_cat.pro
     write_ipac_table.pro --  write an IDL structure into an IPAC ascii table file

-------------
INSTALLATION REQUIREMENTS
-------------

To query IRSA catalogs, query_irsa_cat.pro uses IDLnetURL.

--- Latest IDLASTRO

Make sure you have the latest versions and that they are in your IDL
path, see:

http://idlastro.gsfc.nasa.gov/contents.html

--- Programs in PATH

Put the programs in the IDL path.

-------------
QUERY EXAMPLE
-------------

IDL> .run read_ipac_var.pro,query_irsa_cat.pro
IDL> info = query_irsa_cat([71.95248,29.41979], catalog='allwise_p3as_psd', radius=30, radunits='arcsec', table_col_info=t1, table_hdr=h1)

QUERY_IRSA_CAT.pro performs a query of a catalog in the IRSA holdings.
The example shows a query of the AllWISE Source Catalog (the default
is to query the 2MASS Point Source Catalog, 'fp_psc').  It returns an
IDL structure containing the data of the downloaded table. If
"outfile" is present, it will write the incoming table to a file.
This can be slow, so only do so if needed.

Queries can by made by RA,Dec or by object name (resolved by NED
or SIMBAD).  The radius of the search may be specified; the default
units are arcsec.

In order to query other IRSA catalogs, the program needs to know
the identifier string for the IRSA Program Interface.  The complete
list of current catalogs (with the needed string) is available in 
XML format at

https://irsa.ipac.caltech.edu/cgi-bin/Gator/nph-scan?mode=xml

or as an IPAC Table (ascii) at

https://irsa.ipac.caltech.edu/cgi-bin/Gator/nph-scan?mode=ascii

The identifier string needed for the IDL program is the "catname"
column of the table.

OUTPUTS:

info - IDL array structure with the data.  The structure
       tag names are taken from the column names, with possible
       changes needed by IDL.  

table_col_info - A structure with table column headers.

table_hdr - A string array with comments and keywords.

See the comments at the top of query_irsa_cat.pro for further details.

Notes on usage for the other programs are in the file comments.
