Next Previous Up Contents
Next: tmulti: Writes multiple tables to a single container file
Up: tmatchn: Crossmatches multiple tables using flexible criteria
Previous: Usage

### B.38.2 Examples

Here are some examples of using `tmatchn`:

    stilts tmatchn multimode=pairs nin=4 matcher=sky params=5 \
           in1=transients.txt ifmt1=ascii values1='alpha delta' \
           in2=2mass_virgo.fits values2='ra2000 dec2000' \
           in3=sdss_virgo.fits values3='ra dec' \
           in4=first_virgo.fits values4='pos_eq_ra pos_eq_dec' \
           out=matches.xml ofmt=votable-binary

  Compares a text-format table "transients.txt" against each of three other catalogues covering the same region of sky, and outputs a table which contains a row for each row of "transients.txt" which matches (is within 5 arcsec) of an object in any of the other tables.

    stilts tmatchn multimode=pairs nin=4 matcher=sky params=5 \
           in1=transients.txt ifmt1=ascii suffix1='_t' values1='alpha delta' \
           in2=2mass_virgo.fits suffix2='_2mass' values2='ra2000 dec2000' \
           in3=sdss_virgo.fits  suffix3='_sdss'  values3='ra dec' \
           in4=first_virgo.fits suffix4='_first' values4='pos_eq_ra pos_eq_dec' \
           fixcols=all join1=always \
           ocmd='keepcols "*_t designation_2mass SDSSName_sdss id_field_first"' \
           out=matches.xml ofmt=votable-binary

  Similar to the previous example but with some doctoring of what the output table will look like. The `fixcols=all` and `suffixN` assignments mean that all the columns from the input tables will be renamed for output by adding the given suffixes. The `keepcols` filter applied to the output table throws out all the columns except the ones from the reference table (`*_t`) and one column from each of the other table giving object identifiers. This output table will probably be easier to read (though contain less information) than that from the previous example). Additionally, the `join1=always` assignment means that the output table will have one row for each row of the reference table (transients.txt), even if no matches are found for it.

    stilts tmatchn multimode=group nin=3 matcher=skyerr params=8 \
           in1=Hband.fits values1='RA DEC SEEING*2' \
           in2=Jband.fits values2='RA DEC SEEING*2' \
           in3=Kband.fits values3='RA DEC SEEING*2' \
           omode=topcat

  Performs a group-mode match. There is no reference table, so that an output row will result for each object which is represented in any two of the input catalogues. The match takes account of per-object errors equivalent to twice the recorded seeing, which is in the region of 8 arcsec. Note that this may not operate as expected if the catalogues contain multiple distinct objects too close (in comparison to the declared separation) to each other. The resulting matched table is sent directly to TOPCAT (if available).

Next Previous Up Contents
Next: tmulti: Writes multiple tables to a single container file
Up: tmatchn: Crossmatches multiple tables using flexible criteria
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
Mailing list: topcat-user@jiscmail.ac.uk