HTML automatically generated with rman
Table of Contents

Name

table - (ASCII) table format

Description

A table file is a simple ASCII text file, structured in rows and columns, with one row per line. Columns can be separated by spaces or tabs (though many dialects of this definition exist). The number of columns per row does not have to be the same, as long as the columns accessed are in the specified range (although some programs, e.g. tablint(1NEMO) may put restrictions on this).

Comments can be entered by using the octothorpe (’#’) symbol on the first character on a line (though again, many dialects exist, most notably the exclamation, semi-colon and backslash (IPAC tables) symbols are in practice. Empty lines will generally be skipped too, and as said, some programs even skip lines starting with the ! or ; symbol. See also tabcomment(1NEMO) for some other filtering techniques.

Example

The following listing is an example of a simple table:
    # This is the first line of the table
    # I    N     Q
    1.0   2.0   4.0
    # 2.0 3.0   5.0     bad data, commented out.
    3.0   5.1   6.32
    # End of table
    
Here is an example how to make a table from scratch. It contains one column, with numbers 1 through 100:
    nemoinp 1:100 newline=t > 100.tab

Other Table Formats

Another popular table format is that of ESO/Midas, where all columns are separated by TABs. The unix program paste(1) will generally put a TAB between the columns.

FITS uses the ’TABLE’ (ascii tables) and BINTABLE (binary tables) format.

IPAC-table format: (often using the extension .tbl)

\HISTORY some history on the data processing
\HISTORY infile=data3.fits
\char Comment This table contains parameters for calibrating science data.
\char INSTRUME = ’MIPS’
\int CHNLNUM = 2
\char Index = ’counter for row entry’
\char fluxconv    = ’conversion factors from DN/sec to microJy/arcsec^(2)’
\char errfluxconv = ’uncertainties for fluxconv’
\char gain        = ’gain values’
\char latcoeff    = ’latent coupling coefficients’
\char inconst     = ’incomprehensible parity constants’
\HISTORY tune=54
|Index |fluxconv  |errfluxconv |gain    |latcoeff |inconst |
|int   |double    |double      |double  |double   |real    |
|      |Jy/K      |Jy/K        |        | K       |cm      |
 1      1.34       0.05         5.34     3.14      1.21
 2      1.54       0.04         4.23     3.21      1.71
 3      1.41       0.03         4.67     3.54      1.31
 4      1.78       0.08         5.21     3.45      1.54

AstroRES is the format that preceded VOTable, and is an XML-based header, with ascii formatted data. E.g. the <DATA> portion of the data can sometimes be read via tabcomment:

<DATA><CSV colsep="|" headlines="2" ><![CDATA[
   _r |  GSC-id  |RA2000 |DE2000  |Err|Bmag|Err|m
arcmin|----------|deg    |deg   |arcsrc|mag|mag|
0.0146|0430201297|00 13 00.93|+72 31 19.9|3.6|8.59|0.20|0
0.9704|0430200545|00 12 50.07|+72 30 48.2|0.2|12.18|0.34|0
0.9730|0430200545|00 12 50.04|+72 30 48.1|0.2|12.09|0.20|0
1.5843|0430202363|00 12 44.05|+72 30 22.6|0.2|14.38|0.34|0
2.8586|0430200269|00 12 33.10|+72 29 22.6|0.3|14.96|0.20|3
2.9198|0430200153|00 13 24.64|+72 33 38.3|0.2|12.89|0.20|0
2.9215|0430200153|00 13 24.66|+72 33 38.4|0.2|13.06|0.34|0
3.0487|0430202336|00 12 53.35|+72 34 18.7|0.2|14.38|0.34|0
3.2247|0430200121|00 13 36.48|+72 29 30.2|0.2|12.39|0.21|0
3.2269|0430200121|00 13 36.46|+72 29 29.8|0.2|12.50|0.34|0
]]></CSV></DATA>
</TABLE>

The starbase format (http://tdc-www.harvard.edu/software/catalogs/starbase/starbase.5.html) also uses a TAB to separate columns, and uses a simple header to name the columns, example:

RA    Dec
--    ---
0:0:0    0:0:0
12:00    -30.0
15    60:00:30.4

The ECVS (Enhanced Character Separated Values) is extension to the generic ascii table format, except it has a commented YAML header encoding the units, and one extra annoying row with column names:

# %ECSV 0.9
# ---
# datatype:
# - {name: a, unit: m / s, datatype: int64, format: ’%03d’}
# - {name: b, unit: km, datatype: int64, description: This is column b}
a b
001 2
004 3

See Also

nemoinp(1NEMO) , tabcomment(1NEMO) , table(3NEMO) , awk(1) , paste(1) , ffe(1) , column(1)

FFE: (flat file extractor): http://ff-extractor.sourceforge.net/

ECSV: https://github.com/astropy/astropy-APEs/blob/master/APE6.rst

Author

Peter Teuben

Update History


1-feb-93    document created      PJT
25-oct-03    some more docs on other table formats    PJT


Table of Contents