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:
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
).
stilts
command itself is introduced.
Options are:
stilts
", which will work if a
command with that name is on the execution path.
topcat -stilts
", which will work
if the topcat
command is on the path.
java
executable
is on the path.
T
" followed by the table identifier.
The identifier is the small integer shown in the table list in the
Control Window.\
")
is added at the end of each line;
suitable for bash
and other Unix-like shells.^
")
is added at the end of each line;
suitable for Windows CMD/.bat scripts.`
")
is added at the end of each line;
suitable for Windows PowerShellout=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.