Scroll to navigation

STILTS-TAPSKYMATCH(1) Stilts commands STILTS-TAPSKYMATCH(1)

NAME

stilts-tapskymatch - Crossmatches table on sky position against TAP table

SYNOPSIS

stilts tapskymatch [ifmt=<in-format>] [istream=true|false] [in=<table>] [icmd=<cmds>] [ocmd=<cmds>] [omode=out|meta|stats|count|checksum|cgi|discard|topcat|samp|tosql|gui] [out=<out-table>] [ofmt=<out-format>] [inlon=<expr/deg>] [inlat=<expr/deg>] [tapurl=<url-value>] [interface=tap1.0|tap1.1|cap] [taptable=<name>] [taplon=<column>] [taplat=<column>] [tapcols=<colname,...>] [sr=<expr/deg>] [find=all|best|each|each-dist] [blocksize=<int-value>] [maxrec=<int-value>] [sync=true|false] [blockmaxrec=<nrow>] [compress=true|false] [fixcols=none|dups|all] [suffixin=<label>] [suffixremote=<label>]

DESCRIPTION

tapskymatch allows you to perform a positional crossmatch of a local table with one held in a remote TAP service, as long as that TAP supports upload queries. This task does three main jobs. First, it prepares the ADQL queries and TAP negotiations for you so that you don't need to remember the syntax for performing positional crossmatches against a TAP service. Second, it organises data transfer so that only those columns required (basically the positional ones) are transmitted to and from the service, to save on bandwidth. And third it divides the job up into chunks, so that the TAP service only has to perform a manageable-sized query at a time. If the job is large this chunking can be useful to monitor progress of the job, and it also allows you to perform a match which would otherwise hit the upload or output limits imposed by the service.

The positional match may be done in any spherical coordinate system, it's up to the user to ensure that the same coordinates are provided for the local and remote tables.

Note that cdsskymatch provides similar functionality by accessing a different external service, which is usually much faster; if the table you wish to match is part of the VizieR database, you may wish to use that command instead.

OPTIONS

Specifies the format of the input table as specified by parameter in. The known formats are listed in SUN/256. This flag can be used if you know what format your table is in. If it has the special value (auto) (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. This parameter is ignored for scheme-specified tables.

If set true, the input table specified by the in parameter will be read as a stream. It is necessary to give the ifmt parameter in this case. Depending on the required operations and processing mode, this may cause the read to fail (sometimes it is necessary to read the table more than once). It is not normally necessary to set this flag; in most cases the data will be streamed automatically if that is the best thing to do. However it can sometimes result in less resource usage when processing large files in certain formats (such as VOTable). This parameter is ignored for scheme-specified tables.

The location of the input table. This may take one of the following forms:

  • A filename.
  • A URL.
  • The special value "-", meaning standard input. In this case the input format must be given explicitly using the ifmt parameter. Note that not all formats can be streamed in this way.
  • A scheme specification of the form :<scheme-name>:<scheme-args>.
  • A system command line with either a "<" character at the start, or a "|" character at the end ("<syscmd" or "syscmd|"). This executes the given pipeline and reads from its standard output. This will probably only work on unix-like systems.

In any case, compressed data in one of the supported compression formats (gzip, Unix compress or bzip2) will be decompressed transparently.

Specifies processing to be performed on the input table as specified by parameter in, before any other processing has taken place. The value of this parameter is one or more of the filter commands described in SUN/256. 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.

Commands may alteratively be supplied in an external file, by using the indirection character '@'. Thus a value of "@filename" causes the file filename 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, and lines which are blank or which start with a '#' character are ignored.

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 SUN/256. 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.

Commands may alteratively be supplied in an external file, by using the indirection character '@'. Thus a value of "@filename" causes the file filename 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, and lines which are blank or which start with a '#' character are ignored.

The mode in which the result table will be output. The default mode is out, which means that the result will be written as a new table to disk or elsewhere, as determined by the out and ofmt 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 (<mode-args>) are required to determine the exact behaviour.

Possible values are

  • out
  • meta
  • stats
  • count
  • checksum
  • cgi
  • discard
  • topcat
  • samp
  • tosql
  • gui

Use the help=omode flag or see SUN/256 for more information.

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.

This parameter must only be given if omode has its default value of "out".

Specifies the format in which the output table will be written (one of the ones in SUN/256 - matching is case-insensitive and you can use just the first few letters). If it has the special value "(auto)" (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.

This parameter must only be given if omode has its default value of "out".

Longitude in degrees for the position of each row in the input table. This may simply be a column name, or it may be an algebraic expression as explained in SUN/256. The coordinate system must match that used for the coordinates in the remote table.

Longitude in degrees for the position of each row in the input table. This may simply be a column name, or it may be an algebraic expression as explained in SUN/256. The coordinate system must match that used for the coordinates in the remote table.

The base URL of a Table Access Protocol service. This is the bare URL without a trailing "/[a]sync".

In the usual case, the default values of the various endpoints (sync and async query submission, tables metadata, service-provided examples etc) use this URL as a parent and append standard sub-paths.

In some cases however, determination of the endpoints is more complicated, as determined by the interface parameter which may cause endpoints to be read from the capabilities document at tapurl/capabilities, and by other endpoint-specific parameters (syncurl, asyncurl, tablesurl, capabilitiesurl, availabilityurl, examplesurl) for fine tuning.

Defines how the service endpoints and the version of the TAP protocol to use for queries is determined. This may take one of the following (case-insensitive) values:

  • TAP1.0: The standard TAP endpoints are used, without examining the service's capabilities document. The service is queried using version 1.0 of the TAP protocol.
  • TAP1.1: The standard TAP endpoints are used, without examining the service's capabilities document. The service is queried using version 1.1 of the TAP protocol.
  • cap: The service's capabilities document is examined, and the endpoints listed there are used.

The capabilities document, if used, is read from tapurl/capabilities unless the capabilitiesurl parameter is defined, in which case that is used.

The baseline value of all the TAP service endpoints (sync, async, tables, capabilities, examples) are determined by this parameter, but each of those endpoint values may be overridden individually by other endpoint-specific parameters (syncurl, asyncurl, tablesurl, capabilitiesurl, availabilityurl, examplesurl)

For default (unauthenticated) access, the default value is usually suitable.

Name of the table in the given TAP service against which the matching will be performed.

Longitude in degrees for the position of each row in the remote table. This is an ADQL expression interpreted within the TAP service, typically just a column name. The coordinate system must match that used for the input table.

Latitude in degrees for the position of each row in the remote table. This is an ADQL expression interpreted within the TAP service, typically just a column name. The coordinate system must match that used for the input table.

Comma-separated list of column names to retrieve from the remote table. If no value is supplied (the default), all columns from the remote table will be returned.

Maximum distance in degrees from the local table (lat,lon) position at which counterparts from the remote table will be identified. This is an ADQL expression interpreted within the TAP service, so it may be a constant value or may involve columns in the remote table.

Determines which pair matches are included in the result.

  • all: All matches
  • best: Matched rows, best remote row for each input row
  • each: One row per input row, contains best remote match or blank
  • each-dist: One row per input row, column giving distance only for best match

Note only the all mode is symmetric between the two tables.

The number of rows uploaded in each TAP query. TAP services may have limits on the number of rows in a table uploaded for matching. This command can therefore break up input tables into blocks and make a number of individual TAP queries to generate the result. This parameter controls the maximum number of rows uploaded in each individual request. For an input table with fewer rows than this value, the whole thing is done as a single query.

Limit to the number of rows resulting from this operation. If the value is negative (the default) no limit is imposed. Note however that there can be truncation of the result if the number of records returned from a single chunk exceeds limits imposed by the service.

Determines whether the TAP queries are submitted in synchronous or asynchronous mode. Since this command uses chunking to keep requests to a reasonable size, hopefully requests will not take too long to execute, therefore the default is synchronous (true).

Sets the MAXREC parameter passed to the TAP service for each uploaded block. This allows you to request that the service overrides its default limit for the number of rows output from a single query. The service may still impose some "hard" limit beyond which the output row count cannot be increased.

Note this differs from the maxrec parameter, which gives the maximum total number of rows to be returned from this command.

If true, the service is requested to provide HTTP-level compression for the response stream (Accept-Encoding header is set to "gzip", see RFC 2616). This does not guarantee that compression will happen but if the service honours this request it may result in a smaller amount of network traffic at the expense of more processing on the server and client.

Determines how input columns are renamed before use in the output table. The choices are:

  • none: columns are not renamed
  • dups: columns which would otherwise have duplicate names in the output will be renamed to indicate which table they came from
  • all: all columns will be renamed to indicate which table they came from

If columns are renamed, the new ones are determined by suffix* parameters.

If the fixcols 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 the input table.

If the fixcols 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 the TAP result table.

SEE ALSO

stilts(1)

If the package stilts-doc is installed, the full documentation SUN/256 is available in HTML format:
file:///usr/share/doc/stilts/sun256/index.html

VERSION

STILTS version 3.4.9-debian

This is the Debian version of Stilts, which lack the support of some file formats and network protocols. For differences see
file:///usr/share/doc/stilts/README.Debian

AUTHOR

Mark Taylor (Bristol University)

Mar 2017