Next Previous Up Contents
Next: Control Window
Up: Common Window Features
Previous: Column Selector

### A.1.5 STILTS Window

The STILTS button () available in several windows opens a window displaying the command you would have to issue to the STILTS package to replicate the action of the current window. Its text is continually updated to reflect the current state of the window.

STILTS window for the CDS Upload X-Match window

STILTS is a command-line interface to much of the same functionality that TOPCAT provides from a Graphical User Interface. It is fully documented in its manual, but if you don't want to read that, you can set up the action you want in a TOPCAT window, hit the STILTS button, and copy/paste the displayed text into the shell or a script. Depending on configuration, the command may end with a parameter setting like "`out=result.fits`", which writes the result to the named file. You can change the filename, remove that parameter setting to display the results directly to standard output, or replace it with settings to postprocess the results using the extensive pipeline processing offered by STILTS.

TOPCAT itself contains the STILTS application, so you don't need to install any additional software to use it. You can run it by adding the "`-stilts`" flag to a topcat command, or on a Unix-like OS use the `stilts` script. If you don't already have it, you can download `stilts` to the directory containing your TOPCAT jar file; see also SUN/256. The Invocation formatting menu options described below can also help.

The STILTS window button is currently available from the following windows: Match, TAP, CDS Upload X-Match, and single cone, SIA, SSA and multiple cone, SIA, SSA windows. All the Plot windows have similar functionality from their STILTS Control component.

NOTE: The STILTS command displayed in this panel is not guaranteed to work from the command line. There are a few reasons for this. The STILTS command tries to name the tables you have loaded into TOPCAT. If they have straightforward filenames this will probably work, but if a plotted table is for example the result of a match operation carried out in the current session, it will not exist on disk yet so it can't be named on the command line. Similarly, using the names of columns or non-algebraic Row Subsets created during the current session may result in command lines that won't work as written, since those values don't exist in the input files. Constructions that may cause trouble are flagged with text in blue, and ones that almost certainly won't work are written in red. In this case you can prepare a table corresponding to the current TOPCAT state, save that, and edit the STILTS command to use the name of that file for input (or you can reload the file and adjust the window to use that one). Subsets as such cannot be saved in this way, but you can achieve much the same thing by storing subset information in a boolean column using the To Column action () from the Subsets Window. Note STILTS does not understand TOPCAT's saved session format. There may also be bugs in the (rather complex) command-generation code that cause the command to fail. Hopefully there are not too many of these, but if you find one please report it.

The following actions are available in the toolbar:

Update
  Updates the displayed text to match the current state of the window. It is normally not necessary to use this action since the text is generally updated whenever something in the window changes, but in case they get out of sync this will ensure that the text is up to date.
Copy
  Copy the displayed text to the system clipboard so it can be pasted elsewhere. You can alternatively copy the text using the mouse or whatever is the normal way for your platform.
Help for Command
  Opens documentation for the particular STILTS command displayed in a web browser. Note this displays documentation for the most recent public release, so it's not guaranteed to match parameter settings for the version of STILTS that you have installed.
Show Error
  If a problem is detected in the displayed command, this button will be enabled, and clicking on it will show more detail about why the command is expected to fail. If the command appears to be in good order, this button is disabled.

The Formatting menu controls details of how the command is laid out. Some of these options are cosmetic, and some may need to be changed according to your shell syntax (the default roughly corresponds to `bash`).

Invocation
  Determines how the `stilts` command itself is introduced. Options are:
  - stilts: Just the word "`stilts`", which will work if a command with that name is on the execution path.
  - topcat: The expression "`topcat -stilts`", which will work if the `topcat` command is on the path.
  - Class-path: A longer expression based on the location of the java class files that the currently running TOPCAT application is using. This should work as along as a `java` executable is on the path.
Table Names
  Determines how tables in TOPCAT are referenced in the generated command line. Options are:
  - Pathname: Full pathname of the input table file, where available. Should be fairly robust for tables loaded from files or, in most cases, URLs.
  - Filename: Tail of filename only (no directory name) of the input table file, where available. More compact than Pathname, and should work if the STILTS command is executed in the directory in which all files exist.
  - Label: User-assigned label for the table, as shown in the Control Window.
  - TNum: "`T`" followed by the table identifier. The identifier is the small integer shown in the table list in the Control Window.
Line Endings
  STILTS commands can be quite long and are usually displayed over several screen lines. This control configures how lines breaks are displayed. Options are:
  - plain: just a new line character terminates lines
  - backslash: a backslash ("`\`") is added at the end of each line; suitable for `bash` and other Unix-like shells.
  - caret: a caret ("`^`") is added at the end of each line; suitable for Windows CMD/.bat scripts.
  - backtick: a backtick ("```") is added at the end of each line; suitable for Windows PowerShell
  - none: the command is displayed as one long line
Indent
  Configures the amount of whitespace by which groups of related lines are indented.
Include Defaults
  Parameters in STILTS commands usually have default values, and if the required values are equal to the defaults, those can be omitted from the command line. By default, parameters which take their default values are not displayed in this window. But if you set this checkbox true, even parameters taking their default values are displayed as well. Default-valued parameters are shown in a fainter colour than non-default ones. This may give you a better idea of the various options which are available for the current command.
Suggest Output File
  If true, then where applicable a parameter something like "`out=results.fits`" is added to the invocation. This isn't necessary (without it the table will be written to standard output), but it may make it more obvious how to use the command.

Next Previous Up Contents
Next: Control Window
Up: Common Window Features
Previous: Column Selector

TOPCAT - Tool for OPerations on Catalogues And Tables
Starlink User Note253
TOPCAT web page: http://www.starlink.ac.uk/topcat/
Author email: m.b.taylor@bristol.ac.uk
Mailing list: topcat-user@jiscmail.ac.uk