/usr/share/doc/stilts/sun256/tmatch2-usage.html is in stilts-doc 3.1.2-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 | <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="sun-style.css">
<title>Usage</title>
</head>
<body>
<hr>
<a href="secB.31.2.html">Next</a> <a href="tmatch2.html">Previous</a> <a href="tmatch2.html">Up</a> <a href="index.html">Contents</a> <br> <b>Next: </b><a href="secB.31.2.html">Examples</a><br>
<b>Up: </b><a href="tmatch2.html">tmatch2: Crossmatches 2 tables using flexible criteria</a><br>
<b>Previous: </b><a href="tmatch2.html">tmatch2: Crossmatches 2 tables using flexible criteria</a><br>
<hr>
<h3><a name="tmatch2-usage">B.31.1 Usage</a></h3>
<p>The usage of <code>tmatch2</code> is
<pre>
stilts <stilts-flags> tmatch2 ifmt1=<in-format> ifmt2=<in-format>
icmd1=<cmds> icmd2=<cmds> ocmd=<cmds>
omode=out|meta|stats|count|cgi|discard|topcat|samp|tosql|gui
out=<out-table> ofmt=<out-format>
matcher=<matcher-name> values1=<expr-list>
values2=<expr-list> params=<match-params>
tuning=<tuning-params>
join=1and2|1or2|all1|all2|1not2|2not1|1xor2
find=all|best|best1|best2
fixcols=none|dups|all suffix1=<label>
suffix2=<label> scorecol=<col-name>
progress=none|log|profile
[in1=]<table1> [in2=]<table2>
</pre>
If you don't have the <code>stilts</code> script installed,
write "<code>java -jar stilts.jar</code>" instead of
"<code>stilts</code>" - see <a href="invoke.html">Section 3</a>.
The available <code><stilts-flags></code> are listed
in <a href="stilts-flags.html">Section 2.1</a>.
For programmatic invocation, the Task class for this
command is <code>uk.ac.starlink.ttools.task.TableMatch2</code>.
</p>
<p>Parameter values are assigned on the command line
as explained in <a href="task-args.html">Section 2.3</a>.
They are as follows:
</p>
<p>
<dl>
<dt><strong><code>find = all|best|best1|best2</code> <em>(<a href="http://www.starlink.ac.uk/stil/javadocs/uk/ac/starlink/table/join/PairMode.html">PairMode</a>)</em></strong></dt>
<dd>Determines what happens when a row in one table
can be matched by more than one row in the other table.
The options are:
<ul>
<li><code>all</code>: All matches.
Every match between the two tables is included in the result.
Rows from both of the input tables may appear multiple times in the result.
</li>
<li><code>best</code>: Best match, symmetric.
The best pairs are selected in a way which treats the two tables symmetrically.
Any input row which appears in one result pair is disqualified from appearing in any
other result pair, so each row from both input tables will appear in at most one row
in the result.
</li>
<li><code>best1</code>: Best match for each Table 1 row.
For each row in table 1, only the best match from table 2 will appear in the result.
Each row from table 1 will appear a maximum of once in the result, but rows from table
2 may appear multiple times.
</li>
<li><code>best2</code>: Best match for each Table 2 row.
For each row in table 2, only the best match from table 1 will appear in the result.
Each row from table 2 will appear a maximum of once in the result, but rows from table
1 may appear multiple times.
</li>
</ul>
The differences between
<code>best</code>, <code>best1</code> and <code>best2</code> are a bit subtle.
In cases where it's obvious which object in each table
is the best match for which object in the other,
choosing betwen these options will not affect the result.
However, in crowded fields
(where the distance between objects within one or both tables is
typically similar to or smaller than the specified match radius)
it will make a difference.
In this case one of the asymmetric options
(<code>best1</code> or <code>best2</code>)
is usually more appropriate than <code>best</code>,
but you'll have to think about which of them suits your
requirements.
The performance (time and memory usage) of the match
may also differ between these options,
especially if one table is much bigger than the other.
<p>[Default: <code>best</code>]
</p>
</dd>
<dt><strong><code>fixcols = none|dups|all</code> <em>(<a href="http://andromeda.star.bris.ac.uk/starjavadocs/uk/ac/starlink/ttools/task/JoinFixActionParameter.Fixer.html">Fixer</a>)</em></strong></dt>
<dd>Determines how input columns are renamed before
use in the output table. The choices are:
<ul>
<li><code>none</code>: columns are not renamed
</li>
<li><code>dups</code>: columns which would otherwise have duplicate names in the output will be renamed
to indicate which table they came from
</li>
<li><code>all</code>: all columns will be renamed to indicate which table they came from
</li>
</ul>
If columns are renamed, the new ones are determined
by <code>suffix*</code> parameters.
<p>[Default: <code>dups</code>]
</p>
</dd>
<dt><strong><code>icmd1 = <cmds></code> <em>(<a href="http://andromeda.star.bris.ac.uk/starjavadocs/uk/ac/starlink/ttools/filter/ProcessingStep.html">ProcessingStep[]</a>)</em></strong></dt>
<dd>Specifies processing to be performed on
the first input table as specified by parameter <code>in1</code>,
before any other processing has taken place.
The value of this parameter is one or more of the filter
commands described in <a href="filterSteps.html">Section 6.1</a>.
If more than one is given, they must be separated by
semicolon characters (";").
This parameter can be repeated multiple times on the same
command line to build up a list of processing steps.
The sequence of commands given in this way
defines the processing pipeline which is performed on the table.
<p>Commands may alteratively be supplied in an external file,
by using the indirection character '@'.
Thus a value of "<code>@filename</code>"
causes the file <code>filename</code> to be read for a list
of filter commands to execute. The commands in the file
may be separated by newline characters and/or semicolons.
</p>
</dd>
<dt><strong><code>icmd2 = <cmds></code> <em>(<a href="http://andromeda.star.bris.ac.uk/starjavadocs/uk/ac/starlink/ttools/filter/ProcessingStep.html">ProcessingStep[]</a>)</em></strong></dt>
<dd>Specifies processing to be performed on
the second input table as specified by parameter <code>in2</code>,
before any other processing has taken place.
The value of this parameter is one or more of the filter
commands described in <a href="filterSteps.html">Section 6.1</a>.
If more than one is given, they must be separated by
semicolon characters (";").
This parameter can be repeated multiple times on the same
command line to build up a list of processing steps.
The sequence of commands given in this way
defines the processing pipeline which is performed on the table.
<p>Commands may alteratively be supplied in an external file,
by using the indirection character '@'.
Thus a value of "<code>@filename</code>"
causes the file <code>filename</code> to be read for a list
of filter commands to execute. The commands in the file
may be separated by newline characters and/or semicolons.
</p>
</dd>
<dt><strong><code>ifmt1 = <in-format></code> <em>(String)</em></strong></dt>
<dd>Specifies the format of the first input table as specified by parameter <code>in1</code>.
The known formats are listed in <a href="inFormats.html">Section 5.2.1</a>.
This flag can be used if you know what format your
table is in.
If it has the special value
<code>(auto)</code> (the default),
then an attempt will be
made to detect the format of the table automatically.
This cannot always be done correctly however, in which case
the program will exit with an error explaining which
formats were attempted.
<p>[Default: <code>(auto)</code>]
</p>
</dd>
<dt><strong><code>ifmt2 = <in-format></code> <em>(String)</em></strong></dt>
<dd>Specifies the format of the second input table as specified by parameter <code>in2</code>.
The known formats are listed in <a href="inFormats.html">Section 5.2.1</a>.
This flag can be used if you know what format your
table is in.
If it has the special value
<code>(auto)</code> (the default),
then an attempt will be
made to detect the format of the table automatically.
This cannot always be done correctly however, in which case
the program will exit with an error explaining which
formats were attempted.
<p>[Default: <code>(auto)</code>]
</p>
</dd>
<dt><strong><code>in1 = <table1></code> <em>(<a href="http://www.starlink.ac.uk/stil/javadocs/uk/ac/starlink/table/StarTable.html">StarTable</a>)</em></strong></dt>
<dd>The location of the first input table.
This may take one of the following forms:
<ul>
<li>A filename.</li>
<li>A URL.</li>
<li>The special value "<code>-</code>",
meaning standard input.
In this case the input format must be given explicitly
using the <code>ifmt1</code>
parameter.
Note that not all formats can be streamed in this way.
</li>
<li>A system command line with
either a "<code><</code>" character at the start,
or a "<code>|</code>" character at the end
("<code><syscmd</code>" or
"<code>syscmd|</code>").
This executes the given pipeline and reads from its
standard output.
This will probably only work on unix-like systems.
</li>
</ul>
In any case, compressed data in one of the supported compression
formats (gzip, Unix compress or bzip2) will be decompressed
transparently.
</dd>
<dt><strong><code>in2 = <table2></code> <em>(<a href="http://www.starlink.ac.uk/stil/javadocs/uk/ac/starlink/table/StarTable.html">StarTable</a>)</em></strong></dt>
<dd>The location of the second input table.
This may take one of the following forms:
<ul>
<li>A filename.</li>
<li>A URL.</li>
<li>The special value "<code>-</code>",
meaning standard input.
In this case the input format must be given explicitly
using the <code>ifmt2</code>
parameter.
Note that not all formats can be streamed in this way.
</li>
<li>A system command line with
either a "<code><</code>" character at the start,
or a "<code>|</code>" character at the end
("<code><syscmd</code>" or
"<code>syscmd|</code>").
This executes the given pipeline and reads from its
standard output.
This will probably only work on unix-like systems.
</li>
</ul>
In any case, compressed data in one of the supported compression
formats (gzip, Unix compress or bzip2) will be decompressed
transparently.
</dd>
<dt><strong><code>join = 1and2|1or2|all1|all2|1not2|2not1|1xor2</code> <em>(<a href="http://www.starlink.ac.uk/stil/javadocs/uk/ac/starlink/table/join/JoinType.html">JoinType</a>)</em></strong></dt>
<dd>Determines which rows are included in the output table.
The matching algorithm determines which of the rows from
the first table correspond to which rows from the second.
This parameter determines what to do with that information.
Perhaps the most obvious thing is to write out a table
containing only rows which correspond to a row in both of
the two input tables. However, you may also want to see
the unmatched rows from one or both input tables,
or rows present in one table but unmatched in the other,
or other possibilities.
The options are:
<ul>
<li><code>1and2</code>: An output row for each row represented in both input tables (INNER JOIN)
</li>
<li><code>1or2</code>: An output row for each row represented in either or both of the input tables (FULL
OUTER JOIN)
</li>
<li><code>all1</code>: An output row for each matched or unmatched row in table 1 (LEFT OUTER JOIN)
</li>
<li><code>all2</code>: An output row for each matched or unmatched row in table 2 (RIGHT OUTER JOIN)
</li>
<li><code>1not2</code>: An output row only for rows which appear in the first table but are not matched
in the second table
</li>
<li><code>2not1</code>: An output row only for rows which appear in the second table but are not matched
in the first table
</li>
<li><code>1xor2</code>: An output row only for rows represented in one of the input tables but not the other
one
</li>
</ul>
<p>[Default: <code>1and2</code>]
</p>
</dd>
<dt><strong><code>matcher = <matcher-name></code> <em>(<a href="http://www.starlink.ac.uk/stil/javadocs/uk/ac/starlink/table/join/MatchEngine.html">MatchEngine</a>)</em></strong></dt>
<dd>Defines the nature of the matching that will be performed.
Depending on the name supplied, this may be positional
matching using celestial or Cartesian coordinates,
exact matching on the value of a string column,
or other things.
A list and explanation of the available matching algorithms
is given in <a href="MatchEngine.html">Section 7.1</a>.
The value supplied for this parameter determines the meanings
of the values required by the
<code>params</code>,
<code>values*</code> and
<code>tuning</code>
parameter(s).
<p>[Default: <code>sky</code>]
</p>
</dd>
<dt><strong><code>ocmd = <cmds></code> <em>(<a href="http://andromeda.star.bris.ac.uk/starjavadocs/uk/ac/starlink/ttools/filter/ProcessingStep.html">ProcessingStep[]</a>)</em></strong></dt>
<dd>Specifies processing to be performed on
the output table,
after all other processing has taken place.
The value of this parameter is one or more of the filter
commands described in <a href="filterSteps.html">Section 6.1</a>.
If more than one is given, they must be separated by
semicolon characters (";").
This parameter can be repeated multiple times on the same
command line to build up a list of processing steps.
The sequence of commands given in this way
defines the processing pipeline which is performed on the table.
<p>Commands may alteratively be supplied in an external file,
by using the indirection character '@'.
Thus a value of "<code>@filename</code>"
causes the file <code>filename</code> to be read for a list
of filter commands to execute. The commands in the file
may be separated by newline characters and/or semicolons.
</p>
</dd>
<dt><strong><code>ofmt = <out-format></code> <em>(String)</em></strong></dt>
<dd>Specifies the format in which the output table will be written
(one of the ones in <a href="outFormats.html">Section 5.2.2</a> - matching is
case-insensitive and you can use just the first few letters).
If it has the special value
"<code>(auto)</code>"
(the default),
then the output filename will be
examined to try to guess what sort of file is required
usually by looking at the extension.
If it's not obvious from the filename what output format is
intended, an error will result.
<p>This parameter must only be given if
<code>omode</code>
has its default value of "<code>out</code>".
</p>
<p>[Default: <code>(auto)</code>]
</p>
</dd>
<dt><strong><code>omode = out|meta|stats|count|cgi|discard|topcat|samp|tosql|gui</code> <em>(<a href="http://andromeda.star.bris.ac.uk/starjavadocs/uk/ac/starlink/ttools/mode/ProcessingMode.html">ProcessingMode</a>)</em></strong></dt>
<dd>The mode in which the result table will be output.
The default mode is <code>out</code>, which means that
the result will be written as a new table to disk or elsewhere,
as determined by the <code>out</code> and <code>ofmt</code>
parameters.
However, there are other possibilities, which correspond
to uses to which a table can be put other than outputting it,
such as displaying metadata, calculating statistics,
or populating a table in an SQL database.
For some values of this parameter, additional parameters
(<code><mode-args></code>)
are required to determine the exact behaviour.
<p>Possible values are
<ul>
<li><code>out</code></li>
<li><code>meta</code></li>
<li><code>stats</code></li>
<li><code>count</code></li>
<li><code>cgi</code></li>
<li><code>discard</code></li>
<li><code>topcat</code></li>
<li><code>samp</code></li>
<li><code>tosql</code></li>
<li><code>gui</code></li>
</ul>
Use the <code>help=omode</code> flag
or see <a href="outModes.html">Section 6.4</a> for more information.
</p>
<p>[Default: <code>out</code>]
</p>
</dd>
<dt><strong><code>out = <out-table></code> <em>(<a href="http://andromeda.star.bris.ac.uk/starjavadocs/uk/ac/starlink/ttools/TableConsumer.html">TableConsumer</a>)</em></strong></dt>
<dd>The location of the output table. This is usually a filename
to write to.
If it is equal to the special value "-" (the default)
the output table will be written to standard output.
<p>This parameter must only be given if
<code>omode</code>
has its default value of "<code>out</code>".
</p>
<p>[Default: <code>-</code>]
</p>
</dd>
<dt><strong><code>params = <match-params></code> <em>(String[])</em></strong></dt>
<dd>Determines the parameters of this match.
This is typically one or more tolerances such as error radii.
It may contain zero or more values; the values that are
required depend on the match type selected by the
<code>matcher</code> parameter.
If it contains multiple values, they must be separated by spaces;
values which contain a space can be 'quoted' or "quoted".
</dd>
<dt><strong><code>progress = none|log|profile</code> <em>(String)</em></strong></dt>
<dd>Determines whether information on progress of the match
should be output to the standard error stream as it progresses.
For lengthy matches this is a useful reassurance and can give
guidance about how much longer it will take.
It can also be useful as a performance diagnostic.
<p>The options are:
<ul>
<li><code>none</code>:
no progress is shown
</li>
<li><code>log</code>:
progress information is shown
</li>
<li><code>profile</code>:
progress information and limited time/memory profiling
information are shown
</li>
</ul>
</p>
<p>[Default: <code>log</code>]
</p>
</dd>
<dt><strong><code>scorecol = <col-name></code> <em>(String)</em></strong></dt>
<dd>Gives the name of a column in the output table to contain
the "match score" for each pairwise match.
The meaning of this column is dependent on the chosen
<code>matcher</code>,
but it typically represents a distance of some kind between
the two matching points.
If a null value is chosen, no score column will be inserted
in the output table.
The default value of this parameter depends on
<code>matcher</code>.
<p>[Default: <code>Score</code>]
</p>
</dd>
<dt><strong><code>suffix1 = <label></code> <em>(String)</em></strong></dt>
<dd>If the <code>fixcols</code> parameter
is set so that input columns are renamed for insertion into
the output table, this parameter determines how the
renaming is done.
It gives a suffix which is appended to all renamed columns
from table 1.
<p>[Default: <code>_1</code>]
</p>
</dd>
<dt><strong><code>suffix2 = <label></code> <em>(String)</em></strong></dt>
<dd>If the <code>fixcols</code> parameter
is set so that input columns are renamed for insertion into
the output table, this parameter determines how the
renaming is done.
It gives a suffix which is appended to all renamed columns
from table 2.
<p>[Default: <code>_2</code>]
</p>
</dd>
<dt><strong><code>tuning = <tuning-params></code> <em>(String[])</em></strong></dt>
<dd>Tuning values for the matching process, if appropriate.
It may contain zero or more values; the values that are
permitted depend on the match type selected by the
<code>matcher</code> parameter.
If it contains multiple values, they must be separated by spaces;
values which contain a space can be 'quoted' or "quoted".
If this optional parameter is not supplied, sensible defaults
will be chosen.
</dd>
<dt><strong><code>values1 = <expr-list></code> <em>(String[])</em></strong></dt>
<dd>Defines the values from
table 1
which are used to determine whether a match has occurred.
These will typically be coordinate values such as RA and Dec
and perhaps some per-row error values as well, though exactly
what values are required is determined by the kind of match
as determined by <code>matcher</code>.
Depending on the kind of match, the number and type of
the values required will be different.
Multiple values should be separated by whitespace;
if whitespace occurs within a single value it must be
'quoted' or "quoted".
Elements of the expression list are commonly just column
names, but may be algebraic expressions calculated from
zero or more columns as explained in <a href="jel.html">Section 10</a>.
</dd>
<dt><strong><code>values2 = <expr-list></code> <em>(String[])</em></strong></dt>
<dd>Defines the values from
table 2
which are used to determine whether a match has occurred.
These will typically be coordinate values such as RA and Dec
and perhaps some per-row error values as well, though exactly
what values are required is determined by the kind of match
as determined by <code>matcher</code>.
Depending on the kind of match, the number and type of
the values required will be different.
Multiple values should be separated by whitespace;
if whitespace occurs within a single value it must be
'quoted' or "quoted".
Elements of the expression list are commonly just column
names, but may be algebraic expressions calculated from
zero or more columns as explained in <a href="jel.html">Section 10</a>.
</dd>
</dl>
</p>
<hr><a href="secB.31.2.html">Next</a> <a href="tmatch2.html">Previous</a> <a href="tmatch2.html">Up</a> <a href="index.html">Contents</a> <br> <b>Next: </b><a href="secB.31.2.html">Examples</a><br>
<b>Up: </b><a href="tmatch2.html">tmatch2: Crossmatches 2 tables using flexible criteria</a><br>
<b>Previous: </b><a href="tmatch2.html">tmatch2: Crossmatches 2 tables using flexible criteria</a><br>
<hr><i>STILTS - Starlink Tables Infrastructure Library Tool Set<br>Starlink User Note256<br>STILTS web page:
<a href="http://www.starlink.ac.uk/stilts/">http://www.starlink.ac.uk/stilts/</a><br>Author email:
<a href="mailto:m.b.taylor@bristol.ac.uk">m.b.taylor@bristol.ac.uk</a><br>Mailing list:
<a href="mailto:topcat-user@jiscmail.ac.uk">topcat-user@jiscmail.ac.uk</a><br></i></body>
</html>
|