- NAME
READ_IPAC_TABLE
- PURPOSE
Read an IPAC ascii table from a file into IDL structures
- EXPLANATION
Reads an IPAC ascii table from a file into IDL structures. The
definition of an IPAC-format table is currently here:
https://irsa.ipac.caltech.edu/applications/DDGEN/Doc/ipac_tbl.html
- CALLING SEQUENCE
info = read_ipac_table(filename, table_col_info=table_col_info,
table_hdr=table_hdr, [change_null=change_null, /debug])
- INPUTS
FILENAME -- string giving the file with the input IPAC ascii table
- OPTIONAL INPUT
CHANGE_NULL -- an integer value to be used when the IPAC table
has a non-numeric string for null values in an
integer column. The default is -9999. (For
real numbers, the nulls will go automatically to
'NaN'.)
DEBUG -- enables some debugging statements
- OUTPUTS
info - IDL array structure with the data. The structure
tag names are taken from the column names, with possible
changes needed by IDL.
If the table is not valid, or contains no data, the function returns a value of -1
table_col_info - A structure with table column headers
in tags starting with "HEADER": HEADER_Col_Names,
HEADER_Col_Names_Orig, HEADER_Col_Types_Orig, and,
if present, HEADER_Data_Units and HEADER_Null_Values.
table_hdr - A string array with whatever comment and keyword
lines precede the column headers.
- PROCEDURES USED
VALID_NUM
- MODIFICATION HISTORY
Written by H. Teplitz, IPAC September 2010
Allow long integer, convert blanks in numeric fields to null
value - T. Brooke, IPAC May 2011
Allow 64bit long; use valid_num to check - TYB June 2013
Report readfile, free luns, default null str to "null" - TYB Jan 2016
Re-do structures to separate out the data - TYB Aug 2017