Next Previous Up Contents
Next: tcopy: Table Format Converter
Up: tcat: Table Concatenater
Previous: Usage

A.4.2 Examples

Here are some examples of tcopy:

stilts tcat obs1.fits obs2.fits out=combined.fits
Concatenates two similar observation catalogues to form a combined one. In this case, both input and output tables are FITS files.
stilts tcat ifmt1=ascii in1=obs1.txt ifmt2=ascii in2=ob2.txt omode=stats
Again two similar catalogues are joined, but in this case both are in ASCII format, and instead of writing the result to an output file, the resulting joined catalogue is examined to calculate its statistics, which are written to standard output.
stilts tcat in1=survey.vot.gz ifmt2=csv in2=more_data.csv
            icmd1='addskycoords fk5 galactic RA2000 DEC2000 GLON GLAT' \
            icmd1='keepcols "OBJ_ID GLON GLAT"' \
            icmd2='keepcols "ident gal_long gal_lat"' \
            omode=topcat
In this case we are trying to concatenate results from two tables which are quite dissimilar to each other. In the first place, one is a VOTable (no ifmt1 parameter is required since VOTables can be detected automatically), and the other is a comma-separated-values file (for which the ifmt2=csv parameter must be given). In the second place, the column structure of the two tables may be quite different. By pre-processing the two tables using the icmd1 & icmd2 parameters, we produce in each case an input table which consists of three columns of compatible types and meanings: an integer identifier and floating point galactic longitude and latitude coordinates. The second table contains such columns to start with, but the first table requires an initial step to convert FK5 J2000.0 coordinates to galactic ones. tcat joins the two doctored tables together, to produce a table which contains only these three columns, with all the rows from both input tables, and sends the result directly to a new or running instance of TOPCAT.


Next Previous Up Contents
Next: tcopy: Table Format Converter
Up: tcat: Table Concatenater
Previous: Usage

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