Next Previous Up Contents
Next: tcatn: Concatenates multiple tables
Up: tcat: Concatenates multiple similar tables
Previous: Usage

A.5.2 Examples

Here are some examples of tcat:

stilts tcat ifmt=ascii in=t1.txt in=t2.txt in=t3.txt out=table.txt
Concatenates the three named ASCII format tables to produce an output table. All three must have compatible numbers and types of columns.
stilts tcat ifmt=ascii in="t1.txt t2.txt t3.txt" out=table.txt
Has exactly the same effect as the previous example.
stilts tcat ifmt=ascii in=@inlist out=table.txt
This will have the same effect as the previous two examples if a file name "inlist" in the current directory contains three lines, "t1.txt", "t2.txt" and "t3.txt".
stilts tcat in=r368776.fits#1 in=r368776#2 in=r368776.fits#3 in=r368776.fits#4
            out=r368776_all.fits icmd=progress seqcol=ID
Concatenates the contents of four tables (the first four extension HDUs) from a multi-extension FITS file to produce a single FITS table. Progress through each of the input files is reported to the console. An additional column "ID" will be appended to the output which contains 1 for all the rows from the first input table, 2 for the rows from the second one and so on. Many Unix shells (csh, bash) will allow you to list the input files using the following shorthand: "in=r368776.fits#{1,2,3,4}".
stilts tcat in='rA.csv rB.csv rC.csv' ifmt=csv \
            icmd='keepcols "RA DEC FLUX"' icmd='sorthead 10 FLUX' \
            ocmd='sort FLUX'
Takes the 10 rows with highest FLUX values from each of three input tables (in comma-separated value format) and joins them together to produce a 30-row output table. This is then sorted in FLUX order, and the resulting table is output to the console in text format. Only the columns RA, DEC and FLUX are output; any other columns are discarded. The input tables don't need to have identical forms to each other, but each must have at least an RA, DEC and FLUX column.


Next Previous Up Contents
Next: tcatn: Concatenates multiple tables
Up: tcat: Concatenates multiple similar tables
Previous: Usage

STILTS - Starlink Tables Infrastructure Library Tool Set
Starlink User Note256
STILTS web page: http://www.starlink.ac.uk/stilts/
Author email: m.b.taylor@bristol.ac.uk