TOPCAT Manual
TOPCAT Manual
11/18/14, 17:34
Contents
Abstract
1 Introduction
2 Quick Start Guide
3 Apparent Table
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 1 of 255
11/18/14, 17:34
Page 2 of 255
11/18/14, 17:34
Page 3 of 255
11/18/14, 17:34
Page 4 of 255
11/18/14, 17:34
Page 5 of 255
11/18/14, 17:34
B.1.8 Maths
B.1.9 Arrays
B.1.10 Fluxes
B.1.11 Strings
B.1.12 Formats
B.1.13 CoordsRadians
B.1.14 Coverage
B.1.15 CoordsDegrees
B.2 Activation Functions
B.2.1 Browsers
B.2.2 Mgc
B.2.3 System
B.2.4 Sdss
B.2.5 SuperCosmos
B.2.6 BasicImageDisplay
B.2.7 TwoQZ
B.2.8 Image
B.2.9 Output
B.2.10 Sog
C Release Notes
C.1 Acknowledgements
C.2 Version History
Abstract
TOPCAT is an interactive graphical viewer and editor for tabular data. It has been designed for use with astronomical tables such as object
catalogues, but is not restricted to astronomical applications. It understands a number of different astronomically important formats, and
more formats can be added. It is designed to cope well with large tables; a million rows by a hundred columns should not present a problem
even with modest memory and CPU resources.
It offers a variety of ways to view and analyse the data, including a browser for the cell data themselves, viewers for information about table
and column metadata, tools for joining tables using flexible matching algorithms, and extensive 2- and 3-d visualisation facilities. Using a
powerful and extensible Java-based expression language new columns can be defined and row subsets selected for separate analysis.
Selecting a row can be configured to trigger an action, for instance displaying an image of the catalogue object in an external viewer. Table
data and metadata can be edited and the resulting modified table can be written out in a wide range of output formats.
A number of options are provided for loading data from external sources, including Virtual Observatory (VO) services, thus providing a
gateway to many remote archives of astronomical data. It can also interoperate with other desktop tools using the SAMP protocol.
TOPCAT is written in pure Java and is available under the GNU General Public Licence. Its underlying table processing facilities are
provided by STIL, the Starlink Tables Infrastructure Library.
1 Introduction
TOPCAT is an interactive graphical program which can examine, analyse, combine, edit and write out tables. A table is, roughly, something
with columns and rows; each column contains objects of the same type (for instance floating point numbers) and each row has an entry for
each of the columns (though some entries might be blank). A common astronomical example of a table is an object catalogue.
TOPCAT can read in tables in a number of formats from various sources, allow you to inspect and manipulate them in various ways, and if
you have edited them optionally write them out in the modified state for later use, again in a variety of formats. Here is a summary of its
main capabilities:
View/edit table data in a scrollable browser
View/edit table metadata (parameters)
View/edit column metadata (column names, units, UCDs...)
Re-order and hide/reveal columns
Insert 'synthetic' columns defined by algebraic expression
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 6 of 255
11/18/14, 17:34
Load/Save/Send Table(s).
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 7 of 255
11/18/14, 17:34
Display various aspects of information about the table's data and metadata.
Open plotting/visualisation windows of various kinds.
Join tables in various ways including spatial crossmatching, and access remote databases.
Help and information
The Help (
) button appears in most windows - if you click it a help browser will be displayed showing an appropriate part of this
manual. As well as the tool bar there are a number of menus along the top - some of the options just repeat those appearing on the toolbar,
but several less common ones are available as well. The Help menu gives you a few more options along the same lines, including displaying
the help information in your usual web browser rather than in TOPCAT's (somewhat scrappy) help viewer. All the windows follow roughly
this pattern. For some of the toolbar buttons you can probably guess what they do from their icons, for others probably not - to find out you
can hover with the mouse to see the tooltip, look in the menus, read the manual, or just push it and see.
Some of the windows allow you to make changes of various sorts to the tables, such as performing sorts, selecting rows, modifying data or
metadata. None of these affect the table on disk (or database, or wherever), but if you subsequently save the table the changes will be
reflected in the table that you save.
A notable point to bear in mind concerns memory. TOPCAT is fairly efficient in use of memory, but in some cases when dealing with large
tables you might see an OutOfMemoryError. It is usually possible to work round this by using the -XmxNNNM flag on startup - see Section
10.2.2.
Finally, if you have queries, comments or requests about the software, and they don't appear to be addressed in the manual, consult the
TOPCAT web page, use the topcat-user mailing list, or contact the author - user feedback is always welcome.
3 Apparent Table
The Apparent Table is a particular view of a table which can be influenced by some of the viewing controls.
When you load a table into TOPCAT it has a number of characteristics like the number of columns and rows it contains, the order of the
rows that make up the data, the data and metadata themselves, and so on. While manipulating it you can modify the way that the table
appears to the program, by changing or adding data or metadata, or changing the order or selection of columns or rows that are visible. For
each table its "apparent table" is a table which corresponds to the current state of the table according to the changes that you have made.
In detail, the apparent table consists of the table as it was originally imported into the program plus any of the following changes that you
have made:
Selection of rows changed by changing the current Row Subset
Changes to the current Row Order caused by doing a sort
Changes to the current Column Set caused by adding, hiding or moving columns
Changes to cell data by editing cells in the Data window
Changes to table metadata by editing cells in the Parameter window
Changes to column metadata by editing cells in the Columns window
The apparent table is used in the following contexts:
Data Window
The Data window always shows the rows and columns of the apparent table, so if you are in doubt about what form a table will get
exported in, you can see what it looks like there.
Exports
When you save a table, or export it by dragging it off the Table List panel in the Control Window, or create a duplicate table, it is the
apparent table which is copied. So for instance if you define a subset containing only the first ten rows of a table and then save it to a
new table, or create a duplicate within TOPCAT using the Duplicate Table (
) toolbar button, the resulting table will contain only
those ten rows.
Joins
When you use the Match Window or Concatenation Window to construct a new table on the basis of one or more existing ones, the
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 8 of 255
11/18/14, 17:34
new table will be built on the basis of the apparent versions of the tables being operated on. The same applies to the join-like
functionality provided by table uploads in the TAP window, CDS Upload X-Match window and the multiple positional search (Cone,
SIA, SSA) windows.
Some of the other table view windows are affected too, for instance the Columns window displays its columns in the order that they appear
in the Apparent Table.
) button will pop up the Algebraic Subset Window which allows you to
define a new subset using an algebraic expression based on the values of the cells in each row. The format of such expressions is
described in Section 7.
Visible plotted points
In some of the plotting (and old-style plotting) windows you can plot columns against each other, and subsequently zoom in and out
using the mouse. If you zoom to display only some of the plotted points and then use the New Subset From Visible (
or
)
button then a new subset will be created containing only rows represented by points in the field of view of the plot at the time.
Selected plotted points
For more control over which plotted points are to be included in a subset, you can use the Draw Subset Region (
) button in some
of the plotting windows. This allows you to trace out with the mouse a region or regions of any shape, creating a new subset
containing only those rows represented by the points within those regions.
Boolean columns
Any column which has a boolean (true/false) type value can be used as a subset; rows in which it has a true value are in the subset and
others are not. Any boolean column in a table is made available as a row subset with the same name when the table is imported.
In all these cases you will be asked to assign a name for the subset. As with column names, it is a good idea to follow a few rules for these
names so that they can be used in algebraic expressions. They should be:
Distinct from other subset and column names, even apart from upper/lower case distinctions
In the form of a java identifier (starts with a letter, continues with alphanumerics including underscore, no spaces)
Not too long
When you choose a name, you can either type one in, or select one from the drop-down list, which gives the names of all the existing
subsets. This allows you to redefine existing subsets. Note if you do select or type in one of the existing names, any previous content of that
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 9 of 255
11/18/14, 17:34
) button in the toolbar or menu. Note when selecting rows, don't drag the mouse over the Visible column, do it
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 10 of 255
Synthetic (
11/18/14, 17:34
) button. This is similar to the Add a Synthetic Column described in the previous item, but it pops up a new column
dialogue with similar characteristics (name, units etc) to those of the column that's being replaced, and when completed it slots the
new column in to the table hiding the old one.
Add a Subset Column
If you have defined a Row Subset somehow and you want it to appear explicitly in the table (for instance so that when you write the
table out the selection is saved) you can select that subset in the Subsets Window and use the To Column (
) button, which will add
a new boolean column to the table with the value true for rows part of that subset and false for the other rows.
4 Table I/O
4.1 Table Formats
TOPCAT supports a wide variety of tabular data formats. In most cases these are file formats for tables stored as single files on a disk or at
the end of a URL, but there are other possibilities, for instance a table you have opened could be the result of an SQL query on a database.
Since you can load a table from one format and save it in a different one, TOPCAT can be used to convert a table from one format to another.
If this is all you want to do however, you may find it more convenient to use the tcopy command line utility in the STILTS package.
The format handling is extensible, so new formats can be added fairly easily. All the table input/output is handled by STIL, the Starlink
Tables Infrastructure Library; more detailed descriptions of the I/O capabilities can be found in its documentation.
The following subsections describe the available formats for reading and writing tables. The two operations are separate, so not all the
supported input formats have matching output formats and vice versa.
4.1.1 Supported Input Formats
Loading tables into TOPCAT is done either from the command line when you start the program up or using the Load Table dialogue. For
FITS, VOTable, CDF and GBIN formats the file format can be detected automatically (note this is done by looking at the file content, it has
nothing to do with filename extensions). For other formats though, for instance ASCII or Comma-Separated Values, you will have to specify
the format that the file is in. In the Load Window, there is a selection box from which you can choose the format, and from the command line
you use the -f flag - see Section 10 for details. You can always specify the format rather than using automatic detection if you prefer - this
can be a good idea if a table appears to be failing to load in a surprising way, since it may give you a more detailed error message.
In either case, table locations may be given as filenames or as URLs, and any data compression (gzip, unix compress and bzip2) will be
automatically detected and dealt with - see Section 4.2.
Note: in some earlier versions of TOPCAT, ASCII format tables could be detected automatically, so you could load them by typing
something like "topcat table.txt". In the current version, you have to signal that this is an ASCII table, for instance by typing "topcat f ascii table.txt".
The following sections describe the table formats which TOPCAT can read.
4.1.1.1 FITS
FITS binary and ASCII table extensions can be read. Normally, TOPCAT will load all TABLE or BINTABLE extensions in a given file.
If only a single extension is required from a multi-extension FITS file, this is indicated by giving an identifier after a '#' at the end of the
table location. The identifier can be in one of two forms:
The numeric index of the HDU. The first extension (first HDU after the primary HDU) is numbered 1. Thus in a compressed FITS
table named "spec23.fits.gz" with one primary HDU and two BINTABLE extensions, you would view the first one using the name
"spec23.fits.gz" or "spec23.fits.gz#1" and the second one using the name "spec23.fits.gz#2". The suffix "#0" is never used for a legal
FITS file, since the primary HDU cannot contain a table.
The name of the extension. This is the value of the EXTNAME header in the HDU, or alternatively the value of EXTNAME followed
by "-" followed by the value of EXTVER. This follows the recommendation in the FITS standard that EXTNAME and EXTVER
headers can be used to identify an HDU. So in a multi-extension FITS file "cat.fits" where a table extension has
EXTNAME='UV_DATA' and EXTVER=1, it could be referenced as "cat.fits#UV_DATA" or "cat.fits#UV_DATA-1". Matching of
these names is case-insensitive.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 11 of 255
11/18/14, 17:34
You can select which extension to use interactively if you use the Hierarchy Browser to load the table.
If the table has been written using TOPCAT's "fits-plus" output format (see Section 4.1.2.1) then the metadata will be read in from the
primary HDU as well.
For normal FITS files, header cards in the table's HDU header will be made available as table parameters (see Appendix A.3.2). Only header
cards which are not used to specify the table format itself are visible as parameters (e.g. NAXIS, TTYPE* etc cards are not). HISTORY and
COMMENT cards are run together as one multi-line value.
If the table is stored in a FITS binary table extension in a file on local disk in uncompressed form, then the table is 'mapped' into memory this generally means fast loading and low memory use.
4.1.1.2 Column-oriented FITS
As well as normal binary and ASCII FITS tables, STIL supports FITS files which contain tabular data stored in column-oriented format.
This means that the table is stored in a BINTABLE extension HDU, but that BINTABLE has a single row, with each cell of that row holding
a whole column's worth of data. The final (slowest-varying) dimension of each of these cells (declared via the TDIMn header cards) is the
same, namely, the number of rows in the table that is represented. The point of this is that all the cells of a given column are stored
contiguously, which for very large, and especially very wide tables means that certain access patterns (basically, ones which access only a
small proportion of the columns in a table) can be much more efficient since they require less I/O overhead in reading data blocks.
Such tables are perfectly legal FITS files, but most non-STIL software will probably not recognise them as tables in the usual way. This
format is mostly intended for the case where you have a large table in some other format (possibly the result of an SQL query) and you wish
to cache it in a way which can be read efficiently by a STIL-based application.
Like normal FITS, two variants are supported; with (colfits-plus) and without (colfits-basic) metadata stored as a VOTable byte array
in the primary HDU.
Colfits format is only available for data which stored as an uncompressed file in the file system (not, for instance, from a URL).
4.1.1.3 VOTable
VOTable is an XML-based format for tabular data endorsed by the International Virtual Observatory Alliance; while the tabular data which
can be encoded is by design close to what FITS allows, it provides for much richer encoding of structure and metadata. TOPCAT is believed
to read any table which conforms to the VOTable 1.0, 1.1, 1.2 or 1.3 specifications. This includes tables in which the cell data are included
in-line as XML elements (VOTable/TABLEDATA format), or included/referenced as a FITS table (VOTable/FITS) or included/referenced as
a raw binary stream (VOTable/BINARY or VOTable/BINARY2). TOPCAT does not attempt to be fussy about input VOTable documents,
and it will have a good go at reading VOTables which violate the standards in various ways.
VOTable documents can have a complicated hierarchical structure, and may contain more than one actual table (TABLE element). Normally,
TOPCAT will load all tables it finds in the document. If you just want to load a single table, indicate the zero-based index of the TABLE
element in a breadth-first search after a '#' character at the end of the table specification. Here is an example VOTable document:
<VOTABLE>
<RESOURCE>
<TABLE name="Star Catalogue"> ... </TABLE>
<TABLE name="Galaxy Catalogue"> ... </TABLE>
</RESOURCE>
</VOTABLE>
If this is available in a file named "cats.xml" then loading the document in the usual way from the filestore browser or command line will
open two new tables in TOPCAT. If you just want the Star Catalogue or the Galaxy Catalogue you can use the name "cats.xml#0" or
"cats.xml#1" respectively.
4.1.1.4 CDF
NASA's Common Data Format, described at http://cdf.gsfc.nasa.gov/, is a binary format for storing self-describing data. It is typically used
to store tabular data for subject areas like space and solar physics. Since v4.0-1 TOPCAT is capable of reading CDF files, though it can't
write them. Currently, no attempt is made to represent values representing times in a human-friendly fashion. This may change in future
releases.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 12 of 255
11/18/14, 17:34
4.1.1.5 ASCII
In many cases tables are stored in some sort of unstructured plain text format, with cells separated by spaces or some other delimiters. There
is a wide variety of such formats depending on what delimiters are used, how columns are identified, whether blank values are permitted and
so on. It is impossible to cope with them all, but TOPCAT attempts to make a good guess about how to interpret a given ASCII file as a
table, which in many cases is successful. In particular, if you just have columns of numbers separated by something that looks like spaces,
you should be just fine.
Here are the detailed rules for how the ASCII-format tables are interpreted:
Bytes in the file are interpreted as ASCII characters
Each table row is represented by a single line of text
Lines are terminated by one or more contiguous line termination characters: line feed (0x0A) or carriage return (0x0D)
Within a line, fields are separated by one or more whitespace characters: space (" ") or tab (0x09)
A field is either an unquoted sequence of non-whitespace characters, or a sequence of non-newline characters between matching single
(') or double (") quote characters - spaces are therefore allowed in quoted fields
Within a quoted field, whitespace characters are permitted and are treated literally
Within a quoted field, any character preceded by a backslash character ("\") is treated literally. This allows quote characters to appear
within a quoted string.
An empty quoted string (two adjacent quotes) or the string "null" (unquoted) represents the null value
All data lines must contain the same number of fields (this is the number of columns in the table)
The data type of a column is guessed according to the fields that appear in the table. If all the fields in one column can be parsed as
integers (or null values), then that column will turn into an integer-type column. The types that are tried, in order of preference, are:
Boolean, Short Integer, Long, Float, Double, String
Some special values are permitted for floating point columns: NaN for not-a-number, which is treated the same as a null value for most
purposes, and Infinity or inf for infinity (with or without a preceding +/- sign). These values are matched case-insensitively.
Empty lines are ignored
Anything after a hash character "#" (except one in a quoted string) on a line is ignored as far as table data goes; any line which starts
with a "!" is also ignored. However, lines which start with a "#" or "!" at the start of the table (before any data lines) will be interpreted
as metadata as follows:
The last "#"/"!"-starting line before the first data line may contain the column names. If it has the same number of fields as there
are columns in the table, each field will be taken to be the title of the corresponding column. Otherwise, it will be taken as a
normal comment line.
Any comment lines before the first data line not covered by the above will be concatenated to form the "description" parameter
of the table.
If the list of rules above looks frightening, don't worry, in many cases it ought to make sense of a table without you having to read the small
print. Here is an example of a suitable ASCII-format table:
#
# Here is a list of some
#
# RECNO SPECIES
1
pig
2
cow
3
goldfish
4
ant
5
ant
6
ant
7
"queen ant"
8
human
animals.
NAME
LEGS
"Pigling Bland" 4
Daisy
4
Dobbin
""
""
6
""
6
''
6
'Ma\'am'
6
"Mark"
2
HEIGHT/m
0.8
2
0.05
0.001
0.001
0.001
2e-3
1.8
Type
---Short
String
String
Short
Float
It will also use the text "Here is a list of some animals" as the Description parameter of the table. Without any of the comment lines, it
would still interpret the table, but the columns would be given the names col1..col5.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 13 of 255
11/18/14, 17:34
If you understand the format of your files but they don't exactly match the criteria above, the best thing is probably to write a simple freestanding program or script which will convert them into the format described here. You may find Perl or awk suitable languages for this sort
of thing.
This format is not detected automatically - you must specify that you wish to load a table in ascii format.
4.1.1.6 IPAC
CalTech's Infrared Processing and Analysis Center use a text-based format for storage of tabular data, defined at
http://irsa.ipac.caltech.edu/applications/DDGEN/Doc/ipac_tbl.html. Tables can store column name, type, units and null values, as well as
table parameters. They typically have a filename extension ".tbl" and are used for Spitzer data amongst other things. An example looks like
this:
\title='Animals'
\ This is a table with some animals in it.
|
RECNO |
SPECIES |
NAME |
|
char |
char |
char |
|
|
|
|
|
|
|
null |
1
pig
Pigling Bland
2
cow
Daisy
3
goldfish
Dobbin
4
ant
null
LEGS | HEIGHT
|
int | double
|
| m
|
|
|
4
0.8
4
2
0
0.05
6
0.001
Page 14 of 255
11/18/14, 17:34
subversion repository.
Suppose you have the MDBExplorerStandalone.jar file mentioned above, you can do it by starting TOPCAT like this:
topcat -classpath MDBExplorerStandalone.jar
or like this:
java -classpath topcat-full.jar:MDBExplorerStandalone.jar uk.ac.starlink.topcat.Driver
Note you will need to be using whatever version of java is required by GaiaTools, probably java 7.
The GBIN format is recognised automatically, so you do not need to explicitly set the file type when loading GBIN files.
The GBIN format doesn't really store tables, it stores arrays of java objects, so the input handler has to make some decisions about how to
flatten these into table rows. It basically looks for public instance methods of the form getXxx() and uses the Xxx as column names. If the
corresponding values are themselves objects with suitable getter methods, those objects are added as new columns instead. This more or less
follows the practice of the gaia.cu1.tools.util.GbinInterogator/gbcat tool. Method names are sorted alphabetically. Arrays of
complex objects are not handled well, and various other things may trip it up. See the source code (e.g.
uk.ac.starlink.gbin.GbinTableProfile) for more details.
Note that support for GBIN files is somewhat experimental. Please contact the author (who is not a GBIN expert) if it doesn't seem to be
working properly or you think it should do things differently.
4.1.1.9 Tab-Separated Table
Tab-Separated Table, or TST, is a text-based table format used by a number of astronomical tools including Starlink's GAIA and ESO's
SkyCat on which it is based. A definition of the format can be found in Starlink Software Note 75. The implementation here ignores all
comment lines: special comments such as the "#column-units:" are not processed.
An example looks like this:
Simple TST example; stellar photometry catalogue.
A.C. Davenhall (Edinburgh) 26/7/00.
Catalogue of U,B,V colours.
UBV photometry from Mount Pumpkin Observatory,
see Sage, Rosemary and Thyme (1988).
# Start of parameter definitions.
EQUINOX: J2000.0
EPOCH: J1996.35
id_col: -1
ra_col: 0
dec_col: 1
# End of parameter definitions.
ra<tab>dec<tab>V<tab>B_V<tab>U_B
--<tab>---<tab>-<tab>---<tab>--5:09:08.7<tab> -8:45:15<tab> 4.27<tab>
5:07:50.9<tab> -5:05:11<tab> 2.79<tab>
5:01:26.3<tab> -7:10:26<tab> 4.81<tab>
5:17:36.3<tab> -6:50:40<tab> 3.60<tab>
[EOD]
-0.19<tab>
+0.13<tab>
-0.19<tab>
-0.11<tab>
-0.90
+0.10
-0.74
-0.47
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 15 of 255
11/18/14, 17:34
The exact form is dependent on the driver. Here is an example for MySQL:
jdbc:mysql://localhost/astro1?user=mbt#SELECT ra, dec FROM swaa WHERE vmag<18
which would get a two-column table (the columns being "ra" and "dec"), constructed from certain rows from the table "swaa" in the database
"astro1" on the local host, using the access privileges of user mbt.
Fortunately you don't have to construct this by hand, there is an SQL Query Dialogue to assist in putting it together.
Note that TOPCAT does not view a table in the database directly, but the result of an SQL query on that table. If you want to view the whole
table you can use the query
SELECT * FROM table-name
67
32
Support for WDC tables is experimental (does the format still exist?) - it may not be very robust.
This format is not detected automatically - you must specify that you wish to load a table in wdc format.
4.1.2 Supported Output Formats
Writing out tables from TOPCAT is done using the Save Table Window. In general you have to specify the format in which you want the
table to be output by selecting from the Save Window's Table Output Format selector; the following sections describe the possible choices.
In some cases there are variants within each format - these are described as well.
The program has no "native" file format, but if you have no particular preference about which format to save tables to, FITS is a good
choice. Uncompressed FITS tables do not in most cases have to be read all the way through (they are 'mapped' into memory), which makes
them very fast to load up. The FITS format which is written by default (also known as "FITS-plus") also uses a trick to store extra metadata,
such as table parameters and UCDs in a way TOPCAT can read in again later (see Section 4.1.2.1). These files are quite usable as normal
FITS tables by other applications, but they will only be able to see the limited metadata stored in the FITS headers. For very large files, in
some circumstances column-oriented FITS ("colfits") format can be more efficient for some applications, though this is unlikely to be
understood except by STIL-based code (TOPCAT and STILTS). If you want to write to a format which retains all metadata in a portable
format, then one of the Section 4.1.2.3 formats might be better.
4.1.2.1 FITS
When saving in FITS format a new file is written consisting of two HDUs (Header+Data Units): a primary one (required by the FITS
standard), and a single extension of type BINTABLE containing the table data.
There are two variants of this format:
fits-basic
The primary HDU contains only very minimal headers and no data.
fits-plus
The primary HDU contains an array of bytes which stores the full table metadata as the text of a VOTable document, along with
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 16 of 255
11/18/14, 17:34
headers that mark this has been done. Most FITS table readers will ignore this altogether and treat the file just as if it contained only
the table. When TOPCAT (or other STIL-based applications) read it however, they read out the metadata and make it available for use.
In this way you can store your data in the efficient and widely portable FITS format without losing the additional metadata such as
table parameters, column UCDs, lengthy column descriptions etc that may be attached to the table. Other, more standard schemes exist
for combining the benefits of FITS and VOTable, but suffer from some disadvantages: votable-fits-inline is hard to process
efficiently (in particular the data cannot easily be mapped into memory) and votable-fits-href requires that you keep your data in
two separate files, which can get separated from each other. If you want to ensure that the metadata are available to other VOTableaware programs, you should use one of the normal VOTable formats.
In general, you can just let TOPCAT detect the format automatically and not worry about which of these variants is being used - if fitsplus is being used you just get some hidden benefits.
4.1.2.2 Column-oriented FITS
When saving in column-oriented FITS format a new file is written consisting of two HDUs (Header+Data Units); a primary one (required by
the FITS standard) and a single extension of type BINTABLE containing the table data. Unlike normal FITS format however, this table
consists of a single row in which each cell holds the data for an entire column. This can be a more efficient format to work with when
dealing with very large, and especially very wide, tables. The benefits are greatest when the file size exceeds the amount of available
physical memory and operations are required which scan through the table using only a few of the columns (much of TOPCAT's operations,
for instance plotting two columns against each other, fit into this category). The overhead for reading and writing this format is somewhat
higher than for normal FITS however, and other applications may not be able to work with it (though it is a legal FITS file), so in most cases
normal FITS is a more suitable choice.
Like normal (row-oriented) FITS (see Section 4.1.2.1), there are two variants:
colfits-plus
The primary HDU contains an array of bytes which stores the table metadata in VOTable format.
colfits-basic
The primary HDU contains no data.
4.1.2.3 VOTable
When a table is saved to VOTable format, a document conforming to the VOTable specification containing a single TABLE element within a
single RESOURCE element is written. The version of the VOTable specification according to which the output is written can be controlled
using the votable.version system property.
There are a number of variants which determine the form in which the table data (DATA element) is written:
votable-tabledata
TABLEDATA element (pure XML)
votable-binary-inline
BINARY element containing base64-encoded data within the document
votable-fits-href
FITS element containing a reference to an external newly-written FITS file (with a name derived from that of the VOTable document)
votable-binary-href
BINARY element containing a reference to an external newly-written binary file (with a name derived from that of the VOTable
document)
votable-fits-inline
FITS element containing base64-encoded data within the document
See the VOTable specification for more explanation of what these variants mean. They can all be read by the VOTable input handler.
If VOTable 1.3 output is in force, the *-binary-* options will be replaced by *-binary2-*.
4.1.2.4 ASCII
Tables can be written using a format which is compatible with the ASCII input format. It writes as plainly as possible, so should stand a
good chance of being comprehensible to other programs which require some sort of plain text rendition of a table.
The first line is a comment (starting with a "#" character) which names the columns, and an attempt is made to line up data in columns using
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 17 of 255
11/18/14, 17:34
Species
pig
cow
goldfish
ant
ant
human
Name
Bland
Daisy
Dobbin
""
""
Mark
Legs
4
4
0
6
6
2
Height
0.8
2.0
0.05
0.0010
0.0010
1.9
Mammal
true
true
false
false
false
true
4.1.2.5 Text
Tables can be written to a simple text-based format which is designed to be read by humans. No reader exists for this format.
Here is an example of a short table written in this format:
+-------+----------+--------+------+--------+--------+
| index | Species | Name
| Legs | Height | Mammal |
+-------+----------+--------+------+--------+--------+
| 1
| pig
| Bland | 4
| 0.8
| true
|
| 2
| cow
| Daisy | 4
| 2.0
| true
|
| 3
| goldfish | Dobbin | 0
| 0.05
| false |
| 4
| ant
|
| 6
| 0.0010 | false |
| 5
| ant
|
| 6
| 0.0010 | false |
| 6
| human
| Mark
| 2
| 1.9
| true
|
+-------+----------+--------+------+--------+--------+
The exact form is dependent on the driver. Here is an example for MySQL:
jdbc:mysql://localhost/astro1?user=mbt#newtab
which would write the current contents of the browser into a new table named "newtab" in the database "astro1" on the local host with the
access privileges of user mbt.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 18 of 255
11/18/14, 17:34
Fortunately you do not have to construct this URL by hand, there is an SQL dialogue box to assist in putting it together.
Use of SQL queries requires some additional configuration of TOPCAT; see Section 10.3.
4.1.2.10 HTML
A table can be written out as an HTML 4.01 TABLE element, suitable for use as a web page or insertion into one.
There are two variants:
HTML
A freestanding HTML document, complete with HTML, HEAD and BODY tags is output.
HTML-element
Only the TABLE element representing the table is output; this should normally be embedded in a larger HTML document before use.
4.1.2.11 LaTeX
A table can be written out as a LaTeX tabular environment, suitable for insertion into a document intended for publication.
There are two variants:
LaTeX
The tabular element alone is output; this will have to be embedded in a larger LaTeX document before use.
LaTeX-document
A freestanding LaTeX document, consisting of the tabular within a table within a document is output.
Obviously, this isn't so suitable for very large tables.
4.1.2.12 Mirage Format
Mirage is a powerful standalone java tool developed at Bell Labs for analysis of multidimensional data. It uses its own file format for input.
TOPCAT can write tables in the input format which Mirage uses, so that you can prepare tables in TOPCAT and write them out for
subsequent use by Mirage.
It is also possible in principle to launch Mirage directly from within TOPCAT, using the Export To Mirage item on the Control Window's
File menu; this will cause Mirage to start up viewing the currently selected Apparent Table. In order for this to work the Mirage classes must
be on your classpath (see Section 10.2.1) when TOPCAT is run.
There appears to be a bug in Mirage which means this does not always work - sometimes Mirage starts up with no data loaded into it. In this
case you will have to save the data to disk in Mirage format, start up Mirage separately, and load the data in using the New Dataset item in
Mirage's Console menu.
Note that when Mirage has been launched from TOPCAT, exiting Mirage or closing its window will exit TOPCAT as well.
4.1.3 Custom I/O Formats
It is in principle possible to configure TOPCAT to work with table file formats other than the ones listed in this section. It does not require
any upgrade of TOPCAT itself, but you have to write or otherwise acquire an input and/or output handler for the table format in question.
The steps that you need to take are:
1. Write java classes which constitute your input and/or output handler
2. Ensure that these classes are available on your classpath while TOPCAT is running (see Section 10.2.1)
3. Set the startable.readers and/or startable.writers system property to the name of the handler classes (see Section 10.2.3)
Explaining how to write such handlers is beyond the scope of this document - see the user document and javadocs for STIL.
Page 19 of 255
11/18/14, 17:34
to click on a filename or directory to indicate the load/save location. However in some cases, for instance specifying tables on the command
line (Section 10.1) or typing pathnames directly into the load/save dialogue windows, you may want give the location of a table for input or
output using only a single string.
Most of the time you will just want to type in a filename; either an absolute or relative pathname can be used. However, TOPCAT also
supports direct use of URLs, including ones using some specialised protocols. Here is the list of URL types allowed:
http:
Read from local files; not particularly useful since you can do much the same using just the filename.
jar:
Specialised protocol for looking inside Java Archive files - see JarURLConnection documentation.
myspace:
Accesses files in the AstroGrid "MySpace" virtual file store. These URLs look something like "myspace:/survey/iras_psc.xml",
and can access files in the myspace are that the user is currently logged into. These URLs can be used for both input and output of
tables. To use them you must have an AstroGrid account and the AstroGrid WorkBench or similar must be running; if you're not
currently logged in a dialogue will pop up to ask you for name and password.
ivo:
Understands ivo-type URLs which signify files in the AstroGrid "MySpace" virtual file store. These URLs look something like
"ivo://uk.ac.le.star/filemanager#node-2583". These URLs can be used for both input and output of tables. To use them you
must have an AstroGrid account and the AstroGrid WorkBench or similar must be running; if you're not currently logged in a dialogue
will pop up to ask you for name and password.
jdbc:
Used for communicating with SQL-compliant relational databases. These are a bit different to normal URLs - see Section 4.1.1.10 and
Section 4.1.2.9.
As with the GUI-based load dialogues, data compression in any of the supported formats (gzip, bzip2, Unix compress) is detected and dealt
with automatically for input locations.
RA
-168.63
210.75
194.13
RA2000
DEC2000
Dec
--55.03
54.375
21.700
Name
---Owl Nebula
Pinwheel Galaxy
Black Eye Galaxy
and
ID
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 20 of 255
-----185.6
186.3
------58.08
18.20
11/18/14, 17:34
-M40
M85
RA
-168.63
210.75
194.13
185.6
183.6
Dec
--55.03
54.375
21.700
58.08
18.20
Name
---Owl Nebula
Pinwheel Galaxy
Black Eye Galaxy
Of course it is the user's responsibility to ensure that the correspondance of columns is sensible (that the two corresponding columns mean
the same thing).
You can perform a concatenation using the Concatenation Window; obtain this using the Concatenate Tables (
Window.
Ypos
---599.247
1046.874
543.293
Vmag
---13.8
17.2
9.3
x
909.523
1832.114
1135.201
702.622
y
543.800
409.567
600.100
1004.972
Bmag
---10.1
12.3
14.6
19.0
and
and we wish to combine them to create one new catalogue with a row for each object which appears in both tables. To do this, you have to
specify what counts as a match - in this case let's say that a row in one table matches (refers to the same object as) a row in the other if the
distance between the positions indicated by their X and Y coordinates matches to within one unit (sqrt((Xpos-x)2 + (Ypos-y)2)<=1)). Then
the catalogue we will end up with is:
Xpos
---1134.822
909.613
Ypos
---599.247
543.293
Vmag
---13.8
9.3
x
1135.201
909.523
y
600.100
543.800
Bmag
---14.6
10.1
There are a number of variations on this however - your match criteria might involve sky coordinates instead of Cartesian ones (or not be
physical coordinates at all), you might want to match more than two tables, you might want to identify groups of matching objects in a single
table, you might want the output to include rows which don't match as well...
The Match Window allows you to specify
Which tables are to be matched
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 21 of 255
11/18/14, 17:34
) button in the Control Window; to match more tables than two at once, use the other options
Page 22 of 255
11/18/14, 17:34
If you click the OK button, it will simply dismiss the dialogue. However, if you click the Plot Result button, a new plot window will appear
with all the points from the input catalogues and pair links (lines between the joined positions) for the joined rows. The result is something
like this:
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 23 of 255
11/18/14, 17:34
The basic algorithm for matching is based on dividing up the space of possibly-matching rows into an (indeterminate) number of bins. These
bins will typically correspond to disjoint cells of a physical or notional coordinate space, but need not do so. In the first step, each row of
each table is assessed to determine which bins might contain matches to it - this will generally be the bin that it falls into and any "adjacent"
bins within a distance corresponding to the matching tolerance. A reference to the row is associated with each such bin. In the second step,
each bin is examined, and if two or more rows are associated with it every possible pair of rows in the associated set is assessed to see
whether it does in fact constitute a matched pair. This will identify all and only those row pairs which are related according to the selected
match criteria. During this process a number of optimisations may be applied depending on the details of the data and the requested match.
The matching algorithm described above is roughly an O(N log(N)) process, where N is the total number of rows in all the tables
participating in a match. This is good news, since the naive interpretation would be O(N2). This can break down however if the matching
tolerance is such that the number of rows associated with some or most bins gets large, in which case an O(M2) component can come to
dominate, where M is the number of rows per bin. The average number of rows per bin is reported in the logging while a match is
proceeding, so you can keep an eye on this.
For more detail on the matching algorithms, see the javadocs for the uk.ac.starlink.table.join package, or contact the author.
Select the registry to query for services (or use the default one)
Query that registry for services of interest
From the returned list of services, select one that you wish to query for data
Specify the query to send to the data service
Start the query and wait for the result
These ideas are explained in more detail in the following subsections. The windows from which this is done are documented in Appendix
A.9.
Note: For information on SAMP or PLASTIC, which are protocols developed within the Virtual Observatory context, but are not necessarily
concerned with remote data access, see Section 9.
Page 24 of 255
11/18/14, 17:34
To define a new column in terms of existing columns in the Synthetic Column dialogue
To define a new Row Subset on the basis of table data in the Algebraic Subset dialogue
To define a custom Activation Action in the Activation dialogue.
When faced with a column selector for plotting or other purposes, in some cases you can type in an expression rather than selecting or
typing a simple column name.
This is a powerful feature which permits you to manipulate and select table data in very flexible ways - you can think of it like a sort of
column-oriented spreadsheet. The syntax for entering these expressions is explained in this section.
What you write are actually expressions in the Java language, which are compiled into Java bytecode before evaluation. However, this does
not mean that you need to be a Java programmer to write them. The syntax is pretty similar to C, but even if you've never programmed in C
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 25 of 255
11/18/14, 17:34
most simple things, and some complicated ones, are quite intuitive.
The following explanation gives some guidance and examples for writing these expressions. Unfortunately a complete tutorial on writing
Java is beyond the scope of this document, but it should provide enough information for even a novice to write useful expressions.
The expressions that you can write are basically any function of all the column values and subset inclusion flags which apply to a given row;
the function result can then define the per-row value of a new column, or the inclusion flag for a new subset, or the action to be performed
when a row is activated by clicking on it. If the built-in operators and functions are not sufficient, or it's unwieldy to express your function in
one line of code, you can add new functions by writing your own classes - see Section 7.9.
Note: if Java is running in an environment with certain security restrictions (a security manager which does not permit creation of custom
class loaders) then algebraic expressions won't work at all, and the buttons which allow you to enter them will be disabled.
The value of this is the current row number in the unsorted table (the first row is 1). This is the value seen in the grey numbers at the
left of the grid in the Data Window). You can alternatively use the form $0. (The form index is also permitted, but deprecated). Note
that this value is a long (8-byte integer); when using it in certain expressions you may find it necessary to convert it to an int (4-byte
integer) using the toInteger() function.
The value of the variables so referenced will be a primitive (boolean, byte, short, char, int, long, float, double) if the column contains one of
the corresponding types. Otherwise it will be an Object of the type held by the column, for instance a String. In practice this means: you can
write the name of a column, and it will evaluate to the numeric (or string) value that that column contains in each row. You can then use this
in normal algebraic expressions such as "B_MAG-U_MAG" as you'd expect.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 26 of 255
11/18/14, 17:34
Page 27 of 255
11/18/14, 17:34
To test whether a column contains a null value, prepend the string "NULL_" (use upper case) to the column name or $ID. This will yield
a boolean value which is true if the column contains a blank or a floating point NaN (not-a-number) value, and false otherwise.
Returning null
To return a null value from a numeric expression, use the name "NULL" (upper case). To return a null value from a non-numeric
expression (e.g. a String column) use the name "null" (lower case).
Null values are often used in conjunction with the conditional operator, "? :"; the expression
test ? tval : fval
returns the value tval if the boolean expression test evaluates true, or fval if test evaluates false. So for instance the following
expression:
Vmag == -99 ? NULL : Vmag
can be used to define a new column which has the same value as the Vmag column for most values, but if Vmag has the "magic" value -99
the new column will contain a blank. The opposite trick (substituting a blank value with a magic one) can be done like this:
NULL_Vmag ? -99 : Vmag
7.5 Operators
The operators are pretty much the same as in the C language. The common ones are:
Arithmetic
+
*
/
%
(add)
(subtract)
(multiply)
(divide)
(modulus)
Logical
! (not)
&& (and)
|| (or)
^ (exclusive-or)
== (numeric identity)
!= (numeric non-identity)
< (less than)
> (greater than)
<= (less than or equal)
>= (greater than or equal)
Bitwise
& (and)
| (or)
^ (exclusive-or)
<< (left shift)
>> (right shift)
>>> (logical right
shift)
Numeric Typecasts
(byte) (numeric -> signed byte)
(short) (numeric -> 2-byte integer)
(int) (numeric -> 4-byte integer)
(long) (numeric -> 8-byte integer)
(float) (numeric -> 4-byte floating point)
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 28 of 255
(double)
11/18/14, 17:34
Note you may find the numeric conversion functions in the Maths class described in Appendix B.1 below more convenient for
numeric conversions than these.
Other
+ (string concatenation)
[] (array dereferencing - first element
?: (conditional switch)
instanceof (class membership)
is zero)
7.6 Functions
Many functions are available for use within your expressions, covering standard mathematical and trigonometric functions, arithmetic utility
functions, type conversions, and some more specialised astronomical ones. You can use them in just the way you'd expect, by using the
function name (unlike column names, this is case-sensitive) followed by comma-separated arguments in brackets, so
max(IMAG,JMAG)
will give you the larger of the values in the columns IMAG and JMAG, and so on.
The functions are grouped into the following classes:
Tilings
Pixel tiling functions for the celestial sphere.
Arithmetic
Standard arithmetic functions including things like rounding, sign manipulation, and maximum/minimum functions.
Conversions
Functions for converting between strings and numeric values.
Distances
Functions for converting between different measures of cosmological distance.
The following parameters are used:
z: redshift
H0: Hubble constant in km/sec/Mpc (example value ~70)
omegaM: Density ratio of the universe (example value 0.3)
omegaLambda: Normalised cosmological constant (example value 0.7)
For a flat universe, omegaM+omegaLambda=1
The terms and formulae used here are taken from the paper by D.W.Hogg, Distance measures in cosmology, astro-ph/9905116 v4
(2000).
KCorrections
Functions for calculating K-corrections.
Times
Functions for conversion of time values between various forms. The forms used are
Modified Julian Date (MJD)
A continuous measure in days since midnight at the start of 17 November 1858. Based on UTC.
ISO 8601
A string representation of the form yyyy-mm-ddThh:mm:ss.s, where the T is a literal character (a space character may be used
instead). Based on UTC.
Julian Epoch
A continuous measure based on a Julian year of exactly 365.25 days. For approximate purposes this resembles the fractional
number of years AD represented by the date. Sometimes (but not here) represented by prefixing a 'J'; J2000.0 is defined as 2000
January 1.5 in the TT timescale.
Besselian Epoch
A continuous measure based on a tropical year of about 365.2422 days. For approximate purposes this resembles the fractional
number of years AD represented by the date. Sometimes (but not here) represented by prefixing a 'B'.
Decimal Year
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 29 of 255
11/18/14, 17:34
Fractional number of years AD represented by the date. 2000.0, or equivalently 1999.99recurring, is midnight at the start of the
first of January 2000. Because of leap years, the size of a unit depends on what year it is in.
Therefore midday on the 25th of October 2004 is 2004-10-25T12:00:00 in ISO 8601 format, 53303.5 as an MJD value, 2004.81588
as a Julian Epoch and 2004.81726 as a Besselian Epoch.
Currently this implementation cannot be relied upon to better than a millisecond.
TrigDegrees
Standard trigonometric functions with angles in degrees.
Maths
Standard mathematical and trigonometric functions. Trigonometric functions work with angles in radians.
Arrays
Functions which perform aggregating operations on array-valued cells. The functions in this class such as mean, sum, maximum etc can
only be used on values which are already arrays. In most cases that means on values in table columns which are declared as arrayvalued. FITS and VOTable tables can have columns which contain array values, but other formats such as CSV cannot.
There is also a set of functions named array with various numbers of arguments, which let you assemble an array value from a list of
scalar numbers. This can be used for instance to get the mean of a set of three magnitudes by using an expression like
"mean(array(jmag, hmag, kmag))".
Fluxes
Functions for conversion between flux and magnitude values. Functions are provided for conversion between flux in Janskys and AB
magnitudes.
Some constants for approximate conversions between different magnitude scales are also provided:
Constants JOHNSON_AB_*, for Johnson <-> AB magnitude conversions, from Frei and Gunn, Astronomical Journal 108, 1476
(1994), Table 2 (1994AJ....108.1476F).
Constants VEGA_AB_*, for Vega <-> AB magnitude conversions, from Blanton et al., Astronomical Journal 129, 2562 (2005),
Eqs. (5) (2005AJ....129.2562B).
Strings
String manipulation and query functions.
Formats
Functions for formatting numeric values.
CoordsRadians
Functions for angle transformations and manipulations, based on radians rather than degrees. In particular, methods for translating
between radians and HH:MM:SS.S or DDD:MM:SS.S type sexagesimal representations are provided.
Coverage
Functions related to coverage and footprints.
One coverage standard is Multi-Order Coverage maps, described at http://www.ivoa.net/Documents/MOC/. MOC positions are always
defined in ICRS equatorial coordinates.
MOC locations may be given as either the filename or the URL of a MOC FITS file. Alternatively, they may be the identifier of a
VizieR table, for instance "V/139/sdss9" (SDSS DR9). A list of all the MOCs available from VizieR can currently be found at
http://alasky.u-strasbg.fr/footprints/tables/vizier/. You can search for VizieR table identifiers from the VizieR web page (http://vizier.ustrasbg.fr/); note you must use the table identifier (like "V/139/sdss9") and not the catalogue identifier (like "V/139").
CoordsDegrees
Functions for angle transformations and manipulations, with angles generally in degrees. In particular, methods for translating
between degrees and HH:MM:SS.S or DDD:MM:SS.S type sexagesimal representations are provided.
A listing of the functions in these classes is given in Appendix B.1, and complete documentation on them is available within TOPCAT from
the Available Functions Window.
7.6.1 Technical Note
This note provides a bit more detail for Java programmers on what is going on here; only read on if you want to understand how the use of
functions in TOPCAT algebraic expressions relates to normal Java code.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 30 of 255
11/18/14, 17:34
The expressions which you write are compiled to Java bytecode when you enter them (if there is a 'compilation error' it will be reported
straight away). The functions listed in the previous subsections are all the public static methods of the classes which are made available
by default. The classes listed are all in the packages uk.ac.starlink.ttools.func and uk.ac.starlink.topcat.func
(uk.ac.starlink.topcat.func.Strings etc). However, the public static methods are all imported into an anonymous namespace for
bytecode compilation, so that you write (sqrt(x) and not Maths.sqrt(x). The same happens to other classes that are imported (which can
be in any package or none) - their public static methods all go into the anonymous namespace. Thus, method name clashes are a possibility.
This cleverness is all made possible by the rather wonderful JEL.
7.8 Examples
Here are some general examples. They could be used to define synthetic columns or (where numeric) to define values for one of the axes in a
plot.
Average
(first + second) * 0.5
Square root
sqrt(variance)
Angle conversion
radiansToDegrees(DEC_radians)
degreesToRadians(RA_degrees)
or
(short) obs_type
(double) range
Outlier clipping
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 31 of 255
11/18/14, 17:34
and here are some examples of boolean expressions that could be used to define row subsets (or to create boolean synthetic columns):
Within a numeric range
RA > 100 && RA < 120 && Dec > 75 && Dec < 85
Within a circle
$2*$2 + $3*$3 < 1
skyDistanceDegrees(ra0,dec0,hmsToDegrees(RA),dmsToDegrees(DEC))<15./3600.
String equality/matching
equals(SECTOR, "ZZ9 Plural Z Alpha")
equalsIgnoreCase(SECTOR, "zz9 plural z alpha")
startsWith(SECTOR, "ZZ")
contains(ph_qual, "U")
Combining subsets
(_1 && _2) && ! _3
Page 32 of 255
11/18/14, 17:34
) button
Any public static methods defined in the classes thus specified will be available for use in the Synthetic Column, Algebraic Subset or (in the
case of activation functions only) Activation Window windows. They should be defined to take and return the relevant primitive or Object
types for the function required (in the case of activation functions the return value should normally be a short log string).
For example, a class written as follows would define a three-value average:
public class AuxFuncs {
public static double average3( double x, double y, double z ) {
return ( x + y + z ) / 3.0;
}
}
and the expression "average3($1,$2,$3)" could then be used to define a new synthetic column, giving the average of the first three existing
columns. Exactly how you would build this is dependent on your system, but it might involve doing something like the following:
1. Writing a file named "AuxFuncs.java" containing the above code
2. Compiling it using a command like "javac AuxFuncs.java"
3. Starting up TOPCAT with the flags: "topcat -Djel.classes=AuxFuncs -classpath ."
8 Activation Actions
As well as seeing the overview of table data provided by a plot or statistics summary, it is often necessary to focus on a particular row of the
table, which according to the nature of the table may represent an astronomical object, an event or some other entity. In the Data Window a
table row is simply a row of the displayed JTable, and in a plot it corresponds to one plotted point.
If you click on plotted point in one of the graphics windows, or on a row in the Data Window, the corresponding table row will be activated.
When a row is activated, three things happen:
1. If that row is represented by a point in any open 2- or 3-dimensional scatter plot windows, a visible cursor marker will be drawn
centred on that point.
2. If the Data Window is visible, the table will be scrolled to show the row and it will be highlighted
3. If an activation action has been defined, it will be invoked
The first two of these mean that you can easily see which point in a plot corresponds to which row in the table and vice versa - just click on
one and the other will be highlighted.
The third one can be more complicated. By default, no activation action is set, so nothing else happens, and this may very well be what you
want. However, by clicking on the Activation Action selector in the Control Window you can bring up the Activation Window which
enables you to choose an additional action to take place. There are various options here and various ways to achieve them (see Appendix
A.10.3 for more details) but the kinds of actions which are envisaged are to display one or more images or spectra relating to the row you
have identified. One of the options available for instance retrieves a postage-stamp image of a few arcminutes around the sky position
defined by the row from a SuperCOSMOS all-sky image survey and pops it up in a viewer window. So for instance having spotted an
interesting point in a plot of a galaxy catalogue you can click on it, and immediately see a picture to identify its morphological type.
The exact actions you want to perform may be closely tailored to the data you have, for instance you may have a set of spectra on disk
named by object ID. It's impossible to cater for such possibilities with a set of pre-packaged options, so you are able to define your own
custom actions here. This is done by writing a expression using the syntax described in Section 7. A number of special functions (described
in the following subsection) are provided to do things like display an image or a spectrum in a browser (given its filename or URL), or
access data from certain data servers on the web, but there is nothing to stop the adventurous plugging in their own external programs so in
principle you can configure pretty much anything to happen on the basis of the values in the row that you have activated.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 33 of 255
11/18/14, 17:34
Browsers
Displays URLs in web browsers.
Mgc
Specialist functions for use with data from the the Millennium Galaxy Survey.
System
Executes commands on the local operating system. These are executed as if typed in from the shell, or command line.
Sdss
Specialist display functions for use with the Sloane Digital Sky Server.
SuperCosmos
Specialist display functions for use with the SuperCOSMOS survey. These functions display cutout images from the various archives
hosted at the SuperCOSMOS Sky Surveys (http://www-wfau.roe.ac.uk/sss/). In most cases these cover the whole of the southern sky.
BasicImageDisplay
Functions for display of graphics-format images in a no-frills viewing window (an ImageWindow). Supported image formats include
GIF, JPEG, PNG and FITS, which may be compressed.
TwoQZ
Specialist functions for use with data from the the 2QZ survey. Spectral data are taken directly from the 2QZ web site at
http://www.2dfquasar.org/.
Image
Functions for display of images in a window. Supported image formats include GIF, JPEG, PNG and FITS, which may be compressed.
The SoG program (http://www.starlink.ac.uk/sog/) will be used if it is available, otherwise a no-frills image viewer will be used
instead.
Output
Functions for simple logging output.
Sog
Functions for display of images in external viewer SOG (http://www.starlink.ac.uk/sog/).
A listing of the functions in these classes is given in Appendix B.2, and complete documentation on them is available within TOPCAT from
the Available Functions Window.
9 Tool Interoperability
TOPCAT is able to communicate with other tools using one or other of two messaging protocols:
SAMP (Simple Applications Messaging Protocol)
PLASTIC (PLatform for AStronomical InterConnection
An example of the kind of thing which can be done might be:
1. TOPCAT sends a catalogue to an image display tool
2. The image display tool shows the catalogue entries as markers placed appropriately on a displayed image
3. User actions which highlight one of the points in one tool can then automatically highlight the same point in the other
Examples of the kind of tool which TOPCAT can interoperate with in this way are image analysis tools (Aladin, GAIA, ds9) table analysis
tools (VisIVO, STILTS, other instances of TOPCAT itself), spectrum analysis tools (SPLAT, VOSpec), sky visualisation tools (World Wide
Telescope, VirGO), scripting languages (SAMPy), and others.
SAMP and PLASTIC do much the same job as each other, and work in much the same way. SAMP is an evolution of PLASTIC with a
number of technical improvements, and so PLASTIC is now deprecated in favour of SAMP. It is not necessary for users to understand the
differences between the two, but in general a tool using SAMP can communicate with other tools using SAMP, and the same with PLASTIC,
but in most cases interoperation between PLASTIC and SAMP tools will not work.
The communication architecture of the two protocols is basically the same: all tools communicate with a central "Hub" process, so a hub
must be running in order for the messaging to operate. If a hub is running when TOPCAT starts, or if one starts up while TOPCAT is in
operation, it will connect to it automatically. A hub can be started from within TOPCAT if required - details of how to do this are given in the
SAMP and PLASTIC sections below. Other tools will have their own policies for connecting to the hub, but in general it is a good idea to
start a hub first before starting up the tools which you want to talk to it.
TOPCAT can work in either SAMP or PLASTIC mode, but not both at once. It determines which mode to use at startup: if the -samp or plastic flag is supplied on the command line the corresponding mode will be used; otherwise if a running SAMP or PLASTIC hub can be
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 34 of 255
11/18/14, 17:34
found, the corresponding mode is used, otherwise it defaults to SAMP. It is easy to tell which mode is being used by looking at the Control
Window; in SAMP mode the SAMP panel displaying connection and message status is visible at the bottom of the right hand panel (there
are a few other changes to the GUI as well). Facilities for communications monitoring are considerably better in SAMP than in PLASTIC
mode.
This communication has two aspects to it: on the one hand TOPCAT can send messages to other applications which causes them to do
things, and on the other hand TOPCAT can receive and act on such messages sent by other applications. The sent and received messages are
described separately in the subsections below. There are also sections on the, somewhat different, ways to control and monitor messaging
operatiion for the cases of SAMP and PLASTIC.
Pops up the SAMP Window which shows a detailed view of the status of SAMP communications, and allows you to register or
unregister with the hub, and to start a hub if required.
SAMP Status panel
The bottom part of the right hand panel has an area labelled SAMP. This gives a summary view of registration status, other connected
applications, and messages recently sent and received. It is described in more detail in Appendix A.2.4.
Table Broadcast ( ) and Table Send ( ) menu options
The Interop menu provides these options which allow you to send the currently selected table to one or all connected clients. Note
they will only be enabled if the hub is running, and there is at least one connected client which knows how to receive a table. The
Broadcast option is also available on the toolbar.
Stop Internal Hub ( ) menu option
By default, when TOPCAT starts up, it will look for a SAMP hub, and if none appears to be running it will start one internally, which
will normally run until TOPCAT exits. This is usually not problematic, but if you would prefer to run a hub external to TOPCAT, then
you may need to shut down TOPCAT's before starting a new one. Using this option shuts down TOPCAT's internal hub.
A number of other windows feature an Interop menu with Broadcast (
) and Send (
window. Sometimes Broadcast appears in the toolbar as well. In some cases there are also Accept (
These control whether TOPCAT will respond to appropriate messages sent by other SAMP applications.
Page 35 of 255
11/18/14, 17:34
Sends the currently selected table to a selected listening application using PLASTIC. Select the desired recipient application from the
submenu.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 36 of 255
11/18/14, 17:34
Transmit Coordinates
Another Activation Action is Transmit Coordinates. In this case when you activate a row (e.g. by clicking on the corresponding
point in a plot) other applications are invited to point out the sky position corresponding to the row which is activated, for instance by
placing a cursor over it. The table columns which correspond to Right Ascension and Declination must be selected for this to work.
SAMP MType: coord.pointAt.sky
PLASTIC Message ID: ivo://votech.org/sky/pointAtCoords
Transmit Image
The Density Plot produces a 2-d histogram which is actually an image. Its Interop menu provides Broadcast Image and Send Image
options which will send this (as a FITS image) to other applications which can display it in some way. This is a useful supplement to
the facilities of the Density Plot window, since it doesn't have very sophisticated image display features (variable colour maps, contour
plots etc).
Also, the View URL as Image Activation Action option allows you to identify a column which contains an image URL and to send it
to a suitable image viewer or viewers.
SAMP MType: image.load.fits
PLASTIC Message ID: ivo://votech.org/fits/image/loadFromURL
Transmit Spectrum
The View URL as Spectrum Activation Action option allows you to identify a column which contains a spectrum URL and to send it
to a suitable spectrum viewer or viewers.
SAMP MType: spectrum.load.ssa-generic
PLASTIC Message ID: ivo://votech.org/spectrum/loadFromURL
Transmit Resource List
The Registry Query Panel present in most of the Virtual Observatory windows allows you to send lists of VO registry resource
identifiers to other applications which can make use of them. Note this only works in SAMP mode, not for PLASTIC.
SAMP MTypes: voresource.loadlist.cone, voresource.loadlist.siap, voresource.loadlist.ssap
Page 37 of 255
11/18/14, 17:34
10 Invoking TOPCAT
Starting up TOPCAT may just be a case of typing "topcat" or clicking on an appropriate icon and watching the Control Window pop up. If
that is the case, and it's running happily for you, you can probably ignore this section. What follows is a description of how to start the
program up, and various command line arguments and configuration options which can't be changed from within the program. Some
examples are given in Section 10.5. Actually obtaining the program is not covered here; please see the TOPCAT web page
http://www.starlink.ac.uk/topcat/.
There are various ways of starting up TOPCAT depending on how (and whether) it has been installed on your system; some of these are
described below.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 38 of 255
11/18/14, 17:34
There may be some sort of short-cut icon on your desktop which starts up the program - in this case just clicking on it will probably work.
Failing that you may be able to locate the jar file (probably named topcat.jar, topcat-full.jar or topcat-lite.jar) and click on that.
These files would be located in the java/lib/topcat/ directory in a standard Starjava installation. Note that when you start by clicking on
something you may not have the option of entering any of the command line options described below - to use these options, which you may
need to do for serious use of the program, you will have to run the program from the command line.
Alternatively you will have to invoke the program from the command line. On Unix-like operating systems, you can use the topcat script. If
you have the full starjava installation, this is probably in the starjava/java/bin directory. If you have one of the standalone jar files (topcatfull.jar or topcat-lite.jar), it should be in the same directory as it/them. If it's not there, you can unpack it from the jar file itself, using a
command like unzip topcat-lite.jar topcat. If that directory (and java) is on your path then you can write:
topcat [java-args] [topcat-args]
In this case any arguments which start -D or -X are assumed to be arguments to the java command, any arguments which start -J are stripped
of the -J and then passed as arguments to the java command, a -classpath path defines a class path to be used in addition to the TOPCAT
classes, and any remaining arguments are used by TOPCAT.
If you're not running Unix then to start from the command line you will have to use the java command itself. The most straightforward way
of doing this will look like:
java [java-args] -jar path/to/topcat.jar [topcat-args]
(or the same for topcat-full.jar etc). However NOTE: using java's -jar flag ignores any other class path information, such as the
CLASSPATH environment variable or java's -classpath flag - see Section 10.2.1.
Note that Java Web Start can also be used to invoke the program without requiring any prior download/installation - sorry, this isn't
documented properly here yet.
The meaning of the optional [topcat-args] and [java-args] sequences are described in Section 10.1 and Section 10.2 below respectively.
Auto-detected formats:
fits-plus, colfits-plus, colfits-basic, fits, votable, cdf, gbin
All known formats:
fits-plus, colfits-plus, colfits-basic, fits, votable, cdf, gbin, ascii, csv, tst, ipac, wdc
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 39 of 255
11/18/14, 17:34
Page 40 of 255
11/18/14, 17:34
-exthub
Causes TOPCAT to attempt to run an external SAMP or PLASTIC hub, if no hub is already running. The hub will show up in its own
window, and can be stopped by closing the window. The hub will continue to run after TOPCAT terminates. Invoking external
processes from Java is inherently unreliable, so this is done on a best-efforts basis. See Section 9.
-noserv
Prevents TOPCAT from running any services. Currently the services which it may run are SAMP or PLASTIC (see above).
-checkvers
Prevents TOPCAT from checking an external URL so it can determine whether the latest version is being run.
-stilts <stilts-args>
This flag is a convenience which allows you to run the STILTS command-line tool instead of TOPCAT. This is possible because
TOPCAT is built on top of STILTS and contains a superset of its code. See the STILTS manual (or topcat -stilts -help) for the
form of the <stilts-args>.
-jsamp <jsamp-args>
This flag is a convenience which allows you to run the jsamp command-line tool, from the JSAMP package, instead of TOPCAT. This
is possible because TOPCAT contains the JSAMP library. JSAMP provides various SAMP-related utilities, such as a freestanding hub
and diagnostic tools. See the JSAMP documentation, or do topcat -jsamp -help for more information.
Other arguments on the command line are taken to be the locations of tables. Any tables so specified will be loaded into TOPCAT at startup.
These locations are typically filenames, but could also be URLs or SQL queries, or perhaps something else. In addition they may contain
"fragment identifiers" (with a "#") to locate a table within a given resource, so that for instance the location
/my/data/cat1.fits#2
means the second extension in the multi-extension FITS file /my/data/cat1.fits. Section 4.2 describes in more detail the kinds of URLs
which can be used here.
Note that options to Java itself may also be specified on the command-line, as described in the next section.
(this adds the given paths to the standard ones required for TOPCAT itself). If you are invoking java directly, then you can either write on the
command line:
java -classpath path/to/topcat.jar:other-paths
uk.ac.starlink.topcat.Driver ...
In any case, multiple (extra) paths should be separated by colons in the other-paths string.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 41 of 255
11/18/14, 17:34
Note that if you are running TOPCAT using java's -jar flag, any attempt you make to specify the classpath will be ignored! This is to do
with Java's security model. If you need to specify a classpath which includes more than the TOPCAT classes themselves, you can't use java
-jar (use java -classpath topcat-lite.jar:... uk.ac.starlink.topcat.Driver instead).
10.2.2 Memory Size
If TOPCAT fails during operation with a message that says something about a java.lang.OutOfMemoryError, then your heap size is too
small for what you are trying to do. You will have to run java with a bigger heap size using the -Xmx flag. Invoking TOPCAT from the
topcat script you would write something like:
topcat -Xmx256M ...
which means use up to 256 megabytes of memory (don't forget the "M" for megabyte). JVMs often default to a heap size of 64M. You
probably don't want to specify a heap size larger than the physical memory of the machine that you are running on.
There are other types of memory and tuning options controlled using options of the form -X<something-or-other>; if you're feeling
adventurous you may be able to find out about these by typing "java -X".
Note however: using the -disk flag described in Section 10.1 may be a better solution; this makes the program store data from large tables
on disk rather than in memory.
10.2.3 System properties
System properties are a way of getting information into Java (they are the Java equivalent of environment variables). The following ones
have special significance within TOPCAT:
apple.laf.useScreenMenuBar
On the Apple Macintosh platform only, this property controls whether menus appear at the top of the screen as usual for Mac, or at the
top of individual windows as usual for Java. By default it is set to true for TOPCAT, so menus mostly appear at the top of the screen
(though it's not true to say that TOPCAT obeys the Mac look and feel completely); if you prefer the more Java-like look and feel, set it
to false.
http.proxyHost
If you are operating inside a firewall which prohibits direct HTTP connections, you can set this to the name of an HTTP proxy server
in order to access remote servers as required for VO functionality etc. There are a number of related system properties which you may
or may not need to use in this case: http.proxyPort, https.proxyHost etc. See the appropriate java documentation (e.g. by googling
for "http.proxyHost") for details.
java.io.tmpdir
The directory in which TOPCAT will write any temporary files it needs. This is usually only done if the -disk flag has been specified
(see Section 10.1).
jdbc.drivers
Can be set to a (colon-separated) list of JDBC driver classes using which SQL databases can be accessed (see Section 10.3).
jel.classes
Can be set to a (colon-separated) list of classes containing static methods which define user-provided functions for synthetic columns
or subsets. (see Section 7.9).
jel.classes.activation
Can be set to a (colon-separated) list of classes containing static methods which define user-provided functions for use in custom
activation expressions. (see Section 7.9).
jsamp.hub.profiles
This property determines what profiles a SAMP hub will use if you run an internal or external hub from TOPCAT (either with the hub/-exthub flag or from the GUI). The value is a comma-separated list of profile specifiers; options are "std" for Standard Profile,
"web" for Web Profile or the name of a class implementing the org.astrogrid.samp.hub.HubProfile interface. The default setting
runs just a Standard Profile hub, but, for instance, setting it to "std,web" would run a Web Profile as well. Note you should include
std in the list, otherwise TOPCAT will not be able to talk to the hub. See the JSAMP documentation for more detail.
jsamp.localhost
Sets the hostname by which the local host is to be identified in URLs, for instance server endpoints. If unset, the default is currently
the loopback address "127.0.0.1". However, if this property is set (presumably to the local host's fully- or partly-qualified domain
name) its value will be used instead. Two special values may also be set: "[hostname]" for the host's fully qualified domain name, and
"[hostnumber]" for the IP number.
jsamp.server.port
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 42 of 255
11/18/14, 17:34
Gives a preferred port number on which to open TOPCAT's internal HTTP server, used for SAMP communications amongst other
things. If this port is unavailable, some other port will be used instead.
jsamp.xmlrpc.impl
Indicates which pluggable XML-RPC implementation should be used for SAMP communications. By default an internal
implementation is used. If it is set to "xml-log" or "rpc-log" then all XML-RPC communications will be logged in very or fairly
verbose terms respectively to standard output. The classname of an org.astrogrid.samp.xmlrpc.XmlRpcKit implementation may be
given instead to use a custom implementation.
lut.files
Can be set to a (colon-separated on *nix, semicolon-separated on Windows) list of files giving custom lookup tables for auxiliary axis
and density map colour maps. Each file should be a text file containing a number of space-separated lines, each containing red, green,
blue samples in the range 0-1. For instance the file
1.0
1.0
1.0
0.0
0.0
1.0
would give a colour map that fades from yellow to magenta. Any number of samples may be given; the scale is interpolated.
mark.workaround
If set to "true", this will work around a bug in the mark()/reset() methods of some java InputStream classes. These are rather
common, including in Sun's J2SE system libraries. Use this if you are seeing errors that say something like "Resetting to invalid
mark". Currently defaults to "false".
myspace.cache
If set to "true", this will prevent directories in the MySpace file browser from being read more than once. This is a workaround for
MySpace performance problems at time of writing (April 2006); setting it true may lead to out of date file listings in MySpace, but it
may be much faster. This behaviour may be withdrawn in future versions if MySpace performance improves. Currently defaults to
"false".
service.maxparallel
Raises the maximum number of concurrent queries that may be made during a multi-cone operation. You should only increase this
value with great care since you risk overloading servers and becoming unpopular with data centres. As a rule, you should only
increase this value if you have obtained permission from the data centres whose services on which you will be using the increased
parallelism.
star.basicauth.user
star.basicauth.password
If set, these will provide username and password for HTTP Basic Authentication. Any time the application attempts to access an
HTTP URL and is met by a 401 Unauthorized response, it will try again supplying these user credentials. This is a rather blunt
instrument, since the same identity is supplied regardless of which URL is being accessed, but it may be of some use in accessing
basic-authentication protected services.
If these properties are not set, then on encountering a 401 in the application will pop up a dialogue window asking for username and
password.
star.connectors
Can be set to a (colon-separated) list of classes which provide access to remote filespace implementations. Thus-named classes should
implement the uk.ac.starlink.connect.Connector interface which specifies how you can log on to such a service and provides a
hierarchical view of the filespace it contains.
startable.load.dialogs
Can be set to a (colon-separated) list of custom table load dialogue classes. Briefly, you can install your own table import dialogues at
runtime by providing classes which implement the uk.ac.starlink.table.gui.TableLoadDialog interface and naming them in this
property. See STIL documentation for more detail.
startable.readers
Can be set to a (colon-separated) list of custom table format input handler classes (see Section 4.1.3).
startable.storage
Can be set to determine the default storage policy. Setting it to "disk" has basically the same effect as supplying the "-disk" argument
on the TOPCAT command line (see Section 10.1). Other possible values are "adaptive", "memory", "sideways" and "discard"; see
SUN/252. The default is "adaptive", which means storing smaller tables in memory, and larger ones on disk.
startable.writers
Can be set to a (colon-separated) list of custom table format output handler classes (see Section 4.1.3).
topcat.exttools
Defines extension tools to be used by TOPCAT. The value is a colon-separated list of class names, each of which must implement the
uk.ac.starlink.topcat.TopcatToolAction interface and have a no-arg constructor. The actions corresponding to any such classes
will be added to toolbar. This is an experimental extensibility feature, which may be modified or withdrawn in a future release.
user.dir
Sets the current working directory. This determines the default from which the file browsers will start.
votable.namespacing
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 43 of 255
11/18/14, 17:34
Determines how namespacing is handled in input VOTable documents. Known values are "none" (no namespacing, xmlns
declarations in VOTable document will probably confuse parser), "lax" (anything that looks like it is probably a VOTable element
will be treated as a VOTable element) and "strict" (VOTable elements must be properly declared in one of the correct VOTable
namespaces). May also be set to the classname of a uk.ac.starlink.votable.Namespacing implementation. The default is "lax".
votable.strict
Set true for
strict enforcement of the VOTable standard when parsing VOTables. This prevents the parser from working round certain
common errors, such as missing arraysize attributes on FIELD/PARAM elements with datatype="char". False by default.
votable.version
Selects the version of the VOTable standard which output VOTables will conform to by default. May take the values "1.0", "1.1",
"1.2" or "1.3". By default, version 1.2 VOTables are written.
To define these properties on the command line you use the -D flag, which has the form
-D<property-name>=<value>
If you're using the TOPCAT startup script, you can write something like:
topcat -Djdbc.drivers=org.postgresql.Driver ...
Alternatively you may find it more convenient to write these definitions in a file named .starjava.properties in your home directory; the
above command-line flag would be equivalent to inserting the line:
jdbc.drivers=org.postgresql.Driver
Page 44 of 255
11/18/14, 17:34
You can use Oracle with the JDBC driver that comes as part of its Basic Instant Client Package. However, you can't currently use the
SQL load/SQL save dialogue boxes to do it. You have to specify a JDBC URL specifying the query to read/table to write as a string in
the Location field of the normal table load/save dialogue boxes. The URL will look something like
jdbc:oracle:thin:@//hostname:1521/database#SELECT ...
MySQL
java -classpath topcat-full.jar:mysql-connector-java-3.0.8-bin.jar \
-Djdbc.drivers=com.mysql.jdbc.Driver \
uk.ac.starlink.topcat.Driver
Oracle
java -classpath topcat-full.jar:ojdbc14.jar \
-Djdbc.drivers=oracle.jdbc.driver.OracleDriver \
uk.ac.starlink.topcat.Driver
Page 45 of 255
11/18/14, 17:34
in your machine if you need to (taking account of the needs of other processes running at the same time) but attempting any more will
usually result in abysmal performance. See Section 10.2.2.
Use FITS files
Because of the way that FITS files are organised, TOPCAT is able to load tables which are stored as uncompressed FITS binary tables
on disk almost instantly regardless of their size (in this case loading just reads the metadata, and any data elements are only read if and
when they are required). So if you have a large file stored in VOTable or ASCII-based form which you use often and takes a long time
to load, it's a good idea to convert it to FITS format once for subsequent use. You can do this either by loading it into TOPCAT once
and saving it as FITS, or using the separate command-line package STILTS. Note that the "fits-plus" variant which TOPCAT uses by
default retains all the metadata that would be stored in a corresponding VOTable, so you won't normally lose information by doing this
(see Section 4.1.2.1). As well as speeding things up, using FITS files will also reduce the need to use -Xmx flags as above.
Run in 64-bit mode
If you are working with a file or files whose total size approaches or exceeds about 2 Gbyte, you should use a 64-bit version of java.
This means that you will need a 64-bit operating system, and also a 64-bit version of the Java Virtual Machine. Executing "java version" (or "topcat -version") will probably say something about 64-bit-ness if it is 64-bit.
Use column-oriented storage
For really large tables storing them in the colfits output format can significantly improve performance. This stores all the elements of a
single column contiguously on disk, which means that scanning through all the values in one or a few columns can proceed with much
less unnecessary I/O than in normal (row-oriented) FITS format. It will make most difference when the table is larger than the amount
of physical memory available, and the table has many columns. Be aware however that operations which require all the cells in all the
rows (for instance, calculating row statistics) may be somewhat slower using this format.
It is also possible to use column-oriented storage for non-FITS files by specifying the flag -Dstartable.storage=sideways. This is
like using the -disk flag but uses column-oriented rather than row-oriented temporary files. However, using it for such large files
means that the conversion is likely to be rather slow, so you may be better off converting the original file to colfits format in a
separate step and using that.
Use the -disk flag
The way TOPCAT stores table data is configurable, and the details can be controlled by setting its Storage Policy. The default storage
policy (since version 3.5), "adaptive", means that the data for relatively small tables are stored in memory, and for larger ones in
temporary disk files. This usually works fairly well and you're not likely to need to change it. However, you can experiment if you
like, and a small amount of memory may be saved if you encourage it to store all table data on disk, by specifying the -disk flag on
the command line. You can achieve the same effect by adding the line startable.storage=disk in the .starjava.properties in
your home directory. See Section 10.1, Section 10.2.3.
As far as performance goes, the memory size of the machine you're using does make a difference. If the size of the dataset you're dealing
with (this is the size of the FITS HDU if it's in FITS format but may be greater or less than the file size for other formats) will fit into unused
physical memory then general everything will run very quickly because the operating system can cache the data in memory; if it's larger than
physical memory then the data has to keep being re-read from disk and most operations will be much slower, though use of column-oriented
storage can help a lot in that case.
10.5 Examples
Here are some examples of invoking TOPCAT from the command line. In each case two forms are shown: one using the topcat script, and
one using the jar file directly. In the latter case, the java command is assumed to be on the your path, and the jar file itself, assumed in
directory my/tcdir, might be named topcat.jar, topcat-full.jar, or something else, but the form of the command is the same.
No arguments
topcat
java -jar topcat.jar
Page 46 of 255
11/18/14, 17:34
The -Dx=y definitions can be avoided by putting equivalent x=y lines into the .starjava.properties in your home directory.
A TOPCAT Windows
This appendix gives a tour of all the windows that form the TOPCAT application, explaining the anatomy of the windows and the various
tools, menus and other controls. Attributes common to many or all windows are described in Appendix A.1, and the subsequent sections
describe each of the windows individually.
When the application is running, the Help For Window (
) toolbar button will display the appropriate description for the window on
which it is invoked.
A.1.1 Toolbar
Each window has a toolbar at the top containing various buttons representing actions that can be invoked from the window. Most of them
contain the following buttons:
Close
Closes the window. This convenience button has the same effect as closing the window in whatever way your graphics platform
normally allows. In most cases, closing the window does not lose state associated with it (such as fields filled in); if you recover the
window later it will look the same as when you closed it.
Help
Pops up a Help browser window, or makes sure it is visible if it has already been opened. The window will display help information
relevant to the window in which you pushed this button.
Buttons in the toolbar often appear in menus of the same window as well; you can identify them because they have the same icon. This is a
convenience; invoking the action from the toolbar or from the menu will have the same effect.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 47 of 255
11/18/14, 17:34
Often an action will only be possible in certain circumstances, for instance if some rows in the associated JTable have been selected. If the
action is not possible (i.e. it would make no sense to invoke it) then the button in the toolbar and the menu option will be greyed out,
indicating that it cannot be invoked in the current state.
A.1.2 Menus
Most windows have a menu bar at the top containing one or more menus. These menus will usually provide the actions available from the
toolbar (identifiable because they have the same icons), and may provide some other less-commonly-required actions too.
Here are some of the menus common to several windows:
Window menu
Nearly all windows have this menu. At least the following options are available:
Control Window
Ensures that the Control Window is visible on the screen, deiconifying and raising it if necessary. This can be useful if you 'lose'
the window behind a proliferation of other ones.
Scrollable
If selected, this causes the entire content of the window to be wrapped in scrollbars. It is not generally recommended to use this
option, since in general the windows are arranged so that resizing them will resize sensible parts of them, but it may be useful if
using some of the larger windows on an unusually small screen.
Close
Closes the window. This convenience button has the same effect as closing the window in whatever way your graphics platform
normally allows. In most cases, closing the window does not lose state associated with it (such as fields filled in); if you recover
the window later it will look the same as when you closed it.
Exit
Exits TOPCAT. You will be prompted to confirm this action if tables are loaded, since it might result in loss of data.
Help menu
Nearly all windows have this menu. The following options are available:
Help
Pops up the Help Window.
Help for Window
Pops up the Help Window; the window will display help information relevant to the window in which the menu appears.
Help in Browser
Attempts to show the application help in a web browser. This is somewhat system dependent and is not guaranteed to work.
Help in Browser (single page)
Attempts to show the application help in a web browser as a single (long page). This can be useful if you want to search for a
given word or string in the text. This is somewhat system dependent and is not guaranteed to work.
Help for Window in Browser
Attempts to show the help page relevant to the window in which the menu appears in a web browser. This is somewhat system
dependent and is not guaranteed to work.
About TOPCAT
Pops up a little window giving information on the version and authorship of the program. It also reports on availability of some
optional components.
Display menu
This menu is available for most windows which display their data using a JTable component. If present, it contains a list of the
columns in the JTable with tickboxes next to them - clicking on a column name in this menu toggles whether the column is visible in
the window.
A.1.3 JTables
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 48 of 255
11/18/14, 17:34
An example JTable
Many of the windows, including the Data Window, display their data in a visual component called a JTable. This displays a grid of values,
with headings for each column, in a window which you can scroll around. Although JTables are used for a number of different things (for
instance, showing the table data themselves in the Data Window and showing the column metadata in the Columns Window), the fact that
the same widget is used provides a common look and feel.
Here are some of the things you can do with a JTable:
Scroll around
Using the scrollbars which may appear to the right and below the table you can scroll around it to see parts which are not initially
visible. You can grab the sliders and drag them around by holding the mouse button down while you move it, or click in the slider
"trough" one side or other of the current slider position to move a screenful. Under some circumstances the cursor arrow keys and
PageUp/PageDown keys may move the table too. If the JTable is small enough to fit within the window the scrollbars may not appear.
Move columns
By clicking on the header (grey title bit at the top) of a column and dragging it left or right, you can change the order of columns as
displayed. In some cases (the Data Window) this actually has the effect of changing the order of the columns in the table; in other
cases it is just cosmetic.
Resize columns
By dragging on the line between row headers you can change the width of the columns in the table.
Edit cells
In some cases, cells are editable. If they are, then double-clicking in the cell will begin an edit session for that cell, and pressing
Return will confirm that the edit has been made.
Select rows
Sometimes rows can be highlighted; you can select one row by clicking on it or a number of contiguous rows by clicking and dragging
from the first to the last. To add further rows to a set already selected without deselecting the first lot, hold the "Control" key down
while you do it.
Sort rows
In some, but not all cases, you may see a little up or down arrow in one of the column headers. This indicates that the rows of the table
have been sorted according to the values in that column. If you click on another column header, the rows will be re-sorted according to
the values in that column. Clicking again on the same column reverses the sort order. This feature is only available for certain
displayed JTables.
In some cases where a JTable is displayed, there will be a menu on the menu bar named Display. This permits you to select which columns
are visible and which are hidden. Clicking on the menu will give you a list of all the available columns in the table, each with a checkbox by
it; click the box to toggle whether the column is displayed or not.
Page 49 of 255
11/18/14, 17:34
Another possibility is to use the little left/right arrows on the far right to cycle through all the known columns. This can be useful in plots, for
instance to see a sequence of all the available plots against a given abcissa using only one click at a time.
Finally, you can type in an expression giving the required value. This can either be the name of a column just as if you had selected it from
the drop-down list, or an expression based on column names, or even a constant value. The syntax of the expression language is explained in
Section 7. Typing the column name rather than selecting it may be more convenient if the selection list is very long; typing an expression
obviously gives you a lot more possibilities.
Note that depending on your platform the selection box may not look exactly like the figure above. However, if you can type into it
(probably by clicking on it) then you should be able to use expressions as described above. Some selectors however only take column
names; if you can't type a value into it, you have to choose one of the options given.
Page 50 of 255
11/18/14, 17:34
table is introduced by loading it from the Load Window or as a result of some action such as table joining then its name and number will
appear in this list. The currently selected table is highlighted - clicking on a different table name (or using the arrow keys if the list has
keyboard focus) will change the selection. The properties of the selected table are displayed in the Current Table Properties panel to its right,
and a number of the toolbar buttons and menu items refer to it.
If you double-click on a table in the list, or press Return while it is selected, that table's Data Window will appear.
Certain other applications (Treeview or even another instance of TOPCAT) can interoperate with TOPCAT using drag-and-drop, and for
these the table list is a good place to drag/drop tables. For instance you can drag a table node off of the main panel of Treeview and drop it
onto the table list of TOPCAT, and you will be able to use that table as if it had been loaded from disk. You can also paste the filename or
URL of a table onto the table list, and it will be loaded.
Sometimes while a table is being loaded a greyed-out entry will appear in this list with text like "Loading SAMP table" or similar. Such
entries cannot be selected, but they let you know that something is happening.
Page 51 of 255
11/18/14, 17:34
The memory monitor is a small widget at the bottom left of the Control Window which gives an indication of TOPCAT's memory usage.
The numbers indicate the currently used and maximum heap size that Java will use (e.g. "64 M" for 64 megabytes), and the two darker
colours filled in from the left indicate the current total and used proportions of this. It's not necessary to understand in detail what these
mean, but if the darkest (used) colour comes to fill up the whole area, the application will slow down and then signal an Out Of Memory
Error. See Section 10.4 for some tips on what to do if this happens.
If you click on the memory monitor, you will request that the Java Virtual Machine performs a garbage collection round, which may have
the effect of reclaiming some memory and modifying the current usage. This is not really useful (Java will garbage collect at sensible times
without prompting), but you can do it if you're bored.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 52 of 255
11/18/14, 17:34
Displays the table rows and columns in a scrollable viewer so you can see the cell contents themselves.
Parameters Window
Displays table "parameters", that is metadata which applies to the whole table.
Columns Window
Displays metadata about each column such as data type, units, description, UCDs etc.
Subsets Window
Displays the currently defined row subsets and enables new ones to be defined.
Statistics Window
Displays a window for calculating statistical quantities for the values in each column of the table.
Graphics windows
Histogram Plot
Displays a window for plotting 1D histograms.
Plane Plot
Displays a window for making various types of plot on 2D Cartesian axes.
Sky Plot
Displays a window for making various types of plot on the celestial sphere.
Cube Plot
Displays a window for making various types of plot on 3D Cartesian axes.
Sphere Plot
Displays a window for making various types of plot on 3D axes using spherical polar coordinates.
Matching etc (see Section 5)
Pair Match Window
Displays a dialog for joining tables side-by-side by locating rows which match between them.
TAP Query
Displays a dialogue window for querying remote databases using the Table Access Protocol (TAP). This is a very powerful way
to access remote data by writing SQL-like queries, and can be used to do joins with remote tables as well as simply
downloading data.
CDS Upload X-Match
Displays a dialog window which uses the X-Match provided by the Centre de Donnes astronomiques de Strasbourg to allow
fast matching local tables with any tables in the remote VizieR or SIMBAD databases.
Note that other options for joining tables, including matches involving a single table or more than two tables, and joining tables top-tobottom, are available from the Joins menu.
Miscellaneous
SAMP Window
Displays a window which displays detail about the current status, and allows configuration, of SAMP messaging (see Section 9).
Note this button will not be visible if TOPCAT is running in PLASTIC mode.
Available Functions
Displays a window containing all the functions which can be used for writing algebraic expressions (see Section 7).
Help
Displays the help browser, open at the entry on the Control Window.
Exit
Queries for confirmation, then exits the application.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 53 of 255
11/18/14, 17:34
Page 54 of 255
11/18/14, 17:34
) on menus on all other windows is also useful for window management - it brings back the control
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 55 of 255
11/18/14, 17:34
The following sections describe each of these table view windows in turn.
Data Window
The Data Window presents a JTable containing the actual cells of the Apparent Table. You can display it using the Table Data (
) button
when the chosen table is selected in the Control Window's Table List.
You can scroll around the table in the usual way. In most cases you can edit cells by double-clicking in them, though some cells (e.g. ones
containing arrays rather than scalars) cannot currently be edited. If it looks like an edit has taken place, it has.
There is a grey column of numbers on the left of the JTable which gives the row index of each row. This is the value of the special Index
column, which numbers each row of the original (not apparent) table starting at 1. If the table has been sorted these numbers may not be in
order.
Note that reordering the columns by dragging their headings around will change the order of columns in the table's Column Set and hence
the Apparent Table.
If you have table with very many columns it can be difficult to scroll the display sideways so that a column you are interested in is in view.
In this case, you can go to the Columns Window and click on the description of the column you are after in the display there. This will have
the effect of scrolling the Data Window sideways so that your selected column is visible in the centre of the display here.
The following buttons are available in the toolbar:
Subset From Selected Rows
Defines a new Row Subset consisting of those rows which are currently highlighted. You can highlight a contiguous group of rows by
dragging the mouse over them; further contiguous groups can be added by holding the Control key down while dragging. This action
is only available when some rows have been selected.
Subset From Unselected Rows
Defines a new Row Subset consisting of those rows which are visible but currently not highlighted. You can highlight a contiguous
group of rows by dragging the mouse over them; further contiguous groups can be added by holding the Control key down while
dragging. This action is only available when some rows have been selected.
The Subsets menu additionally contains the following item:
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 56 of 255
11/18/14, 17:34
Highlight Subset
This is a submenu in which all the currently defined row subsets are listed. Selecting one of them marks the rows corresponding to that
subset as if they have been selected.
As well as the normal menu, right-clicking over one of the columns in the displayed table will present a Column Popup Menu, which
provides a convenient way to do some things with the column in question:
Replace Column
Pops up a Synthetic Column dialogue to replace this column with a new synthetic one. The dialogue is initialised with the same name,
units etc as the selected column, and with an expression that evaluates to its value. You can alter any of these, and the new column will
replace the old one, which will be hidden and renamed by appending a suffix like "_old" to its name.
New Synthetic Column
Pops up a Synthetic Column dialogue to insert a new synthetic column just after this one.
Sort up
Sorts the table rows according to ascending value of the contents of the column. Only available if some kind of order (e.g. numeric or
alphabetic) can sensibly be applied to the column.
Sort down
Sorts the table rows according to descending value of the contents of the column. Only available if some kind of order (e.g. numeric or
alphabetic) can sensibly be applied to the column.
Hide
Hides the column. It can be reinstated from the Columns window.
Search Column
For string-valued columns, this option allows you to search for values in a column. If you select it you will be asked to enter a regular
expression, and then any row which matches that expression in this column will be selected (highlighted). If there's just one matching
column it will be activated as well. The expression obeys normal regular expression syntax, so for instance you'd enter ".*XYZ.*" to
find all rows which contain the string "XYZ".
Explode Array Column
For columns which have an array value with a fixed number of elements, selecting this option will hide the original column and
replace it by a set of scalar columns, one for each of its elements. For instance if a column PMAG contains a 5-element vector of type
float[] representing magnitudes in 5 different bands, selecting this option will hide PMAG and insert 5 new Float-type columns
PMAG_1...PMAG_5 in its place, each containing one of the magnitudes.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 57 of 255
11/18/14, 17:34
Parameters Window
The Parameters Window displays metadata which applies to the whole table (rather than that for each column). You can display it using the
Table Parameters (
) button when the chosen table is selected in the Control Window's Table List.
In table/database parlance, an item of per-table metadata is often known as a "parameter" of the table. At least the number of rows and
columns will be listed. Some table file formats (for instance VOTable and FITS) have provision for storing other table parameters, while
others (for instance CSV) do not. In the latter case there may not much much of interest displayed in this window.
The top part of the display is a JTable with one row for each parameter. It indicates the parameter's name, its value, the type of item it is
(integer, string etc) and other items of interest such as units, dimensionality or UCD if they are defined. If a column of the table has no
entries (for instance, the Units column might be empty because none of the parameters has had units defined for it) then that column may be
absent from the display - in this case the Display menu can be used to reveal it.
You can edit some parameter values and descriptions by double-clicking on them as usual.
The bottom part of the display gives an expanded view of a selected parameter (click on a row in the top part to select one). This is
especially useful if the parameter value is too long to show fully in the table display. In most cases you can edit the fields here to change the
value and other characteristics of a parameter.
The following items are available in the toolbar:
Add Parameter
Pops up a New Parameter Window to allow you to add a new parameter to the table.
Remove Parameter
If one or more of the parameters displayed in the JTable in this window have been selected by clicking on the relevant rows, then
clicking this button will remove them. Some parameters such as Row Count cannot be removed.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 58 of 255
11/18/14, 17:34
Columns Window
The Columns Window displays a JTable giving all the information (metadata) known about each column in the table. You can display it
using the Column Info (
) button when the chosen table is selected in the Control Window's Table List.
The display may take a little bit of getting used to, since each column in the main data table is represented by a row in the JTable displayed
here. The order and widths of the columns of JTable widget can be changed in the same way as those for the Data Window JTable, but this
has no effect on the data.
The leftmost column, labelled "Visible", contains a checkbox in each row (one for each column of the data table). Initially, these are all
ticked. By clicking on those boxes, you can toggle them between ticked and unticked. When unticked, the column in question will become
hidden. The row can still be seen in this window, but the corresponding data column is no longer a part of the Apparent Table, so will not be
seen in the Data Window or appear in exported versions of the table. You can tick/untick multiple columns at once by highlighting a set of
rows by dragging the mouse over them and then using the Hide Selected (
) or Reveal Selected (
) toolbar buttons or menu items. If
you want to hide or reveal all the columns in the table, use the Hide All (
) or Reveal All (
) buttons.
Each column in the displayed JTable corresponds to one piece of information for each of the columns in the data table - column name,
description, UCD etc. Tables of different types (e.g. ones read from different input formats) can have different categories of metadata. By
default a metadata category is displayed in this JTable if at least one table column has a non-blank value for that metadata category, so for
instance if no table columns have a defined UCD then the UCD column will not appear. Categories can be made to appear and disappear
however by using the Display menu. The metadata items are as follows:
Visible
Indicates whether the column is part of the Apparent Table. If this box is not filled in, then for most purposes the column will be
hidden from display. You can toggle visibility by clicking on this column.
Name
The name of the column.
$ID
A unique and unchanging ID value for each column. These are useful in defining algebraic expressions (see Section 7) since they are
guaranteed unique for each column. Although the column Name can be used as well, the Name may not be unique and may not have
the correct form for use in an algebraic expression.
Class
The Java class of the items in that column. You don't have to know very much Java to understand these; they are Float or Double for
floating point numbers; Byte, Short, Integer or Long for integer numbers, Boolean for a logical (true/false) flag, or String for a string
of ASCII or Unicode characters. There are other possibilities, but these will cover most. The characters '[]' after the name of the class
indicates that each cell in the column holds an array of the indicated type.
Shape
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 59 of 255
11/18/14, 17:34
Cells of a table can contain arrays as well as scalars. If the column contains an array type, this indicates the shape that it should be
interpreted as. It gives the dimensions in column-major order. The last element may be a '*' to indicate that the size of the array may be
variable. For scalar columns, this item will be blank.
Units
The units in which quantities in this column are expressed.
Expression
The algebraic expression defining the values in this column. This will only be filled in if the column in question is a synthetic column
which you have added, rather than one present in the data in their original loaded form.
Description
A textual description of the function of this column.
UCD
The UCD associated with this column, if one is specified. UCDs are Uniform Content Descriptors, and indicate the semantics of the
values in this column.
UCD Description
If the string in the UCD column is the identifier of a known UCD, the standard description associated with that UCD is shown here.
There may be other items in the list specific to the table in question.
You can edit column names and some other entries in this JTable by double-clicking on them as usual.
The order in which the rows are presented is determined by the table's current Column Set. You can change the position of a column in the
order by dragging the grey number cell at the left of the corresponding row up or down; note this is only possible for currently visible
columns (ones with the Visible checkbox ticked). Another way to change this order is to drag the column headers left or right in the Data
Window.
The following buttons are available in the toolbar:
New Synthetic Column
This pops up a Synthetic Column Window which allows you to define a new column in terms of the existing ones by writing an
algebraic expression. The new column will be added by default after the last selected column, or at the end if none is selected.
Add Sky Coordinate Columns
This pops up a Sky Coordinates Window which allows you to define a pair of new sky coordinate columns based on an existing pair of
sky coordinate columns.
Replace Column With Synthetic
If a single column is selected, then clicking this button will pop up a Synthetic Column dialogue to replace the selected column with a
new synthetic one. The dialogue is initialised with the same name, units etc as the selected column, and with an expression that
evaluates to its value. You can alter any of these, and the new column will replace the old one, which will be hidden and renamed by
appending a suffix like "_old" to its name.
Hide Selected Column(s)
If any of the columns are selected, then clicking this button will hide them, that is, remove them from the current Column Set. This has
the same effect as deselecting all the checkboxes corresponding to these columns in the Visible column.
Reveal Selected Column(s)
If any of the columns are selected, then clicking this button will make sure they are visible, that is, that they appear in the current
Column Set. This has the same effect as selecting all the checkboxes corresponding to these columns in the Visible column.
Hide All Columns
Clicking this button will hide all the columns in the table; the table will have no columns visible in it following this. If you just want to
see a few columns, it may be convenient to use this button and then select a few visible ones individually to reveal.
Reveal All Columns
Clicking this button will ensure that all the table's columns are visible (none are hidden).
Explode Array Column
If a column is selected which has an array type, clicking this button will replace it with scalar-valued columns containing each of its
elements. For instance if a column PMAG contains a 5-element vector of type float[] representing magnitudes in 5 different bands,
then selecting it and hitting this button will hide PMAG and insert 5 new Float-type columns PMAG_1...PMAG_5 in its place each
containing one of the magnitudes.
Sort Selected Up
If a single column is selected then the table's current Sort Order will be set to sort ascending on that column. Otherwise this action is
not available.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 60 of 255
11/18/14, 17:34
Subsets Window
The Subsets Window displays the Row Subsets which have been defined. You can display it using the Row Subsets (
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 61 of 255
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 62 of 255
11/18/14, 17:34
Statistics Window
The Statistics Window shows statistics for the values in each of the table's columns. You can display it using the Column Statistics (
button when the chosen table is selected in the Control Window's Table List.
The calculated values are displayed in a JTable widget with a row for each column in the main table, and a column for each of a number of
statistical quantities calculated on some or all of the values in the data table column corresponding to that grid row. The following columns
are shown by default:
Name
The name of the column in the main table represented by this grid row.
Mean
The mean value of the good cells. For boolean columns, this is the proportion of good cells which are True.
SD
The population standard deviation of the good cells.
Minimum
The minimum value. For numeric columns the meaning of this is quite obvious. For other columns, if an ordering can be reasonably
defined on them, the 'smallest' value may be shown. For instance string values will show the entry which would be first alphabetically.
Maximum
As minimum, but shows the largest values.
nGood
The number of non-blank cells.
Several additional items of statistical information are also calculated, but the columns displaying these are hidden by default to avoid clutter.
You can reveal these by using the Display menu:
Index
The index of the column in the table, i.e. the order in which it is displayed.
$ID
The unique identifier label for the column in the main table.
Sum
The sum of all the values in the column. For boolean columns this is a count of the number of True values in the column.
Variance
The population variance of the good cells.
Sample SD
The sample standard deviation of the good cells.
Sample Variance
The sample variance of the good cells.
Median Absolute Deviation
The median of absolute deviations from the median: median(abs(x-median(x)). This is a robust measure of statistical dispersion.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 63 of 255
11/18/14, 17:34
Page 64 of 255
11/18/14, 17:34
Page 65 of 255
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 66 of 255
11/18/14, 17:34
Plot window
Plot windows consist of two main parts: the Plot Panel containing the actual plotted graphics (by default, at the top), and the Control Panel
(by default, at the bottom). The Control Panel is where you configure what will be plotted. For a simple scatter plot it may just be a case of
selecting what columns to plot against each other, but it can get quite detailed. If you want more screen space to play with, it can be helpful
to float the control panel into a separate window using the Float Controls (
) toolbar button; you can find this button in both the main and
the control panel toolbars. To unfloat the control panel, either just close the control panel window, or click the Float Controls toolbar button
again. With floating controls, the window looks like the following figure.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 67 of 255
11/18/14, 17:34
) and Legend (
) are visible.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 68 of 255
11/18/14, 17:34
obscuring earlier one), so you can drag them up and down until you have the layers you want on top.
The different layer controls are described in Appendix A.4.4.
In the foot of the window, there are also four other small panels:
Position Panel
When the cursor is positioned over the plot itself, this reports its position in data coordinates. In some cases, such as 3-d plots, this
may not be possible, in which case it's blank.
Count Panel
Displays the number of points currently plotted and the total number of points represented by the plot. The total (the second figure) is
the number of positions in all the plotted data sets, and the current number (the first figure) excludes those in subsets not currently
plotted and those outside the bounds of the visible plot.
Navigation Help
Shows some reminders for what different mouse gestures do. Little icons are supposed to represent clicking and dragging different
mouse buttons and the mouse wheel. Note the content changes according to where the mouse is on the plot, since that affects
navigation behaviour. For more information see Appendix A.4.2.1. Clicking on the button will make this panel go away.
Progress Bar
If something slow is happening you may see a progress bar at the bottom of the screen while you wait. Unless you are plotting several
million points, you may not see this at all. For slow data loads, this will always be displayed. For actions like actually drawing the plot
and turning a blob into a subset selection you can choose whether progress is shown using the Show Plot Progress (
) button in the
toolbar. It's nice to know that something's going on, but it can be distracting; displaying progress also slows the plot down a bit.
The main toolbar at the top of the window contains the following actions (repeated in the menus):
Float Controls
Puts the Control Panel into a floating window rather than at the bottom of the plot window, as described above. Once floating, the
control panel can be joined back to the main window by clicking this button again.
Draw Subset Region
Allows you to draw a region on the screen defining a new Row Subset. When you have finished drawing it, click this button again to
indicate you're done. See Appendix A.4.2.3 for more details.
Subset From Visible
Defines a new Row Subset consisting of only the points which are currently visible on the plotting surface. See Appendix A.4.2.3 for
more explanation.
Replot
Redraws the current plot. It is usually not necessary to use this button, since if you change any of the plot characteristics with the
controls in this window the plot will be redrawn automatically. However if you have changed the data, e.g. by editing cells in the Data
Window, or by redefining a subset, the plot is not automatically redrawn. Clicking this button redraws the plot taking account of any
changes to the table data.
Rescale
Rescales the axes of the current plot so that it contains all the data points in the currently selected subsets. By default the plot will be
initially scaled like this, but it it may have changed because of changes in the subset selection or from zooming in or out.
Lock Axes
Usually, when the data plotted has changed significantly, the axes are automatically rescaled so that all the points are visible. The
application makes a guess about when it's a good idea to do this automatic rescaling. If you don't want it to auto-rescale, set this toggle
button, and it won't rescale unless it really has to. This is not available for the Sky Plot.
Sketch Frames
If selected causes intermediate "sketch" frames to be drawn when navigating around very large plots. For plots that take a long time (at
least a non-negligable fraction of a second) to draw, if this option is selected then when navigating around it will paint intermediate
frames based on a subsample of the data rather than painting the whole plot at every step. This can result in a somewhat flickering
appearance, but it means that frame updates happen more frequently, so it's a bit more responsive.
Show Plot Progress
If selected a progress bar at the bottom of the window is active when large (slow) plots are in progress. This can be useful if you are
navigating round a very large plot so that you can see something is happening rather than the application apparently just doing
nothing. On the other hand a flickering progress bar can be distracting. Updating the progress bar may also slow the plot down a little.
Export Plot
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 69 of 255
11/18/14, 17:34
Allows you to save the plot in a variety of graphics formats using the Plot Export window.
The following subsections explain some other features common to all the plotting windows.
A.4.2.1 Navigation
All the plot windows are interactive, and you can navigate around them using the mouse buttons. For most plot types the left and right
buttons and the mouse wheel do something; in 3d plots the middle button is used as well.
The details of what mouse actions do what depend on which plot window you are using, and they can also be configured to some extent
using the Navigation tab in the Axes fixed control in the control stack. However, as a rule, the actions when used on the body of the plot are
these:
Left drag
Drags the plot around. Where possible, the same plot position stays under the cursor as you drag. In 2d this pans the plot
left/right/up/down, and in 3d it rotates it.
Right drag
Stretch zoom. Dragging up/down stretches/squashes the plot vertically, and dragging left/right stretches/squashes it horizontally. The
zoom is centered on the position where you start the drag from, so that data position stays in the same place on the screen. In 3d, the
zoom is along the two plot directions most closely aligned with the plane of the screen.
Middle drag
Frame zoom. Dragging right-and-down or right-and-up drags out a frame; when the button is released, the plot will be zoomed in to
cover area enclosed by the frame. Dragging left (and up or down) does something like the opposite, you can zoom out using a similar
(though not quite the same) mechanism.
Mouse wheel
Spinning the mouse wheel forwards/backwards will zoom in/out. In 2d the zoom is around the current position of the mouse, and in 3d
it is (usually) around the center of the view cube.
Left click
Identifies a point. If there is a plotted point near the cursor, it will plot a marker on it and activate it. If you click on an empty bit of the
plot, any existing activated point will be removed, otherwise nothing will happen.
In the 2d plot types, you can pan or zoom in just one direction by using the same actions outside of the plot itself. If you do a pan/zoom
action to the left of the Y axis, it will pan/zoom only vertically, and if you do it below the X axis, it will do it only horizontally.
Most of these actions give you some visual feedback on the screen, showing a rectangle or some arrows to give you a clue what you're
doing. If you find that distracting, you can turn it off using the Plot|Show Navigation Graphics (
) menu item.
Page 70 of 255
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 71 of 255
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 72 of 255
11/18/14, 17:34
Region-Drawing Mode
When you're happy with the region you've defined, click the
In either case, when you have indicated that you want to define a new row subset, a dialogue box will pop up to ask you its name. As
described in Section 3.1.1, it's a good idea to use a name which is just composed of letters, numbers and underscores. You can optionally
select a subset name which has been used before from the list, which will overwrite the former contents of that subset. When you enter a
name and hit the OK button, the new subset will be created and the points in it will be shown straight away on the plot using a new symbol.
As usual, you can toggle whether the points in this subset are displayed using the Subsets tab in the table layer control.
A.4.2.4 Plot Export Window
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 73 of 255
11/18/14, 17:34
You can select a file in the usual way, and save the plot in one of the following graphics formats:
png
PNG bitmap. The background is opaque.
png-transp
PNG bitmap with a transparent background. Background pixels that fall outside the plot surface itself (for instance outside the axes for
a Plane plot or outside the celestial sphere for a Sky plot) are transparent.
gif
GIF bitmap; note the number of colours is limited to 256.
jpeg
JPEG bitmap; note that this is a lossy format, better suited to photographs than plots, and colours will be blurred.
pdf
Portable Document Format; in most cases this vector format gives pretty good output, in particular text will be rendered properly.
eps
Encapsulated PostScript; PostScript cannot handle transparency, which means that in some cases the output will come out wrong.
PostScript files can also be very large if there are many data points.
eps-gzip
Just like eps, but the output is gzipped before output.
There are two additional controls on the right hand side of this window:
File Format
Selects the output file format as above. The default setting is (auto), which guesses what format you want to use from the filename,
and which usually does the right thing.
Force Bitmap
This option only has an effect for vector graphics formats (PDF and PostScript). If selected, it draws the data contents of the plot as a
pixel map and embeds that into the output file rather than plotting each point in the output. This may make the output less beautiful
(round markers will no longer be perfectly round), but it may result in a much smaller file if there are very many data points. Plot
annotations such as axis labels will not be affected - they are still drawn as vector text. Note that in some cases (e.g. use of the auto or
density shading modes) this kind of pixellisation will happen in any case.
Exporting to the pixel-based formats (GIF, JPEG, PNG) is fairly straightforward: each pixel on the screen appears as one pixel in the output
file. PNG is generally recommended. GIF works well in most cases, but if there are more than 255 colours some of the colour resolution will
be lost. JPEG can preserve a wide range of colours, but does not support transparency and is lossy, so close inspection of image features will
reveal blurring.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 74 of 255
11/18/14, 17:34
When exporting to Portable Document Format (PDF) or Encapsulated PostScript (EPS), which are vector graphics formats, there are a few
things to consider:
Positional Quantisation
Some of the shading modes (Density, Auto) are inherently pixellated, and others (Flat, Aux) are not. In the former case you will see
pixel boundaries for the plotted points rather than nice rounded edges at high magnifications (though text and axes will always be
plotted nicely). In both cases, at present the positional resolution is the same as it would be on the screen, so if you have a 400-pixel
high plot for instance, there are only 400 possible Y coordinates at which a marker can be plotted, which in general is not obvious by
looking at the output plot. In future versions the positional resolution of non-pixellated modes may be improved. In either case,
increasing the size of the plot on the screen by resizing the window before performing an export to PDF or EPS will reduce the effect
of the positional quantisation. Note it will also have the effect of making the text labels proportionally smaller to the graphics, so you
may want to increase the font size too.
Transparency
For technical reasons transparent markers cannot easily be rendered when a plot is exported to PostScript. In some cases the plot is
done using a bitmap in the PostScript output to permit transparency and in some cases the points are just plotted opaque. PDF does a
bit better, but the compositing of transparent shapes is sometimes a bit different on the screen and rendered to a PDF. It's a good idea
to check the output of screen exports by looking at the produced file - if it doesn't look like it should do, setting the Force Bitmap
option will probably make sure it does, though this will also pixellate the plotted symbols. There is more discussion of this point in the
subsections for the various shading modes.
File Size
In some cases (2D and 3D scatter plots with many thousands of points or more) output EPS files can get extremely large; the size
scales with the number of points drawn, currently with a factor of a few hundred bytes per point. In some cases you can work round
this by plotting some points as transparent so that the plot is rendered as a bitmap (see the discussion of transparency above) which
scales as the number of pixels rather than the number of points. The Gzipped EPS format helps somewhat (though can be slow); PDF
output is better still. Even PDF files may be unmanageably large for very many points however.
) has a number of tabs specific to the particular plot type. These tabs allow you to configure things like the axis ranges,
linear/log axis scaling, axis labelling, grid drawing, details of the navigation controls and so on. The different plot types have axis controls
that differ significantly from each other; the specific axis controls are described separately along with each plot type.
A.4.3.2 Legend
The Legend control (
) is always visible in the plot Control Panel. It allows you to configure whether and how the plot legend appears.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 75 of 255
11/18/14, 17:34
) is only visible when the Aux colour mode has been selected for one of the data layers; if no layer is using Aux
shading, the control will not appear in the stack. It controls a single colour scale for points which are coloured by data value to represent an
additional dimension in the data.
When present, this control has three following tabs.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 76 of 255
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 77 of 255
11/18/14, 17:34
The Range tab lets you enter lower and upper values for the aux data range by hand, and provides a double slider to restrict the range within
these limits. If either the lower or upper range is left blank, it will be determined from the data.
Note the font used for labelling the aux axis is currently controlled by the font from the Axes selector.
) is available for all the plot types. Most plots start off with one of these in the stack by default, and you can
) button in the control panel toolbar, or the corresponding item in the Layers
menu.
This is the control which is used for most of the data plotting in the plotting windows. Each instance of this control in the stack does plotting
for a particular set of positions from a single table. The set of positions is defined in the Positions tab as a column name or expression for
each plot coordinate (e.g. for X and Y in a plane plot). However, the control can generate multiple layers from these positions; the Subsets
tab controls which subsets are plotted and how each one is identified, and the Form tab provides many options for what graphics will be
plotted based on the positions.
This control is a Table Data control as described in Appendix A.4.2.2. That section explains the Subsets tab; the Position and Form tabs are
described in more detail below.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 78 of 255
11/18/14, 17:34
) allows you to plot symbols linking two positions in the plot space from the same table. You can add
one of these controls to the stack by using the Add Pair Control (
Layers menu.
This control is particularly useful for visualising the results of a crossmatch, and it is used automatically by the Plot Result (
) option
offered by some of the Match Window results. If you want to plot pairs of points from different input tables, you first have to create a joined
table by using one of the crossmatch functions.
It works in a similar way to the Single Position Layer Control, but the Position tab has fields for not one but two sets of coordinates to fill in.
This control is a Table Data control as described in Appendix A.4.2.2. That section explains the Subsets tab; the Position and Form tabs are
described in more detail below.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 79 of 255
11/18/14, 17:34
) which draws the points at both ends of the pair, and Link (
) which draws a
line linking them. You can configure these, and select them on or off, separately. The detail panel for these forms are dependent on the form
itself and are described in more detail in Appendix A.4.5, but the detail panels are divided into these parts:
Shading
The shading mode controls how points are shaded based on their chosen colour. The various options are described in Appendix A.4.6.
Depending on the mode there may be more settings to fill in here.
Global/Subset Styles
Controls the style details for the chosen form; see Appendix A.4.2.2.
A.4.4.3 Histogram Layer Control
The Histogram layer control (
), allows you to plot a 1-dimensional histogram. It is the main control in the Histogram plot window, but is
also available in the Plane plot window, so you can overplot a histogram on a scatter plot, if you can think of some reason to do that. The
Histogram window starts off with one of these controls in the stack by default, but as usual you can add more by using the Add Histogram
Control (
) button in the control panel toolbar, or the corresponding item in the Layers menu.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 80 of 255
11/18/14, 17:34
Each instance of this control in the stack can plot a histogram of a particular quantity from a particular table. The value to be histogrammed,
and optionally an associated weighting term, are defined in the Positions tab using column names or expressions. However, the control can
generate multiple layers from these coordinates; the Subsets tab controls which subsets are plotted and how each one is identified, and the
Form tab provides many options for what graphics will be plotted based on the positions.
This control is a Table Data control as described in Appendix A.4.2.2. That section explains the Subsets tab; the Position and Form tabs are
described in more detail below.
Page 81 of 255
11/18/14, 17:34
This control is experimental. As currently implemented it lacks some important features. It may be improved or withdrawn in a future
version.
The Spectrogram Layer Control (
) plots a spectrum at successive (usually, but not necessarily, regularly-spaced) points in a time series.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 82 of 255
11/18/14, 17:34
) is only available for the Plane and Histogram plots. Use the Layers menu item or corresponding toolbar
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 83 of 255
11/18/14, 17:34
Plane plot with two function layers plotted, one as a function of Horizontal axis value, and one as a function of Vertical axis value
This control has three tabs, Function, Style and Label, described below.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 84 of 255
11/18/14, 17:34
Independent Axis
Which axis the independent variable varies along; options are currently Horizontal and Vertical.
Independent Variable Name
Name of the independent variable. This is typically x for a horizontal independent variable and y for a vertical independent variable,
but any string that is a legal expression language identifier (starts with a letter, continues with letters, numbers, underscores) can be
used.
Function Expression
An expression using TOPCAT's expression language in terms of the independent variable that defines the function. This expression
must be standalone - it cannot reference any tables.
Page 85 of 255
11/18/14, 17:34
) plots markers of a fixed shape whose size varies according to a supplied data coordinate. The marker size thus
Page 86 of 255
11/18/14, 17:34
) plots directed lines from the data position given delta values for the coordinates. The plotted markers are typically
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 87 of 255
11/18/14, 17:34
) draws symmetric or asymmetric error bars in some or all of the dimensions of a 1-, 2- or 3-dimensional
Cartesian plot. The shape of the error "bars" is quite configurable, including (for 2- and 3-d errors) ellipses, rectangles etc, aligned with the
axes (for rotated ellipses and rectangles, see the Ellipse form).
The configuration options are:
Shading Mode
See Appendix A.4.6.
X Positive Error, X Negative Error, ...
For each dimension of the plot, you can enter positive and/or negative error values as columns or expressions from the table. All of
these values must be positive; any negative values will be ignored. If both positive and negative values are filled in for an axis, the
errors will be asymmetric. If the negative value is blank (either because the coordinate is not filled in, or because its value is blank for
that row), the error bars will be symmetric, i.e. the negative error bar will be the same size as the positive one. If you want to ensure
only a positive error bar is plotted, enter "0" for the corresponding negative error.
Error Bar
Error bar shape from a list of options. Exact appearance will also depend on the dimensionality of the supplied errors.
A.4.5.5 Ellipse Form
) draws an ellipse (or rectangle, or other similar figure) defined by major and minor radii and an optional rotation
angle.
The configuration options are:
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 88 of 255
11/18/14, 17:34
Shading Mode
See Appendix A.4.6.
Major Radius, Minor Radius
Two radii for the ellipse, in the same units as the position coordinates (which is degrees for the sky plot). It doesn't matter whether the
major one is larger than the minor one.
Orientation
Position angle in degrees. For the plane plot it is the angle anticlockwise from the X axis to the major radius. For the sky plot it is the
angle from the North pole to the major axis in the direction of positive RA. If the value is missing (either this field not filled in or
blank in the data) it is considered to be zero.
Ellipse
Ellipse shape, selected from a range of options (includes also rectangles, crosses etc).
Scale
Changes the factor by which all ellipse sizes are scaled. If the ellipses are too small, slide it right, if they are too big, slide it left. The
scale is logarithmic.
Auto Scale
If selected, this option will determine the default ellipse scale size from the data - it will fix it so that the largest ellipses are a few tens
of pixels long by default. That scaling can then be adjusted using the Scale slider. If unselected, then the default position of the Scale
slider corresponds to the actual positions given by the submitted ellipse radii coordinates.
A.4.5.6 Line Form
) draws a point-to-point line joining up the points making up the data set. Note that for a large and unordered data set this
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 89 of 255
11/18/14, 17:34
) plots position density contours. These provide another way (alongside the Auto and Density shading modes) to
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 90 of 255
11/18/14, 17:34
) is available from the pair position layer control, and plots a marker of configurable shape and size at both points
in a position pair. The same marker is used for both ends; if you want different points you can use two single Mark forms.
Configuration options are:
Shading Mode
See Appendix A.4.6.
Shape
Marker shape from a list of options.
Size
Marker size in pixels.
A.4.5.10 Pair Link Form
) is available from the pair position layer control, and plots a line linking the two points in a position pair.
Page 91 of 255
11/18/14, 17:34
Shading Mode
Shading Mode
See Appendix A.4.6.
) simply colours points in the colour selected by their style. It has no additional parameters or coordinates.
Exporting: This mode works without problem for both bitmapped and vector output.
A.4.6.2 Translucent Mode
) colours shapes in a transparent version of the colour selected by their style. The degree of
transparency is determined by how many points are currently being plotted on top of each other, and by the Transparency Level slider; as
you slide further to the right, points get more transparent. Unlike transparent mode, the transparency varies according to the current point
density, so you can usually leave the setting the same as you zoom in and out.
Exporting: When the points are opaque, this mode works without problem for both bitmapped and vector output, but when the transparency
is set there may be anomalies. Transparent points are rendered in PDF output, though the transparency levels may not be exactly the same as
on the screen. This can be fixed by using the Force Bitmap option in the Plot Export dialogue. For PostScript, transparent points are
rendered as opaque. You can use Force Bitmap with PostScript which will get transparency right for this layer, but then any earlier layers
will be completely obscured.
A.4.6.3 Transparent Mode
) colours shapes in a transparent version of the colour selected by their style. The degree of
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 92 of 255
11/18/14, 17:34
transparency is determined by the Opaque Limit slider - at the left end, points are fully opaque and this is equivalent to Flat mode, and as
you slide further to the right, the points get more transparent. The higher the opaque limit, the more points have to be plotted on top of each
other to reach colour that fully obscures the background. Unlike translucent mode, transparency of each colour is fixed by the opaque limit,
rather than adjusting depending on the density of points currently plotted.
Exporting: When the points are opaque, this mode works without problem for both bitmapped and vector output, but when the transparency
is set there may be anomalies. Transparent points are rendered in PDF output, though the transparency levels may not be exactly the same as
on the screen. This can be fixed by using the Force Bitmap option in the Plot Export dialogue. For PostScript, transparent points are
rendered as opaque. You can use Force Bitmap with PostScript which will get transparency right for this layer, but then any earlier layers
will be completely obscured.
A.4.6.4 Auto Mode
) colours isolated points in their selected colour, but where multiple points from the same data set overlap it
adjusts the colour by darkening it. This means for that isolated points (most or all points in a non-crowded plot, or outliers in a crowded plot)
it behaves just like Flat mode, but it's easy to see where overdense regions lie.
This is like Density mode, but with no user-configurable options.
This is the default mode for 2d plots, since it gives you a good first idea of what the data is doing. For 3d plots it can be used, and it works
well for single dataset plots, but in the case of multiple datasets it can be misleading since the coloured pixels can't be placed sensibly in the
3d space.
The colour darkening is based on the asinh function; the intention is that two points overlaid should be just enough different in colour for the
difference to be visible, and the mapping is scaled so that if there are very dense regions they will come out nearly black.
Exporting: When exported to vector formats, the output is automatically forced to a bitmap for Auto-mode layers. In the case of PostScript,
this completely obscures any previous layers.
A.4.6.5 Density Mode
) uses a configurable colour map to indicate how many points are plotted over each other. Specifically, it
colours each pixel according to how many times that pixel has has been covered by one of the shapes plotted by the layer in question. To put
it another way, it generates a false-colour density map with pixel granularity using a smoothing kernel of the form of the shapes plotted by
the layer. The upshot is that you can see the plot density of points or other shapes plotted.
This is like Auto mode, but with more user-configurable options. The options are:
Map
The colour map for displaying density values. There are two types, relative and absolute. Relative maps have names marked by a star
("*"), and alter the basic dataset colour, for instance by darkening or lightening it, while absolute maps (the rest) ignore the basic
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 93 of 255
11/18/14, 17:34
dataset colour altogether. For a single-dataset plot, the absolute maps are best, but for multiple subsets it may be less confusing to use
a relative one.
Map Clip
Select only a part of the colour map selected above. By default the whole colour map is used, but if you want the range of colours in
the plot to be formed from only a part of the colour band shown in the Shader control, you can move the handles in from the end of
this slider.
Log
Selects whether the colour map should be applied linearly or logarithmically to the range of densities. The default is logarithmic.
Flip
Selects whether the colour map should be applied forwards or backwards to the range of densities.
Sub-range
Adjusts the density range over which the colour map is applied. By default the colour map is scaled using limits found from the data
density in the plot (the most dense few pixels are ignored), but you can restrict the range using this slider.
Exporting: When exported to vector formats, the output is automatically forced to a bitmap for Density-mode layers. In the case of
PostScript, this completely obscures any previous layers.
A.4.6.6 Aux Mode
) colours each point according to the value of an additional data coordinate. The point colours then represent an
additional dimension of the plot. There is an additional option to draw the points with a fixed transparency.
The shading is done according to a single fixed scale for all the data in the plot. When at least one Aux-mode layer is being plotted, the Aux
Axis control is visible in the control panel, which allows you to configure the colour map, range, ramp display etc.
The options are:
Aux
The auxiliary coordinate data values. Fill this in with a column name or expression from the table just like for a positional coordinate.
Opaque Limit
Determines transparency of the points. By default, they are fully opaque, but if you slide the slider to the right, they will become
progressively more transparent.
Exporting: Transparent points are rendered in PDF output, though the transparency levels may not be exactly the same as on the screen.
This can be fixed by using the Force Bitmap option in the Plot Export dialogue. For PostScript, transparent points are rendered as opaque.
You can use Force Bitmap with PostScript which will get transparency right for this layer, but then any earlier layers will be completely
obscured.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 94 of 255
11/18/14, 17:34
) plots 1-dimensional histograms. In many respects it is like the Plane Plot, but it has an additional fixed control
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 95 of 255
11/18/14, 17:34
For general comments on plot navigation, see Appendix A.4.2.1. Additional configuration options are available in the Navigation tab of the
Axes control.
The navigation actions for this window are:
Left drag
Pan. On the body of the plot this moves it around up/down/left/right. To move it only vertically, drag on the left of the Y axis. To
move it only horizontally, drag below the X axis. You can configure dragging on the body of the plot to be only vertical or horizontal
by setting the Pan/Zoom Axes in the Navigation axis configuration tab.
Right drag (CTRL-drag)
Stretch zoom. On the body of the plot, dragging up/down stretches/squashes the plot vertically, and dragging left/right
stretches/squashes it horizontally. To zoom only vertically, drag on the left of the Y axis. To zoom only horizontally, drag below the X
axis.
Zooming horizontally will normally adjust the width of the histogram bars appropriately.
Normally, the zoom will be centered horizontally at the mouse position and vertically on the X axis, so the zoom will not move the
bottom of the histogram. You can adjust that with the Anchor X/Y Axis options in the Navigation axis configuration tab.
Wheel
Isotropic zoom. Spinning the mouse wheel forwards/backwards will zoom in/out just like dragging with the right button up-and-right
or down-and-left.
You can also manually fix the plot bounds using the Range tab of the Axes control.
A.4.7.2 Histogram Axes Control
The Histogram Plot axis control is very similar to the Plane Plot axis control described in Appendix A.4.8.2. The only difference is in the
Navigation tab. For the histogram, the Anchor X Axis option is set on by default, since you will usually want the Y=0 line to stay anchored
to the bottom of the plot when zooming.
A.4.7.3 Bars Control
The Bars control (
) is found in the control stack of the Histogram window. It configures the common placement and calculation of the
bars for all the histogram layers displayed. It has the following fields:
Bin Size
A scale for the width of bins that are shown on the screen. There are two ways to specify this. If the left-hand radio button is selected,
the adjacent slider will adjust the bin size, which is also affected by the actual width of the plotting window in pixels. Slide the slider
left to get narrower bins or right to get wider ones. If the right-hand radio button is selected, you can enter a numeric value giving the
actual width in data units of each bar (for a logarithmic X axis this value is a factor).
Bin Phase
Controls where the horizontal zero point for binning is set. For instance if your bin size is 1, it controls whether bins boundaries are at
0, 1, 2, .. or 0.5, 1.5, 2.5, ... etc. If the slider is at either end of the scale, there will be a bin boundary at X=0 (linear X axis) or X=1
(logarithmic X axis).
Cumulative
If true, the bars plotted are calculated cumulatively; each bin includes the counts from all previous bins.
Normalized
If true, the counts in each plotted histogram are normalised to sum to a value of 1.
Page 96 of 255
11/18/14, 17:34
) plots 2-dimensional Cartesian positions on a plane. The positional coordinates are X and Y. To control the direction
and linear/log scaling of the axes, see the Coords tab of the Axes control.
See the Window Overview for features common to all plotting windows. The following subsections describe navigation and axis
configuration.
The Plane Plot offers the following plot controls:
Position Layer Control, with these form options:
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 97 of 255
11/18/14, 17:34
Mark
Size
Vector
Error Bars
Ellipse
Line
Text Label
Contour
Pair Layer Control, with the following plot controls:
Marks
Link
Histogram Layer Control
Function Layer Control
A.4.8.1 Plane Navigation
For general comments on plot navigation, see Appendix A.4.2.1. Additional configuration options are available in the Navigation tab of the
Axes control.
The navigation actions for this window are:
Left drag
Pan. On the body of the plot this moves it around up/down/left/right. To move it only vertically, drag on the left of the Y axis. To
move it only horizontally, drag below the X axis. You can configure dragging on the body of the plot to be only vertical or horizontal
by setting the Pan/Zoom Axes in the Navigation axis configuration tab.
Right drag (CTRL-drag)
Stretch zoom. On the body of the plot, dragging up/down stretches/squashes the plot vertically, and dragging left/right
stretches/squashes it horizontally. Zooming is around the mouse position at the start of the drag. To zoom only vertically, drag on the
left of the Y axis. To zoom only horizontally, drag below the X axis.
Center drag (SHIFT-drag)
Frame zoom. On the body of the plot, dragging right-and-down or right-and-up drags out a frame; when the button is released, the plot
will be zoomed in to cover the area enclosed by the frame. Dragging left (and up or down) does something like the opposite, you can
zoom out using a similar (though not quite the same) mechanism. To zoom in/out only horizontally, drag right/left below the X axis.
To zoom in/out only vertically, drag up/down on the left of the Y axis.
Wheel
Isotropic zoom. Spinning the mouse wheel forwards/backwards will zoom in/out around the mouse position, just like dragging with
the right button up-and-right or down-and-left.
Left click
Select. If there is a plotted point near the cursor, it will plot a marker on it and activate it.
You can also manually fix the plot bounds using the Range tab of the Axes control.
A.4.8.2 Plane Axes Control
The Axes control (
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 98 of 255
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
Page 99 of 255
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Font tab
The Font tab configures the font used for axis annotation. It also affects some other things like the legend.
Text Syntax
How to turn the text into characters on the screen. Plain and Antialias both take the text at face value, but Antialias smooths the
characters. Antialiased text usually looks nicer, but can be perceptibly slower to plot. At time of writing, on MacOS antialiased text
seems to be required to stop the writing coming out upside-down for non-horizontal text. LaTeX interprets the text as LaTeX source
code and typesets it accordingly.
Font Size
Size of the font in points.
Font Style
Style of the font.
Font Weight
Whether the font is plain, bold or italic.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
) plots longitude/latitude positions onto the celestial sphere. It can plot to a number of projections (currently Sin, Aitoff
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
11/18/14, 17:34
Controls whether grid lines will be drawn antialiased (smoothed) or not. This option does not affect exported plots.
Font tab
The Font tab configures the font used for axis annotation. It also affects some other things like the legend.
Text Syntax
How to turn the text into characters on the screen. Plain and Antialias both take the text at face value, but Antialias smooths the
characters. Antialiased text usually looks nicer, but can be perceptibly slower to plot. At time of writing, on MacOS antialiased text
seems to be required to stop the writing coming out upside-down for non-horizontal text. LaTeX interprets the text as LaTeX source
code and typesets it accordingly.
Font Size
Size of the font in points.
Font Style
Style of the font.
Font Weight
Whether the font is plain, bold or italic.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
The positional coordinates are X, Y and Z. To control the direction and linear/logarithmic scaling of the axes, see the Coords tab of the Axes
control.
See the Window Overview for features common to all plotting windows. The following subsections describe navigation and axis
configuration.
The cube plot offers the following plot controls:
Position Layer Control, with these form options:
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Mark
Size
Vector
Error Bars
Ellipse
Line
Text Label
Contour
Pair Layer Control, with the following plot controls:
Marks
Link
Note that use of the Auto and Density shading modes can be confusing in 3 dimensions with multiple datasets. This is because pixels based
on density along a line of sight are not located at any point on that line, so shaded pixels can't appear at the "right" place in the 3-d space.
The same applies to a lesser extent with contours. They work fine with a single dataset though.
A.4.10.1 Cube Navigation
For general comments on plot navigation, see Appendix A.4.2.1. Additional configuration options are available in the Navigation tab of the
Axes control.
Navigation in three dimensions with a two-dimensional screen and mouse is a bit of a challenge. However, the actions listed below should
make it fairly straightforward to navigate around points in 3d space to zoom in on the regions that you are interested in.
Left drag
Rotate. Rotates the view cube about its center.
Wheel
Isotropic zoom. Spinning the mouse wheel forwards/backwards zooms the space in the view cube in/out around the cube center. The
mouse position does not affect it.
Right drag (CTRL-drag)
2d stretch zoom. Dragging with the right button does a stretch zoom in the two dimensions best aligned with the plane of the screen.
There is no movement in the third (mostly perpendicular to the screen) direction. The zoom is around a line defined by the position of
the mouse at the start of the zoom, pointing along the third dimension. You can stretch/squash in both directions by dragging the
mouse up/down/left/right - it's easier to try it than to explain it.
Center drag (SHIFT-drag)
2d pan. Dragging with the center button pans the 3d space in the two dimensions best alighned with the plane of the screen. There is
no movement in the third (mostly perpendicular to the screen) direction.
Left click
Select. If there are plotted points near the cursor it will identify one, plot a marker on it, and activate it.
In 3d, it's not obvious which is the nearest point to a 2d cursor, since a screen position represents a line not a point. To break the
degeneracy, the point used is the one nearest the center of mass of plotted points along the line of sight represented by the cursor
position. The upshot of this is that if you click on an isolated point, you'll pick that point, and if you click on a dense cluster, you'll get
a point near the center (of mass) of that cluster.
Right click (CTRL-click)
Re-center. Right-clicking identifies a position in a similar way to the left-click Select action, and then translates the plot so that point is
at the center of the view cube. This means that clicking on a cluster will put that cluster in the center of the cube. If you click on an
empty region, a position half way between front and back of the cube at that X/Y position will be used.
You can also manually fix the plot bounds using the Range tab of the Axes control.
A.4.10.2 Cube Axes Control
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Font tab
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
The Font tab configures the font used for axis annotation. It also affects some other things like the legend.
Text Syntax
How to turn the text into characters on the screen. Plain and Antialias both take the text at face value, but Antialias smooths the
characters. Antialiased text usually looks nicer, but can be perceptibly slower to plot. At time of writing, on MacOS antialiased text
seems to be required to stop the writing coming out upside-down for non-horizontal text. LaTeX interprets the text as LaTeX source
code and typesets it accordingly.
Font Size
Size of the font in points.
Font Style
Style of the font.
Font Weight
Whether the font is plain, bold or italic.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
) plots spherical polar coordinates in an isotropic 3-dimensional space. Although the supplied coordinates are spherical
polar, the visible space is not necessarily centred on the coordinate origin, and the visible axes are Cartesian. In many respects this works
like the Cube Plot Window
The positional coordinates are Longitude and Latitude (in degrees) and Radius.
See the Window Overview for features common to all plotting windows. The following subsections describe navigation and axis
configuration.
The sphere plot offers the following plot controls:
Position Layer Control, with these form options:
Mark
Size
Text Label
Contour
Pair Layer Control, with the following plot controls:
Marks
Link
Note that use of the Auto and Density shading modes can be confusing in 3 dimensions with multiple datasets. This is because pixels based
on density along a line of sight are not located at any point on that line, so shaded pixels can't appear at the "right" place in the 3-d space.
The same applies to a lesser extent with contours. They work fine with a single dataset though.
A.4.11.1 Sphere Navigation
For general comments on plot navigation, see Appendix A.4.2.1. Additional configuration options are available in the Navigation tab of the
Axes control.
Navigation in three dimensions with a two-dimensional screen and mouse is a bit of a challenge. However, the actions listed below should
make it fairly straightforward to navigate around points in 3d space to zoom in on the regions that you are interested in. The actions are quite
like for the Cube Window, but all zooming is isotropic.
Left drag
Rotate. Rotates the view cube about its center.
Wheel
Zoom. Spinning the mouse wheel forwards/backwards zooms the space in the view cube in/out around the cube center. The mouse
position does not affect it.
Right drag (CTRL-drag)
Zoom. Zooming up-and-right/down-and-left does just the same as spinning the mouse wheel forwards/backwards.
Center drag (SHIFT-drag)
2d pan. Dragging with the center button pans the 3d space in the two dimensions best alighned with the plane of the screen. There is
no movement in the third (mostly perpendicular to the screen) direction.
Left click
Select. If there are plotted points near the cursor it will identify one, plot a marker on it, and activate it.
In 3d, it's not obvious which is the nearest point to a 2d cursor, since a screen position represents a line not a point. To break the
degeneracy, the point used is the one nearest the center of mass of plotted points along the line of sight represented by the cursor
position. The upshot of this is that if you click on an isolated point, you'll pick that point, and if you click on a dense cluster, you'll get
a point near the center (of mass) of that cluster.
Right click (CTRL-click)
Re-center. Right-clicking identifies a position in a similar way to the left-click Select action, and then translates the plot so that point is
at the center of the view cube. This means that clicking on a cluster will put that cluster in the center of the cube. If you click on an
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
empty region, a position half way between front and back of the cube at that X/Y position will be used.
You can also manually fix the plot bounds using the Range tab of the Axes control.
A.4.11.2 Sphere Axes Control
The Axes control (
The Navigation tab controls details of how the navigation works. It has the following option:
Zoom Factor
Controls the factor by which each zoom action zooms the plot. Moving this slider to the left/right makes the mouse more/less sensitive
(one wheel click or dragging a fixed distance has more/less zoom effect).
11/18/14, 17:34
The View tab can configure how the cube containing the data is viewed in the plot window, though it does not control the content of the
cube.
Rotation about Z axis
Explicitly sets the rotation angle about the Z axis, regardless of its current value, which may have been set by mouse actions.
Rotation from vertical
Explicitly sets the rotation angle from vertical, regardless of its current value, which may have been set by mouse actions.
Zoom factor
Sets the magnification of the cube wireframe itself, without affecting the data volume it contains. This cannot be done with the mouse.
X/Y offset of centre
Controls where on the screen the cube wireframe is centred. This cannot be done with the mouse.
Font tab
The Font tab configures the font used for axis annotation. It also affects some other things like the legend.
Text Syntax
How to turn the text into characters on the screen. Plain and Antialias both take the text at face value, but Antialias smooths the
characters. Antialiased text usually looks nicer, but can be perceptibly slower to plot. At time of writing, on MacOS antialiased text
seems to be required to stop the writing coming out upside-down for non-horizontal text. LaTeX interprets the text as LaTeX source
code and typesets it accordingly.
Font Size
Size of the font in points.
Font Style
Style of the font.
Font Weight
Whether the font is plain, bold or italic.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
The horizontal axis represents time, and can be labelled accordingly, and the window can display functions of time, scatter plots and
spectrograms. In future versions it may be able to plot multiple time series plots stacked vertically using the same horizontal axis, but at
present it doesn't do that.
See the Window Overview for features common to all plotting windows. The following subsections describe navigation and axis
configuration.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Font tab
The Font tab configures the font used for axis annotation. It also affects some other things like the legend.
Text Syntax
How to turn the text into characters on the screen. Plain and Antialias both take the text at face value, but Antialias smooths the
characters. Antialiased text usually looks nicer, but can be perceptibly slower to plot. At time of writing, on MacOS antialiased text
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
seems to be required to stop the writing coming out upside-down for non-horizontal text. LaTeX interprets the text as LaTeX source
code and typesets it accordingly.
Font Size
Size of the font in points.
Font Style
Style of the font.
Font Weight
Whether the font is plain, bold or italic.
11/18/14, 17:34
The Table selector gives the identifier of the table (one of the ones loaded into TOPCAT) that the data comes from.
The Axis selectors (here X Axis and Y Axis) give the quantities to be plotted. If you click the little down arrow at the right of each
selector you get a list of all the numeric columns in the chosen table, from which you can select one. If you click the little left and
right arrows to the right of the selector it will cycle through all the columns in the table. However, if you prefer you can type in an
expression to use here. This may be more convenient if there's a very long list of columns (another way to deal with this is to hide
most of the columns using the Column Window). However, what you type in doesn't have to be a column name, it can be an algebraic
expression based on columns in the table, or even a constant. In the example, the X axis is a straight column name, and the Y axis is an
expression. The expression language syntax is explained in Section 7.
The Log checkbox for each axis is used to select whether the scale should be logarithmic or linear.
The Flip checkbox for each axis is used to select whether the axis values increase in the conventional direction (left to right, bottom to
top) or its opposite.
Some of the buttons in the toolbar shown will modify what is visible in this panel, for instance inserting new selectors to allow
selection of error values. All the selectors work in the same way however.
Row Subsets panel
This defines which row subsets for will be plotted in this window, and what plotting style should be used for them. In this case there
are three defined subsets, All, galaxy and star. The checkboxes on the left indicate which ones will be displayed - here, only the latter
two. Sets of points are generally plotted in the order they are selected for viewing; since points plotted afterwards can obscure ones
plotted before ("underneath") this makes a difference. If you want to see a set of points without it being obscured by other ones in the
plot, then deselect it and reselect it again (clicking twice in the corresponding checkbox), and this will ensure that its points are plotted
on top.
The buttons to the right of each subset name show the symbol that is used in the plot to display the data from that subset, in this case a
red cross and a blue circle. These are selected automatically when the subset is first selected for viewing (the initial default style set
depends mainly on how many rows there are in the selected table - many rows gives small dots, few gives big ones). However, you
have a lot of freedom to configure how they appear. If you click the button with the symbol on it a dialogue will pop up which allows
you to select colour, shape, transparency and so on, as well as error bar style if appropriate and things like whether fitted lines will be
plotted for that subset. The options available differ according to the kind of plot, and are described along with the different graphics
windows in the following subsections. The style window stays visible until you dismiss it, but if you click on another of the buttons in
the Row Subsets panel its contents will change to allow you to select values for the corresponding subset. Most graphics windows
have a Marker Style menu. This allows you to change all the styles in the plot at once to be members of a uniform set, for instance
different coloured pixels, or black open shapes. If you select one of these it will overwrite the existing style selections, but they can be
edited individually afterwards.
Dataset Tool Bar
The toolbar shown above the data panel in the figure contains buttons which affect the dataset selector itself. The first two buttons add
and remove dataset Tabs (see below) and are present for all plots. The other items configure optional selectors appearing in the Data
Panel - the ones shown here are concerned with Auxiliary Axes, Point Labels and Error Bars, but not all the types of plot have exactly
the same ones.
Tabs
The example shows two tabs: Main and A; the currently visible one is A. You can select a tab by clicking on its name. In each tab you
select a table and a set of columns/expressions, and if they are all filled in it will contribute points (or bars, or whatever) to the plot.
The Main dataset determines the initial values for the axis labels, but the data comes equally from all of them. The numerical values of
the coordinates are treated the same for all the datasets, but their meanings might be different, for instance one dataset may be plotting
V magnitude against ellipticity and another plotting B magnitude against ellipticity.
The Add Dataset (
) buttons in the toolbar add a new tab or remove the selected one respectively.
Initially only the Main tab is present, and this one cannot be removed.
Sometimes (high-dimensional plots, auxiliary axes, error bars) a lot of information needs to be entered into the data panel, and the bottom
part of the window can get quite large. Normally, the plot in the upper part of the window shrinks to accommodate it. You can of course
resize the window to gain more space, but if your screen is small you may still end up with an uncomfortably small plot. If this happens, you
can use the following button from the main toolbar:
Split Window
When this toggle button is on, the dataset selector can be resized by dragging the bar between it and the plot itself up or down. If there
is insufficient space for all the components in the selector, a scrollbar will appear. When it is off (the default), the full height of the
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
selector will be visible, and the plot will shrink to accommodate it.
A.5.1.2 Axis Configuration and Zooming
In general terms the axes on which the graphics are plotted are defined by the datasets you have selected. The axis labels are set from the
column names or expressions chosen for the Main dataset, and the ranges are determined so that all the data from the chosen datasets can be
seen. However, these things can be adjusted manually.
The following features are available directly from the window for configuring axis range:
X-Y Zoom
In some of the windows (2d scatter plot, histogram and density map), you can change both axis ranges by zooming in or out with the
mouse on the plot surface itself. To zoom in, place the mouse at the top left of the region you want to examine, press the button, drag it
to the bottom right corner, and release the button. To zoom out, drag up and left instead. A box is drawn as you drag so you can see
what you're doing.
Centre Zoom
The 3d and spherical plots allow you to zoom in on the central part of the window. The 'active region' for dragging is to the left or
right of the plot (the region on the right is rather thin, and does not include the width used by the legend). When the pointer is in these
regions, the mouse cursor symbol should change to indicate that zooming can be done. Drag down to zoom in and up to zoom out.
An easier alternative for zooming in the 3D windows is to use the mouse wheel, if you have one: wheel forward to zoom in and
backward to zoom out.
Axis Zoom
In some of the windows (2d scatter plot, histogram, density map, stacked lines) you can modify the range on each axis independently
by dragging the mouse over where the axis is drawn. The 'active region' for dragging is just below the X axis and just to the left of the
Y axis, in the region where the numeric and text labels are written. When the pointer is in one of these regions, the mouse cursor
symbol should change to indicate that zooming can be done. As for the X-Y Zoom, drag left-to-right or up-to-down to zoom in and
right-to-left or down-to-up to zoom out.
Auxiliary (Colour) Axis Zoom
When Auxilary Axes are in use, you can zoom in and out of them by dragging up and down on the colour bar to the right of the plot,
in the same way as for a normal Axis Zoom above.
Rescale
If you find you're zoomed to a region you don't want to be in, you can use the Rescale toolbar button to return to the default scale (full
coverage). Note this affects any auxiliary axes as well as the spatial ones. Some windows may have per-axis rescale buttons too (
,
).
For more control over axis range and labelling, use the Configure Axes and Title (
following:
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
11/18/14, 17:34
None
Symmetric
Lower Only
Upper Only
Lower & Upper
These give you different column selector boxes, but work in much the same way as the symmetric ones.
There are many options for the plotting style of one, two and three dimensional error bars, including capped and uncapped bars, crosshairs,
ellipses and rectangles. This plotting style is controlled from the plot window's Style Editor window (see e.g. Appendix A.5.3.1), which can
be viewed by clicking on the marker icon in the Row Subsets panel at the bottom right of the window. The available error bar styles will
depend on which axes currently have errors; if none do, then the error bar selector will be disabled. You can also use the Error Style menu
to change the error style for all the visible datasets at once.
A.5.1.4 Point Labels
On the 2-d and 3-d scatter plots you can write text labels adjacent to plotted points. To do this click the Draw Labels (
) button in the
dataset toolbar (below the plotting area in the plot window). This will reveal a new Point Labels selector below the existing spatial ones.
Using this you can select any of the table columns (not just the numeric ones as for the other selectors), or give a string or numeric
expression involving them. When this selector is filled in, every point in the dataset which has a non-blank value for this quantity will have it
written next to the point on the display.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
) button in the dataset toolbar (below the plot area in a plot window). A new axis
selector will appear below the existing spatial ones, labelled Aux 1 Axis. It has log and flip checkboxes like the spatial axes, and to the right
(you may need to widen the window or use the scrollbar at the bottom to see it) is a selector depicting a number of colourmaps to choose
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
from - the default one resembling a rainbow is usually quite suitable, but you can pick others. If you enter a column name or expression into
the selector, each plotted point will be coloured according to the value of that quantity in the corresponding row of data. If that quantity is
null for a row, the corresponding point will not be plotted. A scale on the right of the plot indicates how the colour map corresponds to
numeric values. To remove the auxiliary axis and go back to normally-coloured points, simply click the Remove auxiliary axis (
)
button.
3D plot of simulation data showing X, Y, Z spatial position with the auxiliary axis indicating timestep.
There are two types of colour maps you can choose from: colour fixing and colour modifying. The fixing ones are easiest to understand: the
original colour of the point (as drawn in the legend) is ignored, and it is coloured according to the relevant value on the selected auxiliary
axis. The colour modifying maps take the original colour and affect it somehow, for instance by changing its transparency or its blue
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
component. These are marked with an asterisk ("*") in the colour map selector. They can be used to convey more information but are often
harder to interpret visually - for one thing the shading of the colour bar in the legend will not correspond exactly to the colours of the plotted
points.
By using modifying colour maps it is possible to perform plots with more than one auxiliary axis - typically the first one will be a fixing map
and subsequent ones will be modifying. So the first auxiliary axis could have the (fixing) Rainbow map, and the second could have the
(modifying) Transparency map. The colour alterations are applied in order. It is possible, but pointless, to have multiple fixing maps applied
to the same points - the last-numbered one will determine the colour and earlier ones will get ignored. Multiple aux axes can be obtained by
clicking the Add auxiliary axis button more than once. When combining several maps some thought has to be given to which ones to use some good combinations are the three RGB ones or the three YUV ones.
A fairly wide range of colour maps of both kinds is provided by default. If these do not suit your needs, it is possible to provide your own
custom colour fixing maps using the lut.files system property - see Section 10.2.3.
It is easy to generate attractive screenshots using auxiliary axes. Making visual sense of the results is a different matter. One visualisation
expert tried to dissuade their introduction in TOPCAT on the grounds that the graphics they produce are too hard for humans to interpret - I
hope that these plots can assist with some analysis, but it is a somewhat experimental feature which may or may not end up being widely
useful. The maximum number of auxiliary axes which can be used together is currently three. This could be increased on request, but if you
feel you can generate an intelligible plot using more than this then you're considerably smarter than me.
A.5.1.6 Defining Subsets by Region
When quantities are plotted in one of the graphics windows it becomes easy to see groupings of the data which might not otherwise be
apparent; a cluster of (X,Y) points representing a group of rows may correspond to a physically meaningful grouping of objects which you
would like to treat separately elsewhere in the program, for instance by calculating statistics on just these rows, writing them out to a new
table, or plotting them in a different colour on graphs with different coordinates. This is easily accomplished by creating a new Row Subset
containing the grouped points, and the graphics windows provide ways of doing this.
In some of the plots (Histogram 2d Scatter plot Density map and Spherical plot) you can set the axis ranges (either manually or by zooming
with the mouse - see Appendix A.5.1.2) so that only the points you want to identify are visible, and then click the New Subset From Visible
toolbar button (the icon is
,
or
depending on the plot type). This defines a subset consisting of all the points that are visible on
the current plot. This is only useful if the group you are interested in corresponds to a rectangular region in the plotting space.
A more flexible way is to draw a region or regions on the plot which identify the points you are interested in. To do this, hit the Draw Subset
Region (
) toolbar button. Having done this, you can drag the mouse around on the plot (keep the left mouse button down while you
move) to encircle the points that you're interested in. As you do so, a translucent grey blob will be left behind - anything inside the blob will
end up in the subset. You can draw one or many blobs, which may be overlapping or not. If you make a mistake while drawing a sequence of
blobs, you can click the right mouse button, and the most recently added blob will disappear. When you're in this region-drawing mode, you
can't zoom or resize the window or change the characteristics of the plot, and the Draw Subset Region button appears with a tick over it (
) to remind you you're in it. Here's what the plot looks like while you're drawing:
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Region-Drawing Mode
When you're happy with the region you've defined, click the
In either case, when you have indicated that you want to define a new row subset, a dialogue box will pop up to ask you its name. As
described in Section 3.1.1, it's a good idea to use a name which is just composed of letters, numbers and underscores. You can optionally
select a subset name which has been used before from the list, which will overwrite the former contents of that subset. When you enter a
name and hit the OK button, the new subset will be created and the points in it will be shown straight away on the plot using a new symbol.
As usual, you can toggle whether the points in this subset are displayed using the Row Subsets box at the bottom of the Plot Window.
A.5.1.7 Exporting Graphics
All the old-style graphics windows have the following export options in the toolbar:
Export as PDF
Export as GIF
and additionally, the Export menu contains:
Export as Encapsulated PostScript
Export as Gzipped Encapsulated PostScript
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Export as JPEG
Export as PNG
These can be used to export the currently visible plot to an external graphics format for later use.
Exporting to the pixel-based formats (GIF, JPEG, PNG) is fairly straightforward: each pixel on the screen appears as one pixel in the output
file. PNG is the most capable, but it is not supported by all image viewers. GIF works well in most cases, but if there are more than 255
colours some of the colour resolution will be lost. JPEG can preserve a wide range of colours, but does not support transparency and is lossy,
so close inspection of image features will reveal blurring.
When exporting to Portable Document Format (PDF) or Encapsulated PostScript (EPS), which are vector graphics formats, there are a few
things to consider:
Positional Quantisation
The output file will render text, lines and markers properly, with smooth edges rather than steps where pixel boundaries would be on
the screen. However, the positional resolution is the same as it would be on the screen, so if you have a 400-pixel high plot for
instance, there are only 400 possible Y coordinates at which a marker can be plotted. In general this is not obvious by looking at the
output plot, but you may find it helpful to increase the size of the plot on the screen by resizing the window before performing an
export to EPS. This reduces the effect of the positional quantisation, but note it will also have the effect of making the text labels
proportionally smaller to the graphics.
Transparency
For technical reasons transparent markers cannot easily be rendered when a plot is exported to PostScript. In some cases the plot is
done using a bitmap in the PostScript output to permit transparency and in some cases the points are just plotted opaque. Try it and
see; if the points come out opaque instead of transparent you may need to export to GIF instead. Better workarounds may be provided
in future releases.
File Size
In some cases (2D and 3D scatter plots with many thousands of points) output EPS files can get extremely large; the size scales with
the number of points drawn, currently with a factor of a few hundred bytes per point. In some cases you can work round this by
plotting some points as transparent so that the plot is rendered as a bitmap (see the discussion of transparency above) which scales as
the number of pixels rather than the number of points. The Gzipped EPS format helps somewhat (though can be slow); PDF output is
better still. Even PDF files may be unmanageably large for very many points however.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Histogram Window
The histogram window lets you plot histograms of one or more columns or derived quantities. You can display it using the Histogram (
11/18/14, 17:34
this button redraws the plot taking account of any changes to the table data.
Configure Axes and Title
Pops up a dialogue to allow manual configuration of axis ranges, axis labels and plot title - see Appendix A.5.1.2.
Export as PDF
Pops up a dialogue which will write the current plot as a PDF file.
Export as GIF
Pops up a dialogue which will output the current plot to a GIF file. The output file is just the same as the plotted image that you see.
Resize the plotting window before the export to control the size of the output GIF.
Rescale
Rescales the axes so that the width and height are sufficient to accommodate all the non-zero bars in the histogram for all the currently
selected datasets. By default the plot will be scaled like this, but it it may have changed because of changes in the subset selection or
from zooming in or out.
Rescale X
Rescales the horizontal axis to accommodate all the currently plotted bars. The vertical axis scaling is not changed.
Rescale Y
Rescales the vertical axis to accommodate all the currently plotted bars. The horizontal axis scaling is not changed.
Grid
Toggles whether a grid is drawn over the plotting surface or not.
Show Legend
Toggles whether a legend showing how each data set is represented is visible to the right of the plot. Initially the legend is shown only
if more than one data set is being shown at once.
Cumulative Plot
Toggles whether the histogram should be normal or cumulative. Normally the height of each bar is determined by counting the number
of points which fall into the range on the X axis that it covers. For a cumulative plot, the height is determined by counting all the
points between negative infinity and the upper bound of the range on the X axis that it covers.
Normalisation
Toggles whether histograms are normalised. When selected, each dataset will be normalised so that the sum of the counts of all its bars
over the whole range of data is equal to one.
Log Y Axis
Toggles whether the Y axis is scaled logarithmically or not.
Subset From Visible
Defines a new Row Subset consisting of only the data in the bars which are visible in the current plot. See Appendix A.5.1.6 for more
explanation.
The Dataset Toolbar contains the following options:
/
Add/Remove dataset
Adds/removes tabs in which the data for extra datasets can be entered. See Appendix A.5.1.1.
Weight Counts
If this toggle button is on, an additional Weight Axis selector appears below the X Axis selector. If this is filled in with a column name
or expression, then instead of simply accumulating the number of points per bin, the Y axis will show the sum over the weighting
quantity for points in each bin. Not having a weight axis is equivalent to filling in its value with the quantity 1. Note that with
weighting, the figure drawn is no longer strictly speaking a histogram.
When weighted, bars can be of negative height. An anomaly of the plot as currently implemented is that the Y axis never descends
below zero, so any such bars are currently invisible. This may be amended in a future release (contact the author to vote for such an
amendment).
The Export menu contains additional image export options and the following options specific to the histogram:
Save as Table
The bin counts/sums corresponding to the currently plotted histogram will be written to disk in tabular form. The first two columns
give the lower and upper bounds of each bin, and the subsequent columns give the occupancies of each bin for each plotted data set. If
only one dataset is plotted, there will only be three columns.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Import as Table
Assembles a table as per the Save option above, but rather than writing it to disk imports it directly into TOPCAT, where it can be
manipulated in all the usual ways.
You have considerable freedom to configure how the bars are drawn; controlling this is described in the following subsection.
A.5.2.1 Histogram Style Editor
The bins in a histogram can be represented in many different ways. A representation of how a bar will be displayed is shown on a button to
the right of the name of each visible subset, at the bottom right of the histogram window. If you click this button the following dialogue will
pop up which enables you to change the appearance.
11/18/14, 17:34
Dash
Determines the dash style (solid, dotted, dashed or dot-dashed) for any lines which are drawn. Only applies to those Bar Forms which
use lines rather than solid blocks.
Any changes you make in this window are reflected in the plot straight away. If you click the OK button at the bottom, the window will
disappear and the changes remain. If you click Cancel the window will disappear and any changes you made will be discarded.
You can also change all the plotting styles at once by using the Bar Style menu in the histogram window. Here you can select a standard
group of styles (e.g. all filled adjacent bars with different colours) for the plotted sets.
Plot Window
The plot window allows you to do 2-dimensional scatter plots of one or more pair of table columns (or derived quantities). You can display it
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
On the plotting surface a marker is plotted for each row in the selected dataset(s) at a position determined by the values in the table columns
selected to provide the X and Y values. A marker will only be plotted if both the X and Y values are not blank. Select the quantities to plot
and the plotting symbols with the dataset selector at the bottom. You can configure the axes, including zooming in and out, with the mouse
(drag on the plot or the axes) or manually as described in Appendix A.5.1.2.
Clicking on any of the plotted points will activate it - see Section 8.
The following buttons are available on the toolbar:
Split Window
Allows the dataset selector to be resized by dragging a separator between it and the plot area. Good for small screens.
Replot
Redraws the current plot. It is usually not necessary to use this button, since if you change any of the plot characteristics with the
controls in this window the plot will be redrawn automatically. However if you have changed the data, e.g. by editing cells in the Data
Window, the plot is not automatically redrawn (since this is potentially an expensive operation and you may not require it). Clicking
this button redraws the plot taking account of any changes to the table data.
Configure Axes and Title
Pops up a dialogue to allow manual configuration of axis ranges, axis labels and plot title - see Appendix A.5.1.2.
Export as PDF
Pops up a dialogue which will write the current plot as a PDF file. In general this is a faithful and high quality rendering of what is
displayed in the plot window. However, if plotting is being done using the transparent markers, the markers will be rendered as if they
were opaque. Plots with very many points can result in rather large output PDFs.
Export as GIF
Pops up a dialogue which will output the current plot to a GIF file. The output file is just the same as the plotted image that you see.
Resize the plotting window before the export to control the size of the output GIF.
Rescale
Rescales the axes of the current plot so that it contains all the data points in the currently selected subsets. By default the plot will be
scaled like this, but it it may have changed because of changes in the subset selection or from zooming in or out.
Grid
Toggles whether a grid is drawn over the plotting surface or not.
Show Legend
Toggles whether a legend showing how each data set is represented is visible to the right of the plot. Initially the legend is shown only
if more than one data set is being shown at once.
Draw Subset Region
Allows you to draw a region on the screen defining a new Row Subset. When you have finished drawing it, click this button again to
indicate you're done. See Appendix A.5.1.6 for more details.
Subset From Visible
Defines a new Row Subset consisting of only the points which are currently visible on the plotting surface. See Appendix A.5.1.6 for
more explanation.
The Dataset Toolbar contains the following options:
/
/
Add/Remove dataset
Adds/removes tabs in which the data for extra datasets can be entered. See Appendix A.5.1.1.
Add/Remove auxiliary axis
Adds/removes a selector for entering an auxiliary axis to modify point colours etc. See Appendix A.5.1.5.
Toggle point labelling
/
Allows text labels to be drawn near plotted points. See Appendix A.5.1.4.
Toggle X/Y error bars
Switches between drawing symmetric error bars and no error bars in the X and Y directions respectively. Other options are available in
the Errors menu. See Appendix A.5.1.3.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
You have considerable freedom to configure how the points are plotted including the shape, colour and transparency of symbols, the type of
lines which join them if any, and the representation of error bars if active. These options are described in the following subsection.
A.5.3.1 Plot Style Editor
When plotting points in a scatter plot there are many different ways that each point can be displayed. By default, TOPCAT chooses a set of
markers on the basis of how many points there are in the table and uses a different one for each plotted set. The marker for each set is
displayed in a button to the right of its name in the dataset selector panel at the bottom of the plot window. If you click this button the
following dialogue will pop up which enables you to change the appearance.
11/18/14, 17:34
Transparency
Choose transparency of the plotted symbols. The scale on the slider is logarithmic, with 1 at the left hand end. The actual value chosen
is an integer written at the right of the slider. This number gives the number of markers for this set which need to be plotted in the
same position to result in fully opaque pixels - any fewer and the background, or other markers plotted underneath, will show through
to some extent. Setting this to some value greater than 1 is very useful if you have a very large number of points being plotted
(especially if it's comparable with the number of the pixels on the screen), since it enables to you distinguish regions where there are
lots of points on top of each other from those where there are only a few.
Error Bars
If error bars are active for this plot, allows you to select the way they will appear. The options which can be selected here will depend
on whether X and/or Y errors are in use.
Hide Markers
This check box is only enabled if a line and/or error bars are being plotted; it allows the markers to be invisible, so that only the
line/error bars are seen.
The Line box determines if any lines are drawn associated with the current set and if so what their appearance will be.
Thickness
Selects the line thickness in pixels.
Dash
Selects a dash pattern (solid, dotted, dashed or dot-dashed) for the line.
Type
The other radio buttons determine what kind of line, if any, will be plotted for these points. There are three options:
None
No line is drawn - this is the default.
Dot to Dot
A straight line segment is drawn between each of the points. If the points effectively form an ordered set of samples of a
function, this will result in a more-or-less smooth drawing of that function on the plot. Note that the lines are drawn in the order
that the points appear in the basic table, and if this doesn't match the 'ordinate' order the result will be a mess. Really, the
drawing order ought to be the table's current sort order - that it is not is a misfeature which may be corrected at some point. Note
also that if you try this with a huge table you're likely to get a result which (a) is messy and (b) takes a very long time to draw.
Linear Correlation
If you select this option then a linear regression line will be plotted. The correlation coefficients will also be displayed to the
right of the radio button (you may need to resize the window to see them all). The values cited are m (gradient), c (intercept) and
r (product moment correlation coefficient). You can cut and paste from this text.
Note that for both the plotted line and the quoted coefficients the data is taken only from the points which are currently visible that means that if you've zoomed the axes to exclude some of the data points, they will not be contributing to the calculated
statistics.
Any changes you make in this window are reflected in the plot straight away. If you click the OK button at the bottom, the window will
disappear and the changes remain. If you click Cancel the window will disappear and any changes you made will be discarded.
You can also change all the plotting styles at once by using the Marker Style menu in the plot window. Here you can select a standard group
of styles (e.g. all open 2-pixel markers with different colours and shapes) for the plotted sets. Similarly, error styles can be changed all at
once using the Error Style menu.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
) button in the Dataset Toolbar at the bottom of the window. This has
a slightly different effect from what it does in the other plot windows, in that it inserts a new plotting region with its own Y axis at the top of
the plot on which the specified data is drawn, rather than only causing a new set of points to be plotted on the existing plot region. Thus all
the datasets appear in their own graphs with their own Y axes (though if you have multiple row subsets plotted for the same dataset they will
appear on the same part of the plot as usual). To remove one of the graphs, select its tab and use the Remove Dataset (
) button as usual.
Zooming can only be done on one axis at a time rather than dragging out an X-Y region on the plot surface, since there isn't a single Y axis
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
to zoom on. To zoom the X axis in/out, position the mouse just below the X axis at the bottom of the plot and drag right/left. To zoom one of
the Y axes in or out, position the mouse just to the left of the Y axis you're interested in and drag down/up. To set the ranges manually, use
the Configure Axes and Title (
) button as usual, but note that there is one label/range setting box for each of the Y axes. These things
work largely as described in Appendix A.5.1.2, as long as you bear in mind that the range of each of the Y axes is treated independently of
the others.
Clicking on any of the points will activate it - see Section 8.
The following buttons are available on the toolbar:
Split Window
Allows the dataset selector to be resized by dragging a separator between it and the plot area. Good for small screens.
Redraws the current plot. It is usually not necessary to use this button, since if you change any of the plot characteristics with the
controls in this window the plot will be redrawn automatically. However if you have changed the data, e.g. by editing cells in the Data
Window, the plot is not automatically redrawn (since this is potentially an expensive operation and you may not require it). Clicking
this button redraws the plot taking account of any changes to the table data.
Configure Axes and Title
Pops up a dialogue to allow manual configuration of the range and label for the X axis and each of the Y axes, as well as a plot title see Appendix A.5.1.2.
Export as PDF
Pops up a dialogue which will write the current plot as a PDF file.
Export as GIF
Pops up a dialogue which will output the current plot to a GIF file. The output file is just the same as the plotted image that you see.
Resize the plotting window before the export to control the size of the output GIF.
Rescale
Rescales all the plots so that all points in the plotted datasets can be seen. The X axis and all the Y axes are rescaled to fit the data.
Rescale X Axis
Rescales the X axis only. The X axis is rescaled to cover the lowest and highest values on any of the plotted datasets, but the Y ranges
are left as they are.
Rescale Y Axes
Rescales the Y axes only. Each of the plotted Y axes are independently rescaled so that they cover the lowest and highest values within
the currently visible X range.
Full Grid
Toggles whether X and Y grid lines are drawn over the plots or not. If this is selected, the single y=0 grid line (see next item) will
automatically be deselected.
Show Legend
Toggles whether a legend showing how each data set is represented is visible to the right of the plot. Initially the legend is shown only
if more than one data set is being shown at once.
y=0 Grid Lines
Toggles whether a single horizontal line at y=0 is drawn. If this is selected, the full grid (see previous item) will automatically be
deselected.
Show Vertical Crosshair
Toggles whether a vertical line follows the mouse when it is positioned over the plot. This can be useful to compare features in
different graphs at the same X coordinate position.
Antialias
Toggles whether lines are drawn with antialiasing. Antialiasing means smoothing lines so that they appear less pixelised, and generally
improves the aesthetic appearance of the plot, but in some circumstances it might look better not antialiased. The state of this button
does not affect images exported to postscript.
Subset From X Range
Defines a new Row Subset in each of the plotted tables consisting of only the points in the currently visible range on the horizontal
axis. Points will be included even if they are outside the current ranges of the Y axes.
The Dataset Toolbar contains the following options:
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Add/Remove dataset
Adds/removes a dataset for plotting, which both adds/removes a tab from the dataset selector and adds/removes a plot in the currently
visible stack in the plotting area. See above for more explanation.
/
Toggle X/Y error bars
Switches between drawing symmetric error bars and no error bars in the X and Y directions respectively. Other options are available in
the Errors menu. See Appendix A.5.1.3.
You can determine how the data are plotted using lines and/or markers as described in the following subsection.
A.5.4.1 Lines Style Editor
The default plotting style for the stacked lines plot is a simple black line for each graph. Since the plots typically do not overlap each other,
this is in many cases suitable as it stands. However, you can configure the plotting style so that the points are plotted with markers as well as
or instead of lines, and change the colours, marker shapes, line styles etc. The style for each row subset is displayed in a button to the right
of its name in the bottom right of the plotting window. If you click this button the following dialogue will pop up which entables you to
configure the plotting style.
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Zooming is also possible. You can zoom in around the centre of the plot so that the viewing window only covers the middle. The easiest
way to do this is to use the mouse wheel if you have one - wheel forward to zoom in and backward to zoom out. Alternatively you can do it
by dragging on the region to the left of the plot, like the Axis Zoom in some of the 2-d plots. Drag the mouse down to zoom in or up to
zoom out on this part of the window. Currently it is only possible to zoom in/out around the centre of the plot. When zoomed you can use the
Subset From Visible (
) toolbar button to define a new Row Subset consisting only of the points which are currently visible. See
Appendix A.5.1.6 for more explanation.
Clicking on any of the plotted points will activate it - see Section 8.
The following buttons are available on the toolbar:
Split Window
Allows the dataset selector to be resized by dragging a separator between it and the plot area. Good for small screens.
Replot
Redraws the current plot. It is usually not necessary to use this button, since if you change any of the plot characteristics with the
controls in this window the plot will be redrawn automatically. However if you have changed the data, e.g. by editing cells in the Data
Window, the plot is not automatically redrawn (since this is potentially an expensive operation and you may not require it). Clicking
this button redraws the plot taking account of any changes to the table data.
Configure Axes and Title
Pops up a dialogue to allow manual configuration of axis ranges, axis labels and plot title - see Appendix A.5.1.2.
Export as PDF
Pops up a dialogue which will write the current plot as a PDF file. In general this is a faithful and high quality rendering of what is
displayed in the plot window. However, if plotting is being done using the transparent markers, the markers will be rendered as if they
were opaque. Plots with very many points can result in rather large output PDFs.
Export as GIF
Pops up a dialogue which will output the current plot to a GIF file. The output file is just the same as the plotted image that you see.
Resize the plotting window before the export to control the size of the output GIF.
Rescale
Rescales the axes of the current plot so that it contains all the data points in the currently selected subsets. By default the plot will be
scaled like this, but it it may have changed because of changes in the subset selection.
Reorient
Reorients the axes of the current plot to their default position. This can be useful if you've lost track of where you've rotated the plot to
with the mouse. This also resets the zoom level to normal if you've changed it.
Stay Upright
Toggle button which when selected ensures that the Z axis is oriented vertically on the screen at all times. By default this is off which
means you can drag the axes round to any orientation, but it can be convenient to switch it on to keep the plot pointing in a sensible
direction.
Grid
Toggles whether the cubic frame bounding the plot is drawn or not.
Show Legend
Toggles whether a legend showing how each data set is represented is visible to the right of the plot. Initially the legend is shown only
if more than one data set is being shown at once.
Fog
Toggles whether rendering is done as if the space is filled with fog. If this option is selected, distant points will appear more washed
out than near ones.
Draw Subset Region
Allows you to draw a region on the screen defining a new Row Subset. When you have finished drawing it, click this button again to
indicate you're done. The subset will include points at all depths in the viewing direction which fall in the region you have drawn. See
Appendix A.5.1.6 for more details.
Subset From Visible
Defines a new Row Subset consisting of only the points which are currently visible on the plotting surface. See Appendix A.5.1.6 for
more explanation.
The following additional item is available as a menu item only:
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Antialias
Toggles whether the axes and their annotations are drawn antialiased. Antialiased lines are smoother and generally look more pleasing,
especially for text at a sharp angle, but it can slow the rendering down a bit.
The Dataset Toolbar contains the following options:
/
/
Add/Remove dataset
Adds/removes tabs in which the data for extra datasets can be entered. See Appendix A.5.1.1.
Add/Remove auxiliary axis
Adds/removes a selector for entering an auxiliary axis to modify point colours etc. See Appendix A.5.1.5.
Toggle point labelling
/
Allows text labels to be drawn near plotted points. See Appendix A.5.1.4.
/
Toggle X/Y/Z error bars
Switches between drawing symmetric error bars and no error bars in the X, Y and Z directions respectively. Other options are
available in the Errors menu. See Appendix A.5.1.3.
You have considerable freedom to configure how the points are plotted including the shape, colour and transparency of symbols and the
representation of error bars if used. These options are described in the following subsection.
A.5.5.1 3D Plot Style Editor
When plotting points in a 3D plot there are many different ways that each point can be displayed. By default, TOPCAT chooses a set of
markers on the basis of how many points there are in the table and uses a different one for each plotted set. The marker for each set is
displayed in a button to the right of its name in the dataset selector panel at the bottom of the plot window. If you click this button the
following dialogue will pop up which enables you to change the appearance.
11/18/14, 17:34
If this checkbox is selected, then no entry for the selected set will appear in the legend.
The Marker box defines how the markers plotted for each data point will appear:
Shape
Choose from a variety of shapes such as open or filled circles, squares, crosses etc.
Size
Choose the size of the marker; the value given is approximate radius in pixels. If a size of zero is chosen, then the shape doesn't
matter, the points will be plotted as single pixels.
Colour
Choose the colour in which the markers will be plotted.
Transparency
Choose transparency of the plotted symbols. The scale on the slider is logarithmic, with 1 at the left hand end. The actual value chosen
is an integer written at the right of the slider. This number gives the number of markers for this set which need to be plotted in the
same position to result in fully opaque pixels - any fewer and the background, or other markers plotted underneath, will show through
to some extent. Setting this to some value greater than 1 is very useful if you have a very large number of points being plotted
(especially if it's comparable with the number of the pixels on the screen), since it enables to you distinguish regions where there are
lots of points on top of each other from those where there are only a few. If a finite transparency is set, you may find it useful to turn
off fogging (see above).
Error Bars
If error bars are active for this plot, allows you to select the way they will appear. The options which can be selected here will depend
on whether X, Y and/or Z errors are in use.
Hide Markers
This check box is only enabled if error bars are being plotted; it allows the markers to be invisible, so that only the error bars are seen.
Any changes you make in this window are reflected in the plot straight away. If you click the OK button at the bottom, the window will
disappear and the changes remain. If you click Cancel the window will disappear and any changes you made will be discarded.
You can also change all the plotting styles at once by using the Marker Style menu in the plot window. Here you can select a standard group
of styles (e.g. all open 2-pixel markers with different colours and shapes) for the plotted sets. Similarly, error styles can be changed all at
once using the Error Style menu.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
) button is activated, you can optionally fill in a value in the Radial Axis selector as well. In this case points
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
will be plotted in the interior of the sphere, at a distance from the centre given by the value of the radial coordinate.
The 3D space can be rotated by dragging the mouse around on the surface - it will rotate around the centre of the sphere. By default the
points are rendered as though the 3D space is filled with a 'fog', so that more distant points appear more washed out - this provides a visual
cue which can help to distinguish the depth of plotted points. However, you can turn this off if you want. If there are many points, then you
may find that they're not all plotted while a drag-to-rotate gesture is in progress. This is done to cut down on rendering time so that GUI
response stays fast. When the drag is finished (i.e. when you release the mouse button) all the points will come back again.
Zooming is also possible. You can zoom in around the centre of the plot so that the viewing window only covers the middle. The easiest
way to do this is to use the mouse wheel if you have one - wheel forward to zoom in and backward to zoom out. Alternatively you can do it
by dragging on the region to the left of the plot, like the Axis Zoom in some of the 2-d plots. Drag the mouse down to zoom in or up to
zoom out on this part of the window. Currently it is only possible to zoom in/out around the centre of the plot. When zoomed you can use the
Subset From Visible (
) toolbar button to define a new Row Subset consisting only of the points which are currently visible. See
Appendix A.5.1.6 for more explanation.
Clicking on any of the plotted points will activate it - see Section 8.
The following buttons are available on the toolbar:
Split Window
Allows the dataset selector to be resized by dragging a separator between it and the plot area. Good for small screens.
Replot
Redraws the current plot. It is usually not necessary to use this button, since if you change any of the plot characteristics with the
controls in this window the plot will be redrawn automatically. However if you have changed the data, e.g. by editing cells in the Data
Window, the plot is not automatically redrawn (since this is potentially an expensive operation and you may not require it). Clicking
this button redraws the plot taking account of any changes to the table data.
Configure Axes and Title
Pops up a dialogue to allow manual configuration of axis ranges, axis labels and plot title - see Appendix A.5.1.2. The only
configurable axis range is the upper limit of the radial axis.
Export as PDF
Pops up a dialogue which will write the current plot as a PDF file. In general this is a faithful and high quality rendering of what is
displayed in the plot window. However, if plotting is being done using the transparent markers, the markers will be rendered as if they
were opaque. Plots with very many points can result in rather large output PDFs.
Export as GIF
Pops up a dialogue which will output the current plot to a GIF file. The output file is just the same as the plotted image that you see.
Resize the plotting window before the export to control the size of the output GIF.
Rescale
Rescales the axes of the current plot so that it contains all the data points in the currently selected subsets. By default the plot will be
scaled like this, but it it may have changed because of changes in the subset selection.
Reorient
Reorients the axes of the current plot to their default position. This can be useful if you've lost track of where you've rotated the plot to
with the mouse. This also resets the zoom level to normal if you've changed it.
Stay Upright
Toggle button which when selected ensures that the north pole (latitude = +90 degrees) is oriented vertically on the screen at all times.
By default this is on.
Grid
Toggles whether the spherical wire frame bounding the plot is drawn or not.
Show Legend
Toggles whether a legend showing how each data set is represented is visible to the right of the plot. Initially the legend is shown only
if more than one data set is being shown at once.
Fog
Toggles whether rendering is done as if the space is filled with fog. If this option is selected, distant points will appear more washed
out than near ones.
Draw Subset Region
Allows you to draw a region on the screen defining a new Row Subset. When you have finished drawing it, click this button again to
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
indicate you're done. The subset will include points at all depths in the viewing direction which fall in the region you have drawn. See
Appendix A.5.1.6 for more details.
Subset From Visible
Defines a new Row Subset consisting of only the points which are currently visible on the plotting surface. See Appendix A.5.1.6 for
more explanation.
The following additional item is available as a menu item only:
Antialias
Toggles whether the axes and their annotations are drawn antialiased. Antialiased lines are smoother and generally look more pleasing,
especially for text at a sharp angle, but it can slow the rendering down a bit.
The Dataset Toolbar contains the following options:
/
/
Add/Remove dataset
Adds/removes tabs in which the data for extra datasets can be entered. See Appendix A.5.1.1.
Add/Remove auxiliary axis
Adds/removes a selector for entering an auxiliary axis to modify point colours etc. See Appendix A.5.1.5.
Toggle point labelling
Allows text labels to be drawn near plotted points. See Appendix A.5.1.4.
Toggle Radial Coordinates
When activated, a column selector labelled Radial Axis will be visible below the Longitude and Latitude Axis selectors. This enables
you to enter a value for the radial coordinate of each point. If this is disabled, or if it has a blank value, then all the points will have an
assumed radial coordinate of unity and will be plotted on the surface of the sphere.
Toggle tangential error bars
When activated, an additional column selector appears in the dataset panel to the right of the Longitude and Latitude selectors, along
with its own unit selector. You can fill this in with an isotropic error value representing the radius of a small circle associated with the
selected points, in units of arcsec, arcmin, degrees or radians. This will cause 2-d error bars to be plotted. You can configure their
appearance (e.g. crosshairs, ellipses, rectangles, ...) using the style editor in the usual way. See Appendix A.5.1.3 for more
information.
Toggle radial error bars
Switches radial error bars on and off. See Appendix A.5.1.3. This button will only be enabled if the Radial Coordinates are in use.
You have considerable freedom to configure how points are plotted including the shape, colour and transparency of symbols and the
representation of errors if used. This works exactly as for the Cartesian 3D plot as described in Appendix A.5.5.1.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
11/18/14, 17:34
Each pixel represents a single scalar value, corresponding to a count or sum as indicated by the selected dataset(s). If multiple datasets
are being plotted at once, the values from each will be summed to give the result at each point. The mapping from numeric value to
pixel colour at each point on the plot is determined by the colour map selected in the Indexed Colours selector below the plot. In this
case the style editor colour selectors have no effect and are disabled. A fairly wide range of colour maps is provided by default. If
these do not suit your needs, it is possible to provide your own custom colour maps using the lut.files system property - see Section
10.2.3.
RGB Mode
Each pixel has up to three independent contributions, its intensity in Red, Green and Blue channels. These can come from different
datasets, as configured in the style editor. If more than one dataset is assigned the same colour, the contributions are summed for that
channel. In this case the Indexed Colours colour map selector has no effect and is disabled.
Switch between the modes using the RGB (
) button.
You can configure the axes, including zooming in and out, with the mouse (drag on the plot or the axes) or manually as described in
Appendix A.5.1.2.
Two controls specific to this window are shown below the plot itself:
Cut Percentile Levels
This controls how the number of counts in each pixel maps to a brightness. There are two sliders, one for the lower bound and one for
the upper bound. They are labelled (logarithmically) with percentile values. If the upper one is set to 90, it means that any pixel above
the 90th percentile of the pixels in the image in terms of count level will be shown with maximum brightness, and similarly for the
lower one. These values apply independently to each colour channel if more than one is in use. Immediately below the sliders, the
pixel values which correspond to minimum and maximum brightness are displayed. In indexed mode there is one range, and in RGB
mode there may be up to three. If the image is not fairly completely covered, this control doesn't give you as much freedom as you
might like - the user interface may be improved in future releases.
Indexed Colours
When in indexed (non-RGB) mode only, this allows you to select a colour map which determines how pixel values (counts or sums
per bin) are turned into colours on the screen. The lowest value corresponds to the colour at the left side of the icon and the highest
value to the right side. In RGB mode this is disabled.
The following buttons are available on the toolbar:
Split Window
Allows the dataset selector to be resized by dragging a separator between it and the plot area. Good for small screens.
Replot
Redraws the current plot. It is usually not necessary to use this button, since if you change any of the plot characteristics with the
controls in this window the plot will be redrawn automatically. However if you have changed the data, e.g. by editing cells in the Data
Window, the plot is not automatically redrawn (since this is potentially an expensive operation and you may not require it). Clicking
this button redraws the plot taking account of any changes to the table data.
Configure Axes and Title
Pops up a dialogue to allow manual configuration of axis ranges, axis labels and plot title - see Appendix A.5.1.2.
Export as PDF
Pops up a dialogue which will write the current plot as a PDF file.
Export as GIF
Pops up a dialogue which will output the current plot to a GIF file. The output file is just the same as the plotted image that you see.
Resize the plotting window before the export to control the size of the output GIF.
Export as FITS
Pops up a dialogue which will output the plotted map as a FITS array. If only one channel is visible (either one colour channel or
indexed mode) then the output FITS file will be a 2d array with dimensions the same as the displayed image. If there are multiple
RGB channels then the output array will be 3d with the third dimension having an extent of 2 or 3, depending on the number of colour
channels visible. In either case the FITS file will have a single (primary) HDU. Basic coordinate system information, as well as
DATAMIN and DATAMAX cards, will be written to the header. The type of the output array will be double precision for weighted
values, or some integer type of sufficient length for unweighted ones.
Rescale
Rescales the axes of the current plot so that it contains all the data points in the currently selected subsets. By default the plot will be
scaled like this, but it it may have changed because of changes in the subset selection or from zooming in or out.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Log Intensity
Toggles between linear and logarithmic mapping for colour intensity as a function of number of counts.
Colour
Toggles between indexed and RGB modes (see the explanation above).
Show Legend
Toggles whether a legend showing how each data set is represented is visible to the right of the plot. Initially the legend is shown only
if more than one data set is being shown at once.
Bigger Pixels
Increments the size of screen pixel corresponding to one density map bin.
Smaller Pixels
Decrements the size of screen pixel corresponding to one density map bin.
Draw Subset Region
Allows you to draw a region on the screen defining a new Row Subset. When you have finished drawing it, click this button again to
indicate you're done. See Appendix A.5.1.6 for more details.
Subset From Visible
Defines a new Row Subset consisting of only the points which are currently visible on the plotting surface. See Appendix A.5.1.6 for
more explanation.
The Dataset Toolbar contains the following options:
/
Add/Remove dataset
Adds/removes tabs in which the data for extra datasets can be entered. See Appendix A.5.1.1.
Weight Counts
If this toggle button is on, an additional Weight Axis selector appears below the X Axis selector. If this is filled in with a column name
or expression, then instead of simply accumulating the number of points per bin, each pixel will represent the sum over the weighting
quantity for points in each bin. Not having a weight axis is equivalent to filling in its value with the quantity 1. Note that with
weighting, the figure drawn is no longer strictly speaking a histogram or density map.
The Export menu provides a number of ways to export the displayed image for external viewing or analysis. As well as options to export as
GIF, JPEG, EPS and FITS, there is also the option to transmit the FITS image to one or all applications listening using the SAMP or
PLASTIC tool interoperability protocol which will receive images. In this way you can transmit the image directly to SAMP/PLASTICaware image manipulation tools such as GAIA or Aladin. See Section 9 for more information about tool interoperability.
How to set the colour channel corresponding to each dataset is explained in the following subsection.
A.5.7.1 Density Style Editor
For a density map in RGB mode, each dataset is assigned a colour channel to which it contributes. A representation of this is displayed in a
button to the right of its name in the dataset selector panel at the bottom of the density map window. If you click this button the following
dialogue will pop up which enables you to change the colour channel.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
The Legend box defines how the selected set will be identified in the legend which appears alongside the plot (though the legend will only
be visible if Show Legend (
) is on):
Icon
Displays the icon which will be shown to identify the points in the selected set. Its appearance depends on the selections you make in
the rest of this dialogue window.
Label
Gives the name written in the legend to label the subset. By default this is derived from the Row Subset's name and, if it's not part of
the main dataset, the name of the dataset's tab. You can type in a new value to change what is written in the legend.
Hide Legend
If this checkbox is selected, then no entry for the selected set will appear in the legend.
The Channel selector allows you to select either the Red, Green or Blue channel for this dataset to contribute to. Note that this is only
enabled in RGB mode; in indexed mode it has no effect and is disabled.
Load Window
The Load Window is used for loading tables from an external location (e.g. disk or URL) into TOPCAT. It is obtained using the Load Table
button (
) in the Control Window toolbar or File menu.
This dialogue allows you to specify a new table to open in a number of different ways, described below. If you perform a successful load
using any of these options, a new entry or entries will be added into the Table List in the Control Window, which you can then use in the
usual ways. If you choose a location which can't be turned into a table (for instance because the file doesn't exist), a window will pop up
telling you what went wrong. The panel at the bottom of the window displays progress for tables currently loading; it is used to show
progress for tables loaded from other sources too, for instance received via SAMP or specified on the command line.
In the simplest case, you can type a name into the Location field and hit return or the OK button. This location can be a filename or a URL,
possibly followed by a '#' character and a 'fragment identifier' to indicate where in the file or URL the table is located; the details of what
such fragment identifiers mean can be found in the relevant subsection within Section 4.1.1. Allowed URL types are described in Section
4.2. You should select the relevant table format from the Format selector box - you can leave it on (auto) for loading FITS tables or
VOTables, but for other formats such as ASCII or CSV you must select the right one explicitly (again, see Section 4.1.1 for details).
There are many other ways of loading tables however, described in the following subsections. The Filestore Browser and System Browser
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
buttons are always visible below the location field. Depending on startup options, there may be other buttons here. There are also a number
of toolbar buttons which display various load dialogues; the DataSources contains all of these along with some lesser-used ones. The
following subsections describe most of the available options, though others may be available in your installation.
The options available on the toolbar by default are these:
Filestore Browser
System Browser
Hierarchy Browser
SQL Query
Cone Search
Simple Image Access (SIA) Query
Simple Spectral Access (SSA) Query
Table Access Protocol (TAP) Query
VizieR Catalogue Service Query
GAVO Millennium Database Query
BaSTI Theory Database Query
All of these load dialogues have an OK button. Once you click it, whatever load you have specified will start. If the load takes more than a
few hundreths of a second, a progress bar will appear in the Loading Tables panel of the load window, as in the screenshot above. This will
report on how many rows have been loaded, and if known, how many there are in total. If you want to interrupt the load for any reason while
it is in progress, click the Cancel button, and the load will cease. If the load completes without cancellation, a new table will appear in the
Table List of the main Control Window, ready for use.
By default, when a table load has completed, both the Load Window itself and whichever specific load dialogue window you used will close.
If you don't want this to happen use the Stay Open (
) item in the Window menu or toolbar of the Load Window and/or specific load
dialogue. If this is selected, the window will not automatically close. This can be very convenient if you want to load many tables from a
similar place, for instance several files from the same directory or several cone searches to different services.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
) in the Load Window, you can obtain a file browser which will display the
files in a given directory. The way this window works is almost certainly familiar to you from other applications.
Unlike a standard file browser however, it can also browse files in remote filestores: currently supported are MySpace and SRB. MySpace is
a distributed storage system developed for use with the Virtual Observatory by the AstroGrid project, and SRB (Storage Resource Broker) is
a similar general purpose system developed at SDSC. To make use of these facilities, select the relevant entry from the selector box at the
top of the window as illustrated above; this will show you a Log In button which prompts you for username, password etc, and you will then
be able to browse the remote filestore as if it were local. The same button can be used to log out when you are finished, but the session will
be logged out automatically when TOPCAT ends in any case. Access to remote filesystems is dependent on certain optional components of
TOPCAT, and it may not be available if you have the topcat-lite configuration.
The browser initially displays the current directory, but this can be changed by typing a new directory into the File Name field, or moving up
the directory hierarchy using the selector box at the top, or navigating the file system by clicking the up-directory button or double-clicking
on displayed directories. The initial default directory can be changed by setting the user.dir system property.
All files are shown, and there is no indication of which ones represent tables and which do not. To open one of the displayed files as a table,
double-click on it or select it by clicking once and click the Open Table button. The Table Format selector must be set correctly: the "
(auto)" setting will automatically detect the format of VOTable or FITS tables, otherwise you will need to select the option describing the
format of the file you are attempting to load (see Section 4.1.1). If you pick a file which cannot be converted into a table an error window
will pop up.
In most cases, selecting the file name and possibly the format is all you need to do. However, the Position in file field allows you to add
information about where in the file the table you want is situated. The meaning of this varies according to the file format: for FITS files, it is
the index or EXTNAME of the HDU containing the table you're after (see Section 4.1.1.1 for details), and for VOTables it is the index of the
TABLE element (the first TABLE encountered is numbered 0). If you leave this blank, you will get all the tables in the file; this is usually
just one table, since most file formats cannot accommodate more than one table per file, and even for those which can (FITS and VOTable)
most files contain only a single file in any case.
For a more table-aware view of the file system, use the Hierarchy Browser instead.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
) in the Load Window, you can use your Operating System's native file
browser to choose a file to load from. What this looks like is entirely dependent on your OS; it may or may not contain system-specific
features like shortcuts to commonly-used directories.
Since TOPCAT has no control over the way this dialogue looks, it cannot contain the Table Format selector, and certain other things such as
load cancel may not work as well as for the other dialogue types. To select the table format, you will need to use the selector in the main
Load Window.
) from the Load Window's toolbar or DataSources menu, you can obtain a browser which
presents a table-aware hierarchical view of the file system. (Note that a freestanding version of this panel with additional functionality is
available in the separate Treeview application).
This browser resembles the Filestore Browser in some ways, but with important differences:
It shows the file system in a 'tree-like' fashion, so that multiple levels of the hierarchy are displayed at once
It understands which items in the hierarchy represent tables that can be automatically detected and which represent other kinds of
object (for instance directories, zip files, or plain text files)
It can look inside hierarchical files, so for instance it can investigate a Tar or Zip archive which may contain table entries, or display
multiple tabular HDUs in a FITS file, or multiple TABLE elements at different levels in a VOTable document
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
The main part of the window shows a "tree" representation of the hierarchy, initially rooted at the current directory (the initial directory can
be changed by setting the user.dir system property). Each line displayed represents a "node" which may be a file or some other type of
item (for instance an HDU in a FITS file or an entry in a tar archive). The line contains a little icon which indicates what kind of node it is
and a short text string which gives its name and maybe some description. Nodes which represent tables are indicated by the
icon. For
nodes which have some internal structure there is also a "handle" which indicates whether they are collapsed ( ) or expanded ( ). You can
examine remote filespaces (MySpace, SRB) as well as local ones in the same way as with the Filestore Browser.
If you select a node by clicking on it, it will be highlighted and some additional description will appear in the panel below the hierarchy
display. The text is in bold if the node in question can be opened as a table, and non-bold if it is some non-table item.
Note: an important restriction of this browser is that it will only pick up tables which can be identified automatically - this includes FITS and
VOTable files, but does not include text-based formats such as ASCII and Comma-Separated Values. If you want to load one of the latter
types of table, you will need to use one of the other load methods and specify table format explicitly.
You can see how this browser works on an example directory of tables as described in Appendix A.6.12.
Note that this window requires certain optional components of the TOPCAT installation, and will not be available if you have the topcat-lite
configuration.
A.6.3.1 Navigation
Navigation is a bit different from navigation in the File Browser window. To expand a node and see its contents, click on its handle (clicking
on the handle when it is expanded will collapse it again). When you have identified the table you want to open, highlight it by clicking on it,
and then click the Open Table button at the bottom.
To move to a different directory, i.e. to change the root of the tree which is displayed, use one of the buttons above the tree display:
Selector box
Allows you to move straight to any directory higher up than the current one.
Up
Moves to the parent of the current directory.
Down
Moves to the currently selected (highlighted) node.
Home
Moves to the user's home directory.
Alternatively, you can type in a new directory in the Go to field at the bottom of the window.
(In fact the above navigation options are not restricted to changing the root to a new directory, they can move to any node in the tree, for
instance a level in a Tar archive.)
A.6.3.2 Table Searches
There are two more buttons in the browser, Search Selected and Search Tree. These do a recursive search for tables in all the nodes starting
at the currently selected one or the current root respectively. What this means is that the program will investigate the whole hierarchy
looking for any items which can be used as tables. If it finds any it will open up the tree so that they are visible (note that this doesn't mean
that the only nodes revealed will be tables, ancestors and siblings will be revealed too). This can be useful if you believe there are a few
tables buried somewhere in a deep directory structure or Tar archive, but you're not sure where. Note that this may be time-consuming - a
busy cursor is displayed while the search is going on. Changing the root of the tree will interrupt the search.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Window's VO menu. It allows you to make queries directly to the VizieR service operated by CDS. VizieR is a comprehensive library of
very many published astronomical catalogues. These items can equally be accessed from the web or other interfaces, but this load dialogue
makes it convenient to load data directly from VizieR into TOPCAT.
Note that VizieR's idea of a catalogue is more complex than a single table; this means that in some cases querying one of VizieR's catalogues
may result in more than one table being loaded into TOPCAT (the Sub-Table Details checkbox described below can help to control this).
The dialogue consists of four parts: the VizieR Server, Row Selection, Column Selection and Catalogue Selection panels, arranged top to
bottom in the window. These are described below.
The VizieR Server panel allows you to specify which VizieR server you want to use for data download. By default the server at CDS is
used, but there are mirrors elsewhere, whose URLs can be chosen from the selector. If you see a popup window complaining that the server
cannot be contacted, you can choose a different one; you might also want to select one that is close to you for performance reasons.
The Row Selection panel specifies which rows you want to retrieve from the catalogue that you will select. You can choose one of the two
radio buttons according to the kind of query that you want to make:
Cone Selection
In this case you must give a central sky position and the search radius to define a cone-shaped region of interest. Rows within that
range will be returned. For the central position you can either fill in the RA and Dec fields directly, or you can fill in the Object Name
field and hit the Resolve button; in the latter case, a SIMBAD query will be made to determine the coordinates corresponding to the
named object.
All Rows
Alternatively, you can choose to download the whole catalogue without spatial restrictions.
In either case, the Maximum Row Count selector indicates the largest number of rows which will be returned. If your query requests more
rows than the limit given, extra rows will simply be omitted from the returned result (the limit seems to be approximate). It is possible to
choose any value for this field, including very large ones or the special value "unlimited"; however consider before doing this whether you
want to download a potentially very large data set. The server may in any case time out in the case of a very long connection, so it is
probably not possible, even if it were desirable, to download for instance the entire 2MASS point source catalogue.
The Column Selection panel gives you some control over which columns will be included in the loaded table. This will include some or all
of the columns the table has in the VizieR archive, and perhaps some standard ones added automatically by the service. The options are
currently:
standard
Contains a selection of those columns considered most interesting by the service.
default
Contains the 'standard' columns plus numeric "_RAJ2000" and "_DEJ2000" positional columns inserted by the service; if the query is
a Cone Selection rather than All Rows, it also contains a column "_r" inserted by the service giving the distance between the selected
position and the row's position.
all
Contains all the columns from the archived catalogue.
VizieR experts may fill in custom column requirements here by typing them into the selector box rather than choosing one of the predefined
options, for instance -out.add=_GLON,_GLAT would add galactic coordinates to the standard set; see http://vizier.u-strasbg.fr/doc/asusummary.htx for more details on VizieR hacking. (In fact, this trick can be used to add VizieR parameters unrelated to column selection as
well).
The Catalogue Selection panel offers several different ways to identify which of the catalogues in the VizieR archive you want to query. In
all cases you will be presented with a JTable of VizieR catalogues, and you must select one by clicking on the relevant row. You can sort
within the displayed table by clicking on the column header. Note: for some of these options it is necessary to fill in the Row Selection panel
before you can operate them (the controls will be disabled if no row selection has been made). That is because the catalogues listed will
depend on the region you are going to query; VizieR is smart enough to know which catalogues have some coverage in the region in
question. The options for catalogue selection are as follows:
By Category
You may select one or more terms from one or more of the presented lists of predefined keywords in the categories Wavelength,
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Mission and Astronomy to restrict the catalogues that you are interested in. How you select multiple entries from the same list is
platform-dependent, but CTRL-click may work. When you have made your selections, hit the Search Catalogues button, and those
catalogues in the categories you have identified, and with coverage in the region defined by the Row Selection panel, will be listed
below the category selection panel. Select one of these by clicking on it. The Sub-Table Details checkbox controls whether the list
displays only top-level VizieR catalogues (each of which may contain multiple tables) or entries for each table within each catalogue
as well. The Include Obsolete Tables checkbox controls whether just the most current, or all versions of each catalogue are shown.
By Keyword
A Keywords text field is shown; you may enter a space-separated list of words which will be matched against catalogue names and
descriptions. When you have entered the search terms, hit the Search Catalogues button, and those catalogues which match your
terms, and with coverage in the region defined by the Row Selection panel, will be listed below the Keywords field. Select one of
these by clicking on it. The Sub-Table Details checkbox controls whether the list displays only top-level VizieR catalogues (each of
which may contain multiple tables) or entries for each table within each catalogue as well. The Include Obsolete Tables checkbox
controls whether just the most current, or all versions of each catalogue are shown.
Surveys
A (fairly short) list of large surveys held by VizieR is presented in a table. An indication of the size of each, in terms of number of
thousands of rows, is given. Select one of these by clicking on it.
Missions
A (fairly short) list of data holdings at VizieR originating from large missions is presented in a table. An indication of the size of each,
in terms of number of thousands of rows, is given. Select one of these by clicking on it.
Depending on the type of catalogue search you make, various attributes of the catalogues in question will be listed in the table for selection:
Name
Unique VizieR identifier for the catalogue
Description
Short description of contents
KRows
Approximate number of thousands of rows
Rows
Approximate number of rows
Tables
Number of sub-tables contained within the VizieR catalogue
Popularity
A measure of the number of queries on the catalogue served by VizieR
Density
A measure of the number of sources per unit solid angle on the sky
Wavelengths
Keywords describing wavelength regimes covered
Astronomy
Keywords describing subject domain
When you have made your selection of rows, columns and catalogue you can hit the OK button and TOPCAT will attempt to contact the
VizieR service to load the resulting table or tables. You can cancel a request in progress with the Cancel button.
CDS make the following request:
If the access to catalogues with VizieR was helpful for your research work, the following acknowledgment would be
appreciated: "This research has made use of the VizieR catalogue access tool, CDS, Strasbourg, France". The original
description of the VizieR service was published in A&AS 143, 23 (2000).
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
by GAVO, the German Astrophysical Virtual Observatory. The main databases of general interest available through these services are the
Millennium Simulation results, documented at http://gavo.mpa-garching.mpg.de/Millennium/Help.
To make a query, fill in the fields as required:
Base URL
This determines the database to be queried. The following options are available:
Milli-Millennium (http://gavo.mpa-garching.mpg.de/Millennium)
Public simulation results database, containing a fraction of the full simulation results. No username or password is required (the
User and Password boxes will be disabled).
Millennium (http://gavo.mpa-garching.mpg.de/MyMillennium)
Full, protected simulation results database. The username and password must be filled in for these queries. Registration is by
application to GAVO.
Other
Other GAVO-provided services can be accessed from this dialogue by entering the relevant base URL here -- users of these
services will know what they are. They may or may not require a username and password.
User
Password
Registration information if required (dependent on base URL as above).
SQL Query
The text of an SQL query on the database in question.
Then click the OK button, and the query will execute and load the results into TOPCAT. Clicking Cancel while it is in progress will stop it
running.
The HaloSamples and GalaxySamples menus provide some examples of queries on the Milli-Millennium database (these have been copied
from the GAVO query page). If you select one of these the SQL Query panel will be filled in accordingly.
Much more documentation, including tutorials and descriptions of the database schemas, is available on the GAVO website, at
http://gavo.mpa-garching.mpg.de/Millennium/Help.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Stellar Tracks and Isochrones) database hosted by the INAF-Teramo Astronomical Observatory. You can find more detailed documentation
on the web site.
This load dialogue has two tabs: a Query tab to input search parameters, and a Results tab to display the results table with one row for each
table resulting from the user's query.
The Query tab contains a set of parameters by which the query will be constrained, some aids to help the user while preparing the selection
and two buttons. The Reset button simply clears query inputs and (if present) user's selections in the Results tab. The Submit button
performs the query and switches the dialog to the Results tab. As an aid to allow a refined query without too much recursive steps, at the
bottom center of the tab, a counter displays how many rows (i.e. resulting tables) the output will count. Remembering that the results will
contain 30 rows at maximum, the user can than refine his/her constrains to reduce the number of results.
To do so the query helps the user in two ways mainly: automatically unselecting the unavailable parameters for a specific query (e.g. the
mass range for an isochrone search) and displaying, for the ranged parameters, the value limits for that parameter, this happens just moving
the mouse cursor over the input area.
Here follows a short description of the query parameters, for full details refer to the BaSTI main site.
Data Type
The type of simulation desired: isochrones, tracks or summary tables. This field is the only mandatory to submit a query.
Scenario
Stellar evolution scenario, i.e. canonical simulation or including overshooting calculations.
Type
Type of track simulation: normal or including the Asymptotic Giant Branch (AGB) simulation.
Mass Loss
Selects which value the Mass Loss parameter should have: 0.2 or 0.4 are the available choices.
Photometric System
A set of photometric systems is used to colour the stellar simulated tracks for comparison with observational data. This dropdown
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Save Window
The Save Window is used to write tables out, and it is accessed using the Save Table button (
menu.
The window consists of two parts. At the top is the Content Panel, which is used to determine exactly what table or tables are going to be
saved, and below it is the Destination Panel, which is used to determine where they will be saved to. These panels are described separately
in the subsections below.
For large tables, a progress bar will be displayed indicating how near the save is to completion. It is not advisable to edit tables which are
being saved during a save operation.
In some cases, saving the table to a file with the same name as it was loaded from can cause problems (e.g. an application crash which loses
the data unrecoverably). In other cases, it's perfectly OK. The main case in which it's problematic is when editing an uncompressed FITS
binary table on disk. TOPCAT will attempt to warn you if it thinks you are doing something which could lead to trouble; ignore this at your
own risk.
If you save a table to a format other than the one from which it was loaded, or if some new kinds of metadata have been added, it may not be
possible to express all the data and metadata from the table in the new format. Some message to this effect may be output in such cases.
There is no option to compress files on output. You can of course compress them yourself once they have been written, but note that this is
not usually a good idea for FITS files, since it makes them much slower to read (for TOPCAT at least).
11/18/14, 17:34
) from the Subsets Window. Alternatively you could use the Session
) to get a native browser that uses your OS's standard file saving interface
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
) in the Save Window, you can use your Operating System's native file
browser to decide where to save a file. What this looks like is entirely dependent on your OS; it may or may not contain system-specific
features like shortcuts to commonly-used directories.
Since TOPCAT has no control over the way this dialogue looks, it cannot contain the Output Format selector, and certain other things such
as save cancel may not work as well as for the other dialogue types. To select the output table format, you will need to use the selector in the
Save Window.
A.7.2.4 SQL Output Dialogue
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
11/18/14, 17:34
the operation of each distinct match window (internal, pair and multi-table).
Match Criteria panel. The details will differ depending on what match type is chosen.
The match criteria box allows you to specify what counts as a match between two rows. It has two parts. First, you must select one of the
options in the Algorithm selector. This effectively selects the coordinate space in which rows will be compared with each other. Depending
on the chosen value, a number of fields will be displayed below, which you must fill in with values that determine how close two rows have
to be in terms of a metric on that space to count as a match.
The following match types (algorithm values) are offered:
Sky
Comparison of positions on the celestial sphere. In this case you will need to specify columns giving Right Ascension and Declination
for each table participating in the match. The Max Error value you must fill in is the maximum separation of matched points around a
great circle.
Sky with Errors
The matching is like that for the Sky option above, but an error radius (positional uncertainty) is given for each row in the input tables,
rather than just a single value for the whole match. Along with the Right Ascension and Declination columns, you also specify an
Error column which gives the error radius corresponding to that position. Two rows are considered to match when the separation
between the two RA,Dec positions is no larger than the sum of the two Error values for the corresponding rows. The Scale value
should be set to a rough average of the per-row errors. It is used only to set a sensible default for the Healpix-k tuning parameter, and
its value does not affect the result. If Healpix-k is set directly (see Appendix A.8.1.3), Scale is ignored. Note: the semantics of this
matcher have changed slightly since version 3.8 of TOPCAT and earlier. In earlier versions the single parameter was named Max Error
and provided an additional constraint on the maximum accepted separation between matched objects. For most uses, the old and new
behaviours are expected to give the same results, but in cases of difference, the new behaviour is more likely what you want.
Sky Ellipses
Compares elliptical regions on the sky for overlap. You will need to specify columns giving the central position, major and minor
radii, and position angle of the ellipse. Two rows are considered to match if there is any overlap between the ellipses. The goodness of
match is a normalised generalisation of the symmetrical case used by the Sky with Errors option above. The position angle is
measured from north to the semi-major axis, in the direction towards the positive RA axis. The Scale value should be set to a rough
average of the major radii; It is used only to set a sensible default for the Healpix-k tuning parameter, and its value does not affect the
result. If Healpix-k is set directly (see Appendix A.8.1.3), Scale is ignored. The calculations are approximate since in some cases they
rely on projecting the ellipses onto a Cartesian tangent plane before evaluating the match, so for larger ellipses the criterion will be
less exact. For objects the size of most observed stars or galaxies, this approximation is not expected to be problematic.
Sky 3D
Comparison of positions in the sky taking account of distance from the observer. In this case you will need to specify columns giving
Right Ascension and Declination in angular units, as well as distance from the origin in arbitrary units for each table participating in
the match. The Error value is a maximum separation in Cartesian space of matched points in the same units as the radial distance.
Exact Value
Requires exact matching of values. In this case you will need to specify the column containing the match key for each table
participating in the match; this might typically be an object name or index number. Two rows count as matching if they have exactly
the same entry in the specified field, except rows with a null value in that column, which don't match any other row. Note that the
values must also be of the same type, so for instance a Long (64-bit) integer value will not match an Integer (32-bit) value.
N-dimensional Cartesian
Comparison of positions in an isotropic N-dimensional Cartesian space. In this case you will need to specify N columns giving
coordinates for each table participating in the match. The Error value is the maximum spatial separation of matched points. Currently
the highest dimensionality you can select is 3-d - does anyone want a higher number?
N-dimensional Cartesian, Anisotropic
Comparison of positions in an N-dimensional Cartesian space with an anisotropic metric. In this case you will need to specify N
columns giving coordinates for each table participating in the match, and an error distance for each of these dimensions. Points P1 and
P2 are considered to match if P2 falls within the ellipsoid with radii given by the error distances, centered on P1. This kind of match
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
will typically be used for non-'spatial' spaces, for instance (magnitude,redshift) space, in which the metrics in different dimensions are
not related to each other. Currently the highest dimensionality you can select is 4-d - does anyone want a higher number?
N-dimensional Cuboids
This matching is like that for N-dimensional Cartesian above, but points are considered to match if they fall within the same cuboid
rather than ellipsoid. The error values are the half-axis lengths of the cuboid, like rectangular "radii". This kind of match is suitable for
grouping items into regularly-spaced pixels, though it's not a very efficient way of doing that.
N-dimensional Cartesian with Errors
The matching is like that for the N-dimensional Cartesian option above, but an error radius (positional uncertainty) is given for each
row in the input tables, rather than just a single value for the whole match. Along with the Cartesian coordinate columns, you also
specify an Error column which gives the error radius corresponding to that position. Two rows are considered to match when the
separation between the two positions is no larger than the sum of the two Error values for the corresponding rows. The Scale
parameter should be approximately the characteristic size of the per-object error values. Its value, in conjunction with the Bin Factor
tuning parameter, affects the performance of the match but not the result.
2-d Cartesian Ellipses
Compares elliptical regions in the plane for overlap. You will need to specify columns giving the central position, major and minor
radii, and orientation angle of the ellipse. Two rows are considered to overlap if there is any overlap between the ellipses. The
goodness of match is a generalisation of the symmetrical case used by the 2-d Cartesian with Errors option above. The orientation
angle is measured anticlockwise from the X-axis to the ellipse major axis. The Scale parameter should be set to a rough average of the
major radii. Its value, in conjunction with the Bin Factor tuning parameter, affects the performance of the match but not the result.
Sky + X
Comparison of positions on the celestial sphere with an additional numeric constraint. This is a combination of the Sky and 1-d
Cartesian matches above, so the columns you need to supply are RA, Dec and one extra, and the errors are angular separation on the
sky and the error in the extra column. A match is registered if it matches in both of the constituent tests. You could use this for instance
to match objects which are both close on the sky and have similar luminosities.
Sky + XY
Comparison of positions on the celestial sphere with an additional 2-d anisotropic Cartesian constraint. This is a combination of the
Sky and 2-d Anisotropic Cartesian matches above, so the columns you need to supply are RA, Dec and two extra, and the errors are
angular separation on the sky and the error radii corresponding to the extra columns. A match is registered if it matches in both of the
constituent tests. You could use this for instance to match objects which are both close on the sky and have similar luminosities and
redshifts.
HTM
Performs sky matching in just the same way as the Sky option above, but using a different algorithm (pixelisation of the celestial
sphere is performed using the Hierarchical Triangular Mesh rather than the HEALPix scheme). The results in both cases should be
identical, but HTM is much slower. Hence, this option is only useful for debugging. It may be withdrawn in future releases.
Depending on the match type, the units of the error value(s) you enter may be significant. In this case, there will be a unit selector displayed
alongside the entry box. You must choose units which are correct for the number you enter.
More information is available in the GUI as a tooltip by hovering with the mouse pointer over the field in question.
See Appendix A.8.1.3 for information on optional tuning parameters which are sometimes displayed in this panel.
The matching framework is capable of performing even more complicated types of match, for instance Sky + 6-dimensional anisotropic
Cartesian. These are not offered purely to avoid complicating the GUI. More flexible matching requirements in this in and other respects can
be achieved by using the matching commands in STILTS instead.
A.8.1.2 Column Selection Boxes
Column Selection Box. The details will differ depending on what match type is chosen.
The column selection boxes allow you to select which of the columns in the input tables will provide the data (the coordinates which have to
match). For each table you must select the names of the required columns; the ones you need to select will depend on the match criteria you
have chosen.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
For some columns, such as Right Ascension and Declination in sky matches, units are important for the columns you select. In this case,
there will be a selector box for the units alongside the selector box for the column itself. You must ensure that the correct units have been
selected, or the results of the match will be rubbish.
In some cases these column and/or unit selectors may have a value filled in automatically (if the program thinks it can guess appropriate
ones) but you should ensure that it has guessed correctly in this case. Only suitable columns are available for choosing from these column
selectors; in most cases this means numeric ones.
Instead of selecting a column name from the list provided in these boxes, you may type in an expression. This can be a column name, or an
algebraic expression based on column names, or even a constant. The expression language syntax is described in Section 7.
A.8.1.3 Tuning
This subsection describes the use of two toolbar buttons available in the match windows:
Tuning Parameters
Displays tuning parameters alongside match parameters in the Match Criteria panel.
Full Profiling
Increases the amount of timing and memory use information displayed in the Logging Panel.
The parameters such as Max Error visible by default in the Match Criteria panel define what counts as a match and must be filled in for the
match to proceed.
Optionally, you can see and adjust another set of parameters known as Tuning parameters. These will not affect the result of the match, but
may affect its performance, in terms of how much CPU time and memory it takes. Most of the time, you can forget about this option, since
TOPCAT attempts to pick reasonable defaults, but if your match is very slow (especially if it's unexpectedly slow given the sizes of the
tables involved), or if it's failing with messages about running out of memory, then adjusting the tuning parameters may help.
To view the tuning parameters, use the Tuning Parameters (
) toolbar button or menu item. This will add display of tuning parameters to
the match parameters in the Match Criteria panel. Suggested values are filled in by default, and may be affected by the match parameters that
you fill in; you can play around with different values and see the effect on match performance. If you do this, it is useful to use also the Full
Profiling (
) toolbar button to turn on full profiling. This will cause additional information on the amount of CPU time and memory used
by each step to be displayed in the logging panel at the bottom. There is a small penalty in CPU time required to gather this information,
which is one reason it is not turned on by default.
What tuning parameters are available depends on the match type you have chosen. Some additional description is available as tooltips if you
hover over the query field. In most cases, they are one or other of the following:
HEALPix k
Used for sky-like matches. k is an integer value which determines the size of pixels into which the celestial sphere is decomposed for
binning rows. The legal range is between 0 (corresponding to a pixel size around 60 degrees) and 20 (around 0.2 arcsec). In HEALPix
language, k is log2(Nside).
Scale Factor
Used for Cartesian-like matches. The scale factor is a floating point value which determines the size of the notional N-dimensional
pixels into which the space is decomposed for binning rows, as a multiple of the match error. The smallest legal value is 1.
In either case, the number of rows per bin should be not too large, and not too small (though exactly what that means in quantitative terms is
another matter). Larger bins/pixels generally mean less memory use and more CPU time, though that's not always the case.
Even if you happen to have a good understanding of how the matching algorithm works (and you probably don't), this kind of tuning is a bit
of a black art, and depends considerably on the details of the particular match. In some cases however it is quite possible to improve the time
taken by a match, or the size of table which can be matched in a given amount of memory, by a factor of several. If you want to try to
improve performance, try the default, adjust the tuning parameters slightly, look at how the performance changes by examining the logging
output, and maybe repeat to taste.
Another thing which can affect speed and memory usage is whether your Java Virtual Machine is running in 32-bit or 64-bit mode. There are
pros and cons of each - sometimes one will be better, sometimes the other. If you need to improve performance, experiment!
11/18/14, 17:34
11/18/14, 17:34
Allows you to select which tables are to be joined and which columns in them supply the matching coordinates.
Output Rows selector
Allows selection of which rows are to be included in the output table (for instance whether only those rows matching in both tables
should be output or not).
Log window
Reports on progress as the match is taking place. The progress bar at the bottom of the window also provides an indication of how far
through each stage processing has got.
Control buttons
The Go button starts the search when you are happy with the selections that you have made, and the Stop button interrupts it midway
if you decide you no longer want the results (closing the Match Window also interrupts the calculation).
For information on the Tuning Parameters (
11/18/14, 17:34
All of the matched rows are present in the output as for 1 and 2, but additionally the unmatched rows from the first table are present
with the columns from the second table blank. This corresponds to an SQL left outer join.
All from 2
As for All from 1 but the other way round. This corresponds to an SQL right outer join.
1 or 2
Every row, matched and unmatched, from both of the input tables appears in the output. This is the union of rows from All from 1 and
All from 2. This corresponds to an SQL full outer join.
1 not 2
This presents all the rows in the first table which do not have matches in the second table. Consequently, it only contains columns
from the first table, since all the entries from the second one would be blank in any case.
2 not 1
The same as 1 not 2 but the other way round.
1 xor 2
The "exclusive or" of the match - the output only contains rows from the first table which don't have matches in the second table and
vice versa. It is the union of 1 not 2 and 2 not 1.
Note that the choices of which Match Selection and Join Type to use are somewhat interlinked, and some combinations may not be very
meaningful.
In most cases (all the above except for 1 not 2 and 2 not 1), the set of columns in the output table contains all the columns from the first
table followed by all the columns from the second table. If this causes a clash of column names, offending columns will be renamed with a
trailing "_1" or "_2". Depending on the details of the match however, some additional useful columns may be added:
Match Score
For rows that represent a match, a numeric value representing how good the match was will usually be present. This is typically a
separation in real or notional space - for instance for a Sky match it is the distance between the two matched celestial positions in
arcseconds along a great circle. It will always be greater than or equal to zero, and a smaller value represents a better match. The name
and exact meaning of this column depends on the match criteria - examine its description in the Columns Window for details.
GroupSize, GroupID
If some of the rows match more than once (which may happen for any of the Match Selection options above apart from BEST), two
columns named GroupID and GroupSize will be added. These allow you to identify which matches are multiple. In the case of rows
which represent a unique match, they are blank. But for rows which represent a set of multiple matches, the GroupSize value tells you
how many rows participate in this match, and the GroupID value is an integer which is the same for all the rows which participate in
the same match. So if you do a sort on the GroupID value, you'll see all the rows in the first non-unique match group together,
followed by all the rows in the second non-unique group... and after them all the unique matches.
Here is an example. If your input tables are these:
X
1134.822
659.68
909.613
Y
599.247
1046.874
543.293
Vmag
---13.8
17.2
9.3
X
909.523
1832.114
1135.201
702.622
Y
543.800
409.567
600.100
1004.972
Bmag
---10.1
12.3
14.6
19.0
and
then a Cartesian match of the two sets of X and Y values with an error of 1.0 using the 1 and 2 option would give you a result like this:
X_1
--1134.822
909.613
Y_1
--599.247
543.293
Vmag
---13.8
9.3
X_2
--1135.201
909.523
Y_2
--600.100
543.800
Bmag
---14.6
10.1
Separation
---------0.933
0.515
Y_2
--600.100
Bmag
---14.6
Separation
---------0.933
Y_1
--599.247
1046.874
Vmag
---13.8
17.2
X_2
--1135.201
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
909.613
543.293
9.3
909.523
11/18/14, 17:34
543.800
10.1
0.515
Y
1046.874
Vmag
---17.2
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
11/18/14, 17:34
table has been created. This table will be added to the list in the Control Window and can be examined, manipulated and saved like any
other.
The window has the following parts:
Match Criteria box
Allows you to define what counts as a match between two rows.
Column Selection box
Allows you to select which table to operate on and which columns supply the matching coordinates.
Match Action box
Allows selection of which rows are to be included in the output table (for instance whether only those matches which appear in all
input tables should result in output rows).
Log window
Reports on progress as the match is taking place. The progress bar at the bottom of the window also provides an indication of how far
through each stage processing has got.
Control buttons
The Go button starts the search when you are happy with the selections that you have made, and the Stop button interrupts it midway
if you decide you no longer want the results (closing the Match Window also interrupts the calculation).
For information on the Tuning Parameters (
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
11/18/14, 17:34
And/Or button
This determines whether a registry entry is considered to match the chosen keywords if it matches all of them, or at least one of them.
Clicking it toggles between "And" and "Or". The default is "And", meaning that all keywords must be matched (against any of the
selected match fields) for a selection.
Match Fields
This line contains a number of checkboxes which allow you to define which fields in each registry record will be compared against the
keywords you have entered when looking for matches. The contents of the Short Name, Title, Subjects, ID and Publisher fields are
visible in the table of results. Description is a free-form, often long, description of the resource; it can be useful, but can often
accidentally contain text which causes unwanted matches. By default the Short Name, Title, Subjects and ID fields are matched - click
the checkboxes to change the selection
Submit Query button
When the other fields have been filled in, hit the Submit button and the registry will be searched to find data services that match the
constraints you have given.
In some cases, when the window first appears, it will automatically query the registry for all known services of the appropriate type. This is
currently the case for SIA and SSA services, since there is a manageable number of these. There are thousands of cone searches however, so
for the cone search windows you need to fill in a query and submit it yourself. In either case, you can resubmit a query (hit the Cancel
Query button first if necessary) to make another selection of registry entries.
When the query completes, a table of matching entries is displayed below the Submit button. The number of resources found is displayed at
the bottom, labelled Resource Count. The table contains one row for each matching entry, i.e. each service of the appropriate type that you
can submit your data query to. The columns in the table give a short name, title, description and some other information about each service.
You can sort the table rows according to the entries in different columns by clicking on the column header; click again on the same header to
reverse the sort order. A little up/down arrow in a column header indicates that that column is currently determining the sort order. You can
adjust the columns which are visible using the Columns menu, or drag the columns sideways to change their order in the usual way.
You should select the service that you want to query for data by clicking on it. When this is done, you will see one or more rows appear in a
second table underneath the first one. In most cases, this contains a single row which will be automatically selected. However, some registry
entries have multiple data services associated with a single record - in this case you should select the appropriate entry from the lower table
as well.
Once you have selected a data service in this way, its service URL will be entered in the lower part of the window (not shown in the figure
above) and you are ready to perform the actual single or multiple data query.
If a SAMP hub is running (see Section 9), it is possible to exchange lists of resources between this window and other applications. If another
application sends a suitable message to TOPCAT, and the resources are of an appropriate type, and the window is visible at the time, the
received list can be loaded and displayed here, replacing any which are currently displayed. You can control whether incoming lists are
accepted and displayed in this way using the Accept Resource Lists toggle, either using the checkbox just above the resource display panel,
or using the corresponding item in the Interop menu. If you wish to send your selection to one or more other applications which can make
use of them, use the Broadcast Resource List (
) or Send Resource List (
) options in the Interop menu.
A.9.1.2 Single Positional Search Panel
11/18/14, 17:34
URL
This must contain the service URL for the data service that you are querying. Usually, this will be filled in by selecting one of the
services obtained by the registry query. However, you can fill it in manually with the URL of a service you know about if you prefer.
If you know what you're doing, it's also possible to doctor a service URL filled in by the registry selection, for instance by adding
&name=value parameters to it.
Object Name
You can fill this in with the name of an object to be resolved by SIMBAD, and hit the Resolve button, which will fill in the
coordinates in the RA and Dec fields below. If you enter the RA and Dec manually, you don't need to use this field.
RA and Dec
Fill in the central position in terms of J2000 Right Ascension and Declination that you are interested in here. You can either do it
manually, or by using the Object Name field as above. Select the units as appropriate.
Radius
Indicates how large is the region you are interested in. This field has slightly different appearance and meaning for the different data
service types; hover over it with the mouse to see a tooltip with the details. For SIA and SSA, but not for Cone Search, it is
permissible to leave it blank (though certain services don't seem to like that). Select the units as appropriate.
When the fields are filled in, hit the OK button and wait for the new table defined by your query parameters to load. If you get bored waiting
(the service may be down, or just very slow, or you may have submitted a query with a very large return set), you can hit the Cancel button,
and perhaps adjust the parameters and try again.
If a SAMP hub is running (see Section 9), then other running clients may be able to fill in the RA and Dec coordinates. For instance clicking
on a sky position in an image viewing tool might fill in the sky position you clicked on. Usually this will happen automatically. This is often
convenient, but may not be what you want. You can control whether incoming coordinate settings are accepted in this way using the Accept
Sky Positions toggle below the Resolve button, or using the corresponding item in the Interop menu.
A.9.1.3 Multiple Positional Search Panel
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
The following fields define what queries are to be sent to the service:
Input Table
Select one of the tables loaded into TOPCAT whose row positions you want to search around.
RA and Dec columns
Fill these in with the columns in the input table which contain J2000 Right Ascension and Declination (you can perform coordinate
conversions using the Sky Coordinates Window if required). Select the units as appropriate. If the input table has appropriate
metadata, the correct values may be filled in by default, but it may occasionally guess wrong, so it's wise to check that they are filled in
correctly.
Search Radius column
Fill this in with a value that represents the size of search that you want to make around each row's position. You can either use a
constant value, or a column name, or any numeric algebraic expression based on the table (see Section 7). Select units as appropriate.
This field has slightly different appearance and meaning for the different data service types; hover over it with the mouse to see a
tooltip with the details. For SIA and SSA, but not for Cone Search, it is permissible to leave it blank (though certain services don't
seem to like that). Select the units as appropriate.
The Output Mode selector indicates what will be done with the result.
Output Mode
When the queries have been performed, there are different ways that the results can be returned. Since the operation here is basically a
crossmatch between a local table and a remote one, this effectively describes what sort of join is to be done. The options are as
follows:
New joined table with best matches
A new table will be generated, containing one row for each row in the input table which returned at least one search result from
the remote table. The best (closest) match will be included; any others will be discarded. The new table will have all the
columns of the input table and all the columns returned by the data service.
New joined table with all matches
A new table will be generated, containing one row for each search result returned. Rows from the input table will be duplicated
where more than one search result was returned corresponding to that row. The new table will have all the columns of the input
table and all the columns returned by the data service.
New joined table, one row per input row
A new table will be generated containing the same number of rows as the input table. If any search results were returned for
each row, the best (closest) one is included. Any others will be discarded, and cells will be empty for rows with no search
results. The new table will have all the columns of the input table and all the columns returned by the data service.
Add subset for matched rows
No new table will be generated, but a new subset will be added to the table which includes only those rows which returned at
least one search result.
The final controls adjust the details of how the individual queries are submitted to the remote service.
Parallelism
Controls how many cone search queries are running at once. By making several queries to the service concurrently, the time it takes to
fill in the whole table can be much quicker than making the query for the first row, waiting for the result, making the query for the
second row, etc. The value here is approximately how many queries will be run at the same time. Increasing the value might make
your multiple query run faster; or it might overload the server and make you unpopular with the service administrator, or result in your
query taking longer or failing altogether, or both. The default value of 5 is probably reasonable, but experiment with adjusting it if you
want.
Error Handling
Determines what happens if one of the queries fails with an error. The options are:
abort
terminate the operation; the whole multiple search fails
ignore
treat a failed query the same as one which returns zero rows
retry N times
try N times to get a non-fail result
retry indefinitely
keep trying for a non-fail result
The best setting for this depends on the way the service is set up; the default is abort, but for unreliable or poorly implemented
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
VO menu. It allows you to query one of a number of external web services for objects from a given catalogue in a given region of the sky.
Data held by cone search services are effectively source catalogues with sky position columns.
The window consists of a Registry Query Panel at the top, and a Single Positional Search Panel below.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
VO menu. It allows you to query one of a number of external web services for images covering a given region of the sky.
The window consists of a Registry Query Panel at the top, and a Single Positional Search Panel below. The Angular Size may be set to zero;
this means that any image covering the chosen position will be selected. There is additionally an Image Format selector which allows you
to restrict the result to contain only images in certain formats (the default is set to only FITS).
The result of a successful query is a table in which each row represents an image that can be downloaded from a remote site; one of the
columns contains the image URL, and the other columns contain associated metadata such as image format, size, shape and so on. Different
services provide different kinds of answer to these queries; some may have a static list of observed or reduced FITS files, and others may
generate images on the fly. See the SIA standard, and individual registry records, for details. A useful thing to do with the resulting table
might be to set its Activation Action to the View URL as Image option using the Activation Window.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
VO menu. It allows you to query one of a number of external web services for spectra in a given region of the sky.
The window consists of a Registry Query Panel at the top, and a Single Positional Search Panel below. The SSA specification says that the
Diameter field may be left blank, in which case the service "should supply a default value intended to find nearby objects". However,
experience shows that this doesn't always work, so it may be best to fill this in. There is additionally a Spectrum Format selector which
allows you to restrict the result to contain only spectra in certain formats. By default, the service chooses which formats to return.
The result of a successful query is a table in which each row represents a spectrum that can be downloaded from a remote site; one of the
columns contains the spectrum download URL, and the other columns contain associated metadata such as spectrum format, WCS,
provenance information and so on. See the SSA standard for details. A useful thing to do with the resulting table might be to set its
Activation Action to the View URL as Spectrum option using the Activation Window.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
menus. It allows you to select one of a number of external web services which provide remote catalogue queries, and execute a query for
each row of an input table. This effectively allows you to perform a positional crossmatch between a local table and a remote one.
The window consists of a Registry Query Panel at the top, and a Multiple Positional Search Panel below.
The search panel includes a Verbosity selector as well as the normal features: this allows you to choose options for how many columns will
appear in the output table, from 1 (minimum) to 3 (maximum). Some services will take notice of this parameter and return narrower or wider
tables respectively, and others will ignore it.
The following item is available in the toolbar and Search menu:
Use Service Coverage
If this option is selected, then the search attempts to query the service for the sky coverage it represents, if that information is
available. Then it only dispatches queries for positions in the input table which fall within that coverage region, since any queries
outside that region are bound to return an empty result. Depending on the coverage, this can substantially reduce the number of
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
queries made, and hence the time taken. If there is no overlap between the input table and service coverage, the query is bound to
return no results at all, and the time will be reduced effectively to zero.
When in operation (i.e. when this option is selected and the service provides coverage information) the coverage of the service, input
table and their overlap is summarised with small (Mollweide equatorial) all-sky icons in blue, red and magenta respectively, as in the
screenshot above. This makes it easy to see the sky regions in which results may be obtained, and also the amount by which this
option reduces useless queries.
Currently, this option effectively works only for cone searches provided by CDS's VizieR service (publisher "CDS") which provide
coverage information using Multi-Order Coverage maps (MOCs). For non-VizieR services this option has no effect.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
The multiple Simple Image Access window can be opened using the Multiple SIA button (
11/18/14, 17:34
menus. It allows you to select one of a number of external web services which provide queries on remotely accessible image holdings, and
execute a query for each row of an input table.
The window consists of a Registry Query Panel at the top, and a Multiple Positional Search Panel below. The Search Radius column may
be set to zero; this means that any image covering the chosen position will be selected. There is additionally an Image Format selector
which allows you to restrict the result to contain only images in certain formats (the default is set to only FITS).
The result of each single successful query is a table in which each row represents an image that can be downloaded from a remote site; one
of the columns contains the image URL, and the other columns contain associated metadata such as image format, size, shape and so on.
Different services provide different kinds of answer to these queries; some may have a static list of observed or reduced FITS files, and
others may generate images on the fly. See the SIA standard, and individual registry records, for details.
Note that some services return multiple images at the same positions but at different wavelengths. In this case TOPCAT's criterion for the
"best" match (the one closest to the central query position) may not make much sense. For this reason, take care if using the "New joined
table with best matches" or "New joined table, one row per input row" output modes.
One use of this function is to add some columns to an existing table which contain URLs of images from a given server corresponding to the
sky positions of those rows. Having done this you might want to set the resulting table's Activation Action to the View URL as Image
option using the Activation Window.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
menus. It allows you to select one of a number of external web services which provide queries on remotely accessible spectral data holdings,
and execute a query for each row of an input table.
The window consists of a Registry Query Panel at the top, and a Multiple Positional Search Panel below. The SSA specification says that the
Search Radius column may be left blank, in which case the service "should supply a default value intended to find nearby objects".
However, experience shows that this doesn't always work so it may be best to fill this in. There is additionally a Spectrum Format selector
which allows you to restrict the result to contain only spectra in certain formats. By default, the service chooses which formats to return.
The result of each single successful query is a table in which each row represents a spectrum that can be downloaded from a remote site; one
of the columns contains the specturm URL, and the other columns contain associated metadata such as spectrum format, WCS, provenance
information and so on. See the SSA standard for details.
One use of this function is to add some columns to an existing table which contain URLs of spectra from a given server corresponding to the
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
sky positions of those rows. Having done this you might want to set the resulting table's Activation Action to the View URL as Spectrum
option using the Activation Window.
menu, or the Load Window's toolbar. It allows you to use the TAP protocol to make freeform queries of remote database services using an
SQL-like language. This is a powerful capability, giving you full access to remote data holdings; it's similar to systems like SDSS's CasJobs,
but using the IVOA-endorsed TAP standard means that you can use the same interface for many different remote datasets.
TAP is more involved than the other VO protocols implemented by TOPCAT, and this window is correspondingly more complicated than the
Cone, SIA and SSA dialogues, though it does share some features with them.
In order to interrogate the remote database you will have to write queries in Astronomical Data Query Language (ADQL). This is a powerful
tool, but to do complicated things in it is not trivial. ADQL is essentially a particular dialect of SQL, so if you know SQL already, you
should be able to write ADQL queries. If you have used systems like SDSS's CasJobs, the concept should be quite familiar. A tutorial on
writing ADQL/SQL is beyond the scope of this manual, but the Enter Query tab provides an Examples menu which will give you a good
start in using it. You can find a nice introduction written by Markus Demleitner of GAVO at http://docs.g-vo.org/adql.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Once your query is written, you can submit it in either synchronous or asynchronous mode. Synchronous queries begin to execute right away
and must be relatively short; asynchronous queries are submitted to a server, run for a potentially long time, and retrieve the result later.
The window is composed of four tabs, of which you can see one at a time. You will use two or three of them when submitting a TAP query.
Each tab is described in more detail in the following subsections, but an overview of their operation is like this:
Select Service tab
Chooses the TAP service you wish to query, either using a registry search or by entering the service URL directly. Once you have
chosen a service you can move to the Enter Query tab.
Enter Query tab
Displays information about the service and the tables it holds, and allows you to enter the text of the query and submit the job. If the
job is submitted synchronously, load will begin directly, but in the asynchronous case, you will move to the Running Jobs tab.
Running Jobs tab
Shows a list of the asynchronous query jobs you have submitted, with details on their progress.
Resume Job tab
Optionally allows you to resume an asynchronous query started in some earlier session.
When you first visit this window, the Select Service tab will be visible, and when an asynchronous query has been submitted the Running
Jobs tab will be visible. If you want to submit another query to the same service, or use a different service, just select Enter Query or Select
Service respectively, by clicking on the appropriate tab at the top.
This window offers one menu additional to the standard VO windows menus:
Deletion menu
Allows you to choose when asynchronously submitted jobs will by default be deleted from the server. Once they are deleted they will
no longer be visible in the Running Jobs tab. If they are not deleted in this way, they will stay on the server until they are deleted
according to the server's deletion policy. Choose one of the available options:
On Completion: deleted when it has completed with either success or error status
On Exit: deleted when TOPCAT shuts down
Never: not deleted (except according to server policy)
You can override these settings once a job has started by using the controls at the bottom of the running jobs tab. The settings in this
menu affect the default value of the Delete On Exit checkbox. If you want to resume the job in a later session, you'll have to make
sure that the job is not deleted on completion or exit.
The additional menu items are:
: Stay Open
Makes sure that the window is not automatically closed after it loads a table.
: Reload
Reloads information displayed in the window from the server. This may be updating job status information or reloading table or
service metadata; the exact behaviour depends on which tab is currently visible.
Note: The TAP dialogue has been introduced at version 3.8 of TOPCAT, at a time when most available TAP services are quite new and may
not fully conform to the standard, and usage patterns are still settling down. For this reason you may find that some TAP services visible do
not behave quite as expected; it is also possible that in future versions the user interface will change in line with changing service profiles or
in the light of user experience.
A.9.8.1 Select Service tab
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
11/18/14, 17:34
Foreign Keys
If the service provides information about foreign keys (links between fields in different tables in the database) they will be tabulated
here. They may help you to formulate efficient queries.
The Service Capabilities panel shows capability metadata that the service provides about itself; again, this has to be loaded from the server
and may not appear immediately. It contains the following information:
Query Language
Shows what query languages, and what versions, are available. If there is more than one listed, you can choose which language you
want to submit your query in, but if you choose something which is not a variant of ADQL it may not work.
Max Rows
Selector which shows the maximum number of output rows that the service is willing to deliver as the result of a query under normal
circumstances. Entries in this list value may be marked "(default)" or "(max)". You can change this value by typing in a different
number, as long as it does not exceed the server's maximum. This value is here to protect the user, as well as the service, from
inadvertently requesting an unduly large output table. Note that if the construction "TOP nnn" is used in the ADQL, the nnn limit may
override the value supplied here.
Uploads
Indicates if table uploads are permitted, and perhaps what is the largest upload size (in terms of rows and/or bytes) which will be
accepted. See below for more about table uploads.
The ADQL Text panel is where you can enter the actual query text for the request. It has the following parts:
Synchronous checkbox
Determines whether your job will be executed on the server in synchronous or asychronous mode (check the box for synchronous).
Synchronous means that TOPCAT sends the query to the server and waits for the result as the response of the same HTTP request. It's
simpler and faster, but if the job takes a long time, the request may time out and the results be lost. In asynchronous mode TOPCAT
sends the query to the server and gets a message back telling it where to look for information about the job's progress; TOPCAT then
keeps polling the server to find out when it has completed. Synchronous is suitable for short jobs (it may typically execute with a few
seconds less delay), but for longer jobs aysnchronous is more reliable. It is possible to submit an asynchronous job on one day from
one machine, and pick up the results on a different day from another machine, using another invocation of TOPCAT or of a different
application altogther.
Examples button
This button presents you with a short menu of example queries. These are tailored to the table metadata obtained for this service, and,
where appropriate, to the table currently selected by the Table selector and/or the table list in the Control Window, so they should in
most cases be runnable as they stand (though there is no guarantee they will produce useful results). A better idea though is to use
them as starting points for your own queries. By picking one which is something like what you want to do, you can hopefully work out
the syntax for the query you need without having to read the ADQL specification. Some of the options in the list may be disabled,
depending on what capabilities the service has declared. In some cases, especially ones using geometric functions, the service may
reject the example, since TOPCAT can't always tell which functions are supported by the server.
Clear button
Clicking this button clears any text currently shown in the text entry field.
Parse Errors button
If a syntax error is detected in the entered ADQL text, it will be highlighted in the text field, and this button will be enabled. Clicking
this button will show a popup window with more detail on the error.
Text entry field
This is where you enter the text of the ADQL query you wish to make. The syntax of ADQL (Astronomical Data Query Language) is
defined by an IVOA Recommendation; it is effectively a dialect of SQL, but a good way to write a query is to start with one of the
examples from the Examples button above. If any errors are detected in the syntax of the ADQL as entered, they are highlighted in
pink as in the figure above.
Some services permit Table Uploads (at time of writing only the GAVO service implements this capability, but hopefully more will do so in
future). What this means is that you can upload tables from TOPCAT into the remote database and perform queries on your table directly. In
this way you can perform joins between your own tables (anything loaded into TOPCAT) and any of the tables in the remote database. This
is extremely powerful feature. To take advantage of it, you just need to use a special form for the table name to reference a TOPCAT-based
table: you write "TAP_UPLOAD.t<n>", where <n> is the ID number of the table in TOPCAT, that is the number before the colon in the Control
Window Table List. So, if a table identified as "1: messier.xml" in the table list, you can reference it in ADQL as "TAP_UPLOAD.t1". Note
the table uploaded in this way is the Apparent Table corresponding to the given ID number.
As you enter the query text, it will be checked for syntax errors. If an error is found, the place in the text which appears to have caused it will
be highlighted in pink (as in the figure above). To see more detail on the error, click the Parse Errors button. The checking itself is
reasonably reliable, but the position of the highlighted error, and the text of the error message, can sometimes be a bit misleading, so don't
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
take the details too seriously. The error highlighting is just used as a warning, you are not prevented from submitting a query marked as
erroneous, since in some cases TAP services may accept ADQL which is not strictly correct, and in some cases the error checking may not
be perfect.
Having entered suitable query text, click the OK button at the bottom of the window to submit the job. When you do this, one of two things
will happen. In synchronous mode, the Load Window will appear, and the progress will indicate when loading is complete in the normal
way. In asynchronous mode, you will be taken to the Running Jobs tab where you can see the progress of your submitted job.
A.9.8.3 Running Jobs tab
11/18/14, 17:34
The information displayed is retrieved from the server, and can only be seen as long as the job has not been deleted, either by you the user,
or as a result of server policy (for instance a maximum job lifetime). The following items, if provided by the service, are shown:
URL
The URL at which the job information is held on the server. This value can be used later in the Resume Job tab, or entered directly
into a web browser to see job information.
Phase
The current stage of job processing. This usually progresses in the sequence QUEUED, EXECUTING, COMPLETED (or ERROR).
Job ID
Job identifier, unique to the server. Forms part of the URL.
Run ID
Run identifier, often blank.
Owner Id
Owner identifier, blank unless user authentication is in use.
Max Duration
The maximum amount of time in seconds that the server will allow the job to run for. This is "wall-clock" time rather than CPU time.
Start Time
Time at which actual processing of the job (as opposed to queuing) started.
End Time
Time at which processing of the job finished.
Destruction Time
Time in the future at which the server will delete the job, if it has not been manually removed by then.
Error
Message and possibly other information about error status if an error occurred during processing. This will normally be blank unless
Phase has the value "ERROR".
Parameters
Displays parameters which were supplied to define the job to the server. This will normally include the text of the ADQL being
executed.
You can cut and paste from these items, so for instance if you want to take the URL and paste it into a web browser you can do.
There are three buttons at the bottom of the screen which affect the status of the currently displayed job:
Abort
This button stops the job from executing. It cannot be restarted. The job still exists on the server however, so it can be examined in this
window.
Delete
This button stops the job as for Abort, but also removes all trace of it from the server. No details can be seen any more.
Delete On Exit
This checkbox determines whether the job will be deleted from the server when TOPCAT exits. If you want to come back to a longrunning job in a later session, you should uncheck this so that the job remains on the server. The default action is normally that jobs
are deleted on exit (i.e. this box starts off checked), but you can change the default by using the Deletion menu.
If no jobs are currently visible (none have been submitted or they have all been deleted), this tab is inaccessible.
A.9.8.4 Resume Job tab
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
When a table name has been entered, additional information (Name, Alias, Description and Row Count) will be downloaded from CDS and
displayed in the lower part of the Remote Table panel. If nothing shows up here, then the table name is not legal for the X-Match service,
and the Go button will be disabled.
Sky coverage information is also displayed, including the proportion of the sky covered by the table and a graphical indication of the
covered regions on the sky.
The Local Table panel allows you to indicate the local table (the one loaded into TOPCAT) that you want to match. You must select the
required table and indicate its Right Ascension and Declination columns.
The Match Parameters panel supplies the other information about how the match will operate:
Radius
The maximum distance between a local table and remote table position to count as a match. There is a maximum enforced on this
value by the CDS X-Match service, currently 2 arcminutes.
Find mode
Determines in what form the result is generated and used. The following options are available:
Best
Load a new table with one row for each local row that matches a remote row, giving the closest match. Unmatched local rows
are not included.
All
Load a new table with one row for each remote row that matches a local row. The match is symmetric between local and remote
tables.
Each
Load a new table with the same number of rows as the local table, in the same order. The best remote match, if any, appears
alongside the local row, but if there is no match the remote columns are blank.
Best Remote
Load a new table with one row for each remote table row that matches the local table. Note there is currently a bug in this mode;
if the match is done in N blocks then a remote row may appear up to N times rather than just one. This may be fixed in a future
release, but to avoid it you can make sure that the Block size is greater than the row count.
Add Subset
No new table is loaded, but a new Row Subset is added to the local table indicating which rows had at least one match to the
remote table.
Rename columns
If columns from two input tables are combined, it's possible that some may share the same name. Multiple columns in a table with the
same name can cause confusion, so this selector allows you to determine whether and how such name clashes are dealt with. Columns
from the remote table can be renamed by appending a specified suffix, either always or only in case of duplicate names.
Block size
The number of rows uploaded to the X-Match service at a time. This should not affect the result, though it may affect performance.
Large blocksizes tend to be good (up to a point) for reducing the total amount of time a large xmatch operation takes, but they can
make it harder to see the job progressing. There is also the danger (for ALL-type find modes) of exceeding the return size limit, which
will result in truncation of the returned result. At time of writing, the upload limit is 100Mbyte (about 3Mrow), and the maximum
return size is 2Mrow.
When all the fields have been filled in, hit the Go button and the match will start; progress will be logged in the progress bar at the bottom of
the window. To stop the match before it has completed, hit the Stop button. Note that the Go button is only enabled when a legal table name
has been entered at the top.
The remote table in most cases contains only a subset of the the columns in the relevant VizieR table, including the most useful ones. The
service currently provides no straightforward way to acquire columns which are not returned by default.
The following item is available in the toolbar and Search menu:
Use Service Coverage
If this option is selected, then the sky coverage of the service is used to pre-filter local table rows. In this case those rows that fall
outside the coverage area of the remote table are not uploaded for matching, since it is known that they will not match. This option
should therefore not affect the result, but improve performance, and as such should generally be turned on (the default).
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Acknowledgement: CDS note that if the use of the X-Match service is useful to your research, they would appreciate the following
acknowledgement:
"This research made use of the cross-match service provided by CDS, Strasbourg."
Concatenation Window
The Concatenation Window allows you to join two tables together top-to-bottom. It can be obtained using the Concatenate Tables button (
) in the Control Window Joins menu.
When two windows are concatenated all the rows of the first ("base") table are followed by all the rows of the second ("appended") table.
The result is a new table which has a number of rows equal to the sum of the two it has been made from. The columns in the resulting table
are the same as those of the base table. To perform the concatenation, you have to specify which columns from the appended table
correspond to which ones in the base table. Of course, this sort of operation only makes sense if at least some of the columns in both tables
have the same meaning. This process is discussed in more detail in Section 5.1.
The concatenation window allows you to select the base and appended tables, and for each column in the base table to specify which column
in the appended table corresponds to it. You may select a blank for this, in which case the column in question will have all null entries in the
resulting table. In some cases these column selectors may have a value filled in automatically if the program thinks it can guess appropriate
ones, but you should ensure that it has guessed correctly in this case. Only suitable columns are available for choosing from these column
selectors; in most cases this means numeric ones.
When you have filled in the fields to your satisfaction, hit the Concatenate button at the bottom of the window, and a new table will be
created and added to the table list in the Control Window (a popup window will inform you this has happened).
The result is created from the Apparent versions of the base and appended tables, so that any row subsets, hidden columns, or sorts currently
in force will be reflected in the output.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Activation Window
The Activation Window allows you to configure an action to perform when a table row is activated by clicking on a row in the Data Window
or a point in the Plot Window. It can be obtained by clicking the Activation Action selector at the bottom of the properties panel in the
Control Window.
You have various options for how to define the action. On the left of the window is a list of options; you have to choose one of these to
determine what kind of action will take place. When you click on one of these options the corresponding controls on the right hand side will
become enabled: use these to select the details of the action and then click the OK button so that subsequent activation events will cause the
action you have defined (or Cancel so that they won't). When you click OK the Activation Action in the control window will indicate the
action you have configured.
The available options are as follows:
No Action
If this is selected, no special action will take place when a row is activated. This is the default.
Display Cutout Image
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
This option presents an easy-to-use way of popping up a cutout image from an image server displaying a region of sky around an
activated row. You need to select the columns in your table which represent Right Ascension and Declination, including the units in
which they are entered in the table (TOPCAT may be able to guess some or all of this information based on column names, UCDs and
unit values, in which case it will enter its guesses in the selectors for you to accept or change). You also need to select the size in
pixels of the image you want to see and the name of the survey which will supply the image from one of the listed ones:
SuperCOSMOS All-Sky Blue
SuperCOSMOS All-Sky Red
2MASS Quick-Look J-band
2MASS Quick-Look H-band
2MASS Quick-Look K-band
SDSS Colour Images (note does not provide all-sky coverage)
When you activate the row, the program will attempt to contact the web server which provides these images, retrieve the image, and
display it in an image viewer window. Unfortunately at present the viewer window is an internal one; it does not display in an external
SAMP/PLASTIC viewer.
View URL as Image
This option is suitable if one of the columns in your table gives the location (filename or URL) of an image file. The image may be in
FITS, GIF, JPEG or PNG format, optionally compressed using gzip, Unix compress, or bzip2 format. Select the column which
contains the location, and activating a row will pop up an image viewer to display it (if the table is the result of a single or multiple
SIA query, the correct column will probably be filled in automatically). The Image Viewer selector allows you to choose one of the
options in Appendix A.10.3.1 or, if you are registered with a SAMP or PLASTIC hub, any SAMP/PLASTIC image viewer which is
also registered - see Section 9.
View URL as Spectrum
This option is suitable if one of the columns in your table gives the location (filename or URL) of a spectrum file, and you wish to
display the spectra in an external SAMP- or PLASTIC-compatible spectrum viewer, such as SPLAT or VOSpec. First select the
column which contains the Spectrum Location (if the table is the result of a single or multiple SSA query, the correct column will
probably be filled in automatically). Then choose the Spectrum Viewer appropriately. Once this is done, activating a row will try to
send the corresponding spectrum to the selected viewer application(s). The details of what data formats are acceptable depend on the
viewer application, but FITS, VOTable and some ASCII table variants are usually OK. Note that TOPCAT, as well as a suitable
spectrum viewer, must be connected to a running SAMP or PLASTIC hub for this to work (see Section 9) - there is no internal
spectrum viewer.
View URL as Web Page
This option is suitable if one of the columns in your table gives the location (filename or URL) of a web page; this should normally be
in HTML or plain text, but depending on what browser you use other kinds of document may be supported. Select the column which
contains the location and the browser which you would like to use for display, and activating a row will try to pop up a browser
window to display it. See Appendix A.10.3.3 for more information about browsers.
Transmit Row
This option causes the row number of an activated row to be transmitted to one or more other applications using an appropriate SAMP
or PLASTIC message. This will only work if TOPCAT is registered with a SAMP/PLASTIC hub, and so are one or more other
applications which understand that message, and the other application(s) know about the table in question, for instance because it has
previously been sent to/from TOPCAT. You may specify that either a single application, or all appropriate ones, will receive the
messages. See Section 9 for more explanation.
Transmit Coordinates
This option causes the sky position of an activated row to be transmitted to one or more other applications using an appropriate SAMP
or PLASTIC message. This will only work if TOPCAT is registered with a SAMP/PLASTIC hub, and so are one or more other
applications which understand that message. An example might be a sky viewing application such as Aladin which can point to a
particular region of sky whenever you activate a point. You need to specify the columns which represent (J2000) Right Ascension and
Declination, and optionally a particular listener to receive the messages (otherwise all registered ones will). See Section 9 for more
explanation.
Execute Custom Code
This option must be used if none of the others (which are fairly restrictive) do what you want. It is highly flexible, but not so easy to
use. What you have to do is to write an expression following the rules in Section 7 involving some of the column names which will be
invoked when a row is activated. This expression will typically have the effect of popping up an image or a spectrum in a viewer, but,
especially if you link in your own functions (see Section 7.9) it can do pretty much anything.
Functions which are expected to be useful for activation actions are described in Appendix B.2 and include some general-purpose ones
(displayImage and displaySpectrum to display an image or spectrum in an external viewer) as well as a few which are relevant to
particular survey data, for instance the spectra2QZ() function, which will pop up a spectrum viewer displaying all the spectra related
to a given row of 2QZ survey data based on the contents of its NAME column.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
As the above list shows, most of the activation actions you can define result in a viewer window of some kind popping up. Exactly what kind
of viewer is used depends on how TOPCAT is set up and in some cases on your choices. More details of the viewer programs available are
given in the following subsections. If these don't do what you want, you can use the Execute Custom Code option, perhaps in conjunction
with user-defined functions or the System exec() functions described in Appendix B.2, to invoke your own.
A.10.3.1 Image Viewer Applications
If you choose the Display Cutout Image or View URL as Image option in the Activation Window, then activating a row will display an
image in an image viewer.
The default image viewer is SoG, an astronomical image viewer based on JSky, which offers colourmap manipulation, image zooming,
graphics overlays, and other features. For this to work JAI, otherwise known as Java Advanced Imaging must be installed. JAI is a free
component available from Sun, but not a part of the Java 2 Standard Edition by default. In operation, SoG looks like this:
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Help Window
The help window is a browser for displaying help information on TOPCAT; it can be obtained by clicking the Help (
in the toolbar of most windows. It views the text contained in this document, so it may be what you are looking at now.
The panel on the right hand side displays the currently selected section of help text itself. The panel on the left gives a couple of ways of
selecting this view:
Text Search
Allows you to search for words in the manual. Enter a word or words as search terms, and a list of sections which fully or partially
match your search terms will be displayed. You can click on one of these to take you to the section that has been found.
Table of Contents
A hierarchical view of the available help topics. This is the table of contents of the manual; clicking on an entry will take you to the
relevant section.
The bar in between the two panels can be dragged with the mouse to affect the relative sizes of these windows.
The toolbar contains these extra buttons:
Back
Moves backward through the list of topics in the order you have looked at them.
Forward
Moves forward through the list of topics in the order you have looked at them.
Print
Pops up a dialogue to permit printing of the current page to a file or printer (but see below).
Page Setup
Pops up a dialogue to do printer setup.
To Browser
Displays the currently displayed help page in your normal WWW browser.
Although the printing buttons work, if you want to print out the whole of this document rather than just a few sections you may be better off
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
printing the PDF version, or printing the single-page HTML version through a web browser. The most recent version of these should be
available on the web at http://www.starlink.ac.uk/topcat/sun253/sun253.html and http://www.starlink.ac.uk/topcat/sun253.pdf; you can also
find the HTML version in the topcat jar file at uk/ac/starlink/topcat/help/sun253.html or, if you have a full TOPCAT installation, in
docs/topcat/sun253/sun253.html and docs/topcat/sun253.pdf (the single-page HTML version is available here in the HTML version).
The help browser is an HTML browser and some of the hyperlinks in the help document point to locations outside of the help document
itself. Selecting these links will go to the external documents. When the viewer is displaying an external document, its URL will be
displayed in a line at the bottom of the window. You can cut and paste from this using your platform's usual mechanisms for this.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
11/18/14, 17:34
problem, it's time to consult your friendly local Java programmer (failing that, your friendly local C programmer may be able to help) or, by
all means, contact the author.
If you wish to add more metadata items you can edit the appropriate cells in the Columns Window. You can edit the expression of an
existing synthetic column in the same way.
Once created, a synthetic column is added to the Apparent Table and behaves just like any other; it can be moved, hidden/revealed, used in
expressions for other synthetic columns and so on. If the table is saved the new column and its contents will be written to the new output
table.
11/18/14, 17:34
The Algebraic Subset Window allows you to define a new Row Subset which uses an algebraic expression to define which rows are
included. The expression must be a boolean one, i.e. its value is either true or false for each row of the table. You can activate this dialogue
using the Add Subset (
) button in the Subsets Window.
The window consists of two fields which must be filled in to define the new subset:
Subset Name
The name of the new subset. This should preferably be unique (different from existing subset names). It will be easier to use it in other
expressions if it is also:
Different from other columns even apart from upper/lower case distinctions
In the form of a java identifier (starts with a letter, continues with alphanumerics including underscore)
Not too long
Expression
This is a boolean expression which defines the subset; it is a function of the values of any combination of the columns; only rows for
which it evaluates to true will be included in the subset. The values of the other columns in the same row are referenced using their
names or $ID identifiers, and other subsets may be referenced using their names or _ID identifiers. The rules for expression syntax are
described in Section 7, and detailed documentation of the functions you can use can be seen in the Available Functions Window,
which you can see by clicking the Show Functions (
) button on the toolbar.
Having filled in the form to your satisfaction, hit the OK button at the bottom and the new subset will be added to the list that can be seen in
the Subsets Window where it behaves like any other. If you have made some mistake in filling in the fields, a popup window will give you a
message describing the problem.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
This window displays all the functions (Java methods) which are available for use when writing algebraic expressions. This includes both
the built-in expressions and any extended ones you might have added. You can find this window by using the Show Functions (
) button
in the Synthetic Column or Algebraic Subset window toolbars.
On the left hand side of the window is a tree-like representation of the functions you can use. Each item in this tree is one of the following:
Folder
A group of classes. There's only one of these, marked "Activation Functions", and it contains functions which are only available for
use in Activation Actions. When defining a new synthetic columns or algebraic subsets they are not used.
Class
A set of functions and/or constants; it doesn't matter what class a function is in when you use it, but since the functions in a class are
usually related this makes it easier to find the one you're looking for in this window.
Function
A function that you can use in an expression.
Constant
A constant value which you can refer to by name in an expression (as long as it doesn't clash with a column name).
Of these, the Folder and Class items have a 'handle' ( ), which means that they contain other items (classes and functions/constants
respectively). By clicking on the handle (or equivalently double-clicking on the name) you can toggle whether the item is open (so you can
see its contents) or closed (so you can't). So to see the functions in a class, click on its handle and they will be revealed.
You can click on any of these items and information about it will appear in the right hand panel. In the case of functions this describes the
function, its arguments, what it does, and how to use it. The explanations should be fairly self-explanatory; for instance the description in the
figure above indicates that you could use the invocation skyDistanceDegrees(RA1,DEC1,RA2,DEC2) as the expression for a new table
column which gives the angular distance between two sky positions represented by columns with the names RA1, DEC1 and RA2, DEC2.
Examples of a number of these functions are given in Section 7.8.
There are two menu/toolbar actions:
Syntax Help
Displays the section of the manual which discusses the general syntax used for algebraic expressions, including what operators are
available, what the rules are for referring to columns, etc. The help is displayed in the Help Window (and can from there be passed to a
browser if that's more convenient). The displayed material is simply a shortcut to Section 7 in this document.
Add Class
Allows you to add the name of a class to those available. You should enter the fully-qualified class name (i.e. including the dotseparated package path). The class that you specify must be on the class path which was current when TOPCAT was started, as
explained in Section 10.2.1. Note however it would be more usual to specify these using the system property jel.classes or
jel.classes.activation at startup, as described in Section 7.9.
Classes added either using the Add Class action above or the jel.classes or jel.classes.activation system properties will be visible in
the tree in this window, but they may not have proper documentation (clicking on them may not reveal a description in the right hand panel).
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Log Window
The log window can be obtained using the View Log option on the File menu of the Control Window.
This window displays any log messages which the application has generated. Depending on whether the -verbose flag has been specified,
some or all of these messages may have been written to console as well (if there is a console - this depends on how you have invoked
TOPCAT). Under some circumstances, messages way back in the list may not be displayed.
To clear the display of all the existing messages you can use the Clear Log button (
).
The messages displayed here are those written through Java's logging system - in general they are intended for debugging purposes and not
for users to read, but if something unexpected is happening, or if you are filing a bug report, it may provide some clues about what's going
on. Although it tries not to disturb things too much, TOPCAT's manipulation of the logging infrastructure affects how it is set up, so if you
have customised your logging setup using, e.g., the java.util.logging.config.* system properties, you may find that it's not behaving
exactly as you expected. Sorry.
B Algebraic Functions
This appendix lists the functions which can be used in algebraic expressions (see Section 7). They are listed in two sections: the first gives
the functions available for use anywhere an expression can be used, and the second gives those only for use in defining custom Activation
Actions.
Note that although all the available functions are listed here with short descriptions, their full explanation, including parameter descriptions
and examples, is only available from the Available Functions Window, obtained using the
toolbar button.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
B.1.1 Tilings
Pixel tiling functions for the celestial sphere.
htmIndex( level, ra, dec )
Gives the HTM (Hierachical Triangular Mesh) pixel index for a given sky position.
healpixNestIndex( k, ra, dec )
Gives the pixel index for a given sky position in the HEALPix NEST scheme.
healpixRingIndex( k, ra, dec )
Gives the pixel index for a given sky position in the HEALPix RING scheme.
healpixK( pixelsize )
Gives the HEALPix resolution parameter suitable for a given pixel size. This k value is the logarithm to base 2 of the Nside parameter.
healpixResolution( k )
Gives the approximate resolution in degrees for a given HEALPix resolution parameter k This k value is the logarithm to base 2 of the
Nside parameter.
htmLevel( pixelsize )
Gives the HTM level parameter suitable for a given pixel size.
htmResolution( level )
Gives the approximate resolution in degrees for a given HTM depth level.
B.1.2 Arithmetic
Standard arithmetic functions including things like rounding, sign manipulation, and maximum/minimum functions.
roundUp( x )
Rounds a value up to an integer value. Formally, returns the smallest (closest to negative infinity) integer value that is not less than the
argument.
roundDown( x )
Rounds a value down to an integer value. Formally, returns the largest (closest to positive infinity) integer value that is not greater than
the argument.
round( x )
Rounds a value to the nearest integer. Formally, returns the integer that is closest in value to the argument. If two integers are equally
close, the result is the even one.
roundDecimal( x, dp )
Rounds a value to a given number of decimal places. The result is a float (32-bit floating point value), so this is only suitable for
relatively low-precision values. It's intended for truncating the number of apparent significant figures represented by a value which
you know has been obtained by combining other values of limited precision. For more control, see the functions in the Formats class.
abs( x )
Returns the absolute value of an integer value. If the argument is not negative, the argument is returned. If the argument is negative,
the negation of the argument is returned.
abs( x )
Returns the absolute value of a floating point value. If the argument is not negative, the argument is returned. If the argument is
negative, the negation of the argument is returned.
max( a, b )
Returns the greater of two integer values. If the arguments have the same value, the result is that same value.
max( a, b )
Returns the greater of two floating point values. If the arguments have the same value, the result is that same value. If either value is
blank, then the result is blank.
maxReal( a, b )
Returns the greater of two floating point values, ignoring blanks. If the arguments have the same value, the result is that same value. If
one argument is blank, the result is the other one. If both arguments are blank, the result is blank.
min( a, b )
Returns the smaller of two integer values. If the arguments have the same value, the result is that same value.
min( a, b )
Returns the smaller of two floating point values. If the arguments have the same value, the result is that same value. If either value is
blank, then the result is blank.
minReal( a, b )
Returns the smaller of two floating point values, ignoring blanks. If the arguments have the same value, the result is that same value. If
one argument is blank, the result is the other one. If both arguments are blank, the result is blank.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
B.1.3 Conversions
Functions for converting between strings and numeric values.
toString( fpVal )
Turns a numeric value into a string.
toString( intVal )
Turns an integer numeric value into a string.
toString( charVal )
Turns a single character value into a string.
toString( byteVal )
Turns a byte value into a string.
toString( booleanVal )
Turns a boolean value into a string.
toString( objVal )
Turns any object value into a string. As applied to existing string values this isn't really useful, but it means that you can apply
toString to any object value without knowing its type and get a useful return from it.
parseByte( str )
Attempts to interpret a string as a byte (8-bit signed integer) value. If the input string can't be interpreted in this way, a blank value will
result.
parseShort( str )
Attempts to interpret a string as a short (16-bit signed integer) value. If the input string can't be interpreted in this way, a blank value
will result.
parseInt( str )
Attempts to interpret a string as an int (32-bit signed integer) value. If the input string can't be interpreted in this way, a blank value
will result.
parseLong( str )
Attempts to interpret a string as a long (64-bit signed integer) value. If the input string can't be interpreted in this way, a blank value
will result.
parseFloat( str )
Attempts to interpret a string as a float (32-bit floating point) value. If the input string can't be interpreted in this way, a blank value
will result.
parseDouble( str )
Attempts to interpret a string as a double (64-bit signed integer) value. If the input string can't be interpreted in this way, a blank value
will result.
toByte( value )
Attempts to convert the numeric argument to a byte (8-bit signed integer) result. If it is out of range, a blank value will result.
toShort( value )
Attempts to convert the numeric argument to a short (16-bit signed integer) result. If it is out of range, a blank value will result.
toInteger( value )
Attempts to convert the numeric argument to an int (32-bit signed integer) result. If it is out of range, a blank value will result.
toLong( value )
Attempts to convert the numeric argument to a long (64-bit signed integer) result. If it is out of range, a blank value will result.
toFloat( value )
Attempts to convert the numeric argument to a float (32-bit floating point) result. If it is out of range, a blank value will result.
toDouble( value )
Converts the numeric argument to a double (64-bit signed integer) result.
toHex( value )
Converts the integer argument to hexadecimal form.
fromHex( hexVal )
Converts a string representing a hexadecimal number to its integer value.
B.1.4 Distances
Functions for converting between different measures of cosmological distance.
The following parameters are used:
z: redshift
H0: Hubble constant in km/sec/Mpc (example value ~70)
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
B.1.5 KCorrections
Functions for calculating K-corrections.
kCorr( filter, redshift, colorType, colorValue )
Calculates K-corrections. This allows you to determine K-corrections for a galaxy, given its redshift and a colour. Filters for GALEX,
SDSS, UKIDSS, Johnson, Cousins and 2MASS are covered.
To define the calculation you must choose both a filter, specified as a KCF_* constant, and a colour (filter pair) specified as a KCC_*
constant. For each available filter, only certain colours are available, as described in the documentation of the relevant KCF_* constant.
The algorithm used is described at http://kcor.sai.msu.ru/. This is based on the paper "Analytical Approximations of K-corrections in
Optical and Near-Infrared Bands" by I.Chilingarian, A.-L.Melchior and I.Zolotukhin (2010MNRAS.405.1409C), but extended to
include GALEX UV bands and with redshift coverage up to 0.5 as described in "Universal UV-optical Colour-Colour-Magnitude
Relation of Galaxies" by I.Chilingarian and I.Zolotukhin (2012MNRAS.419.1727C).
KCF_FUV
GALEX FUV filter (AB). Use with KCC_FUVNUV or KCC_FUVu.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
KCF_NUV
GALEX NUV filter (AB). Use with KCC_NUVg or KCC_NUVr.
KCF_u
SDSS u filter (AB). Use with KCC_ur, KCC_ui or KCC_uz.
KCF_g
SDSS g filter (AB). Use with KCC_gr, KCC_gi or KCC_gz.
KCF_r
SDSS r filter (AB). Use with KCC_gr or KCC_ur.
KCF_i
SDSS i filter (AB). Use with KCC_gi or KCC_ui.
KCF_z
SDSS z filter (AB). Use with KCC_rz, KCC_gz or KCC_uz.
KCF_Y
UKIDSS Y filter (AB). Use with KCC_YH or KCC_YK.
KCF_J
UKIDSS J filter (AB). Use with KCC_JK or KCC_JH.
KCF_H
UKIDSS H filter (AB). Use with KCC_HK or KCC_JH.
KCF_K
UKIDSS K filter (AB). Use with KCC_JK or KCC_HK.
KCF_U
Johnson U filter (Vega). Use with KCC_URc.
KCF_B
Johnson B filter (Vega). Use with KCC_BRc or KCC_BIc.
KCF_V
Johnson V filter (Vega). Use with KCC_VIc or KCC_VRc.
KCF_Rc
Cousins Rc filter (Vega). Use with KCC_BRc or KCC_VRc.
KCF_Ic
Cousins Ic filter (Vega). Use with KCC_VIc.
KCF_J2
2MASS J filter (Vega). Use with KCC_J2Ks2 or KCC_J2H2.
KCF_H2
2MASS H filter (Vega). Use with KCC_H2Ks2 or KCC_J2H2.
KCF_Ks2
2MASS Ks filter (Vega). Use with KCC_J2Ks2 or KCC_H2Ks2.
KCC_BIc
Johnson B - Cousins Ic colour.
KCC_BRc
Johnson B - Cousins Rc colour.
KCC_FUVNUV
GALEX FUV - NUV colour.
KCC_FUVu
GALEX FUV - SDSS u colour.
KCC_gi
SDSS g - i colour.
KCC_gr
SDSS g - r colour.
KCC_gz
SDSS g - z colour.
KCC_H2Ks2
2MASS H - Ks colour.
KCC_HK
UKIDSS H - K colour.
KCC_J2H2
2MASS J - H colour.
KCC_J2Ks2
2MASS J - Ks colour.
KCC_JH
UKIDSS J - H colour.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
KCC_JK
UKIDSS J - K colour.
KCC_NUVg
GALEX NUV - SDSS g colour.
KCC_NUVr
GALEX NUV - SDSS r colour.
KCC_rz
SDSS r - SDSS z colour.
KCC_ui
SDSS u - SDSS i colour.
KCC_URc
Johnson U - Cousins Rc colour.
KCC_ur
SDSS u - r colour.
KCC_uz
SDSS u - z colour.
KCC_VIc
Johnson V - Cousins Ic colour.
KCC_VRc
Johnson V - Cousins Rc colour.
KCC_YH
UKIDSS Y - H colour.
KCC_YK
UKIDSS Y - K colour.
B.1.6 Times
Functions for conversion of time values between various forms. The forms used are
Modified Julian Date (MJD)
A continuous measure in days since midnight at the start of 17 November 1858. Based on UTC.
ISO 8601
A string representation of the form yyyy-mm-ddThh:mm:ss.s, where the T is a literal character (a space character may be used instead).
Based on UTC.
Julian Epoch
A continuous measure based on a Julian year of exactly 365.25 days. For approximate purposes this resembles the fractional number
of years AD represented by the date. Sometimes (but not here) represented by prefixing a 'J'; J2000.0 is defined as 2000 January 1.5 in
the TT timescale.
Besselian Epoch
A continuous measure based on a tropical year of about 365.2422 days. For approximate purposes this resembles the fractional
number of years AD represented by the date. Sometimes (but not here) represented by prefixing a 'B'.
Decimal Year
Fractional number of years AD represented by the date. 2000.0, or equivalently 1999.99recurring, is midnight at the start of the first of
January 2000. Because of leap years, the size of a unit depends on what year it is in.
Therefore midday on the 25th of October 2004 is 2004-10-25T12:00:00 in ISO 8601 format, 53303.5 as an MJD value, 2004.81588 as a
Julian Epoch and 2004.81726 as a Besselian Epoch.
Currently this implementation cannot be relied upon to better than a millisecond.
isoToMjd( isoDate )
Converts an ISO8601 date string to Modified Julian Date. The basic format of the isoDate argument is yyyy-mm-ddThh:mm:ss.s,
though some deviations from this form are permitted:
The 'T' which separates date from time can be replaced by a space
The seconds, minutes and/or hours can be omitted
The decimal part of the seconds can be any length, and is optional
A 'Z' (which indicates UTC) may be appended to the time
Some legal examples are therefore: "1994-12-21T14:18:23.2", "1968-01-14", and "2112-05-25 16:45Z".
dateToMjd( year, month, day, hour, min, sec )
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
B.1.7 TrigDegrees
Standard trigonometric functions with angles in degrees.
sinDeg( theta )
Sine of an angle.
cosDeg( theta )
Cosine of an angle.
tanDeg( theta )
Tangent of an angle.
asinDeg( x )
Arc sine. The result is in the range of -90 through 90.
acosDeg( x )
Arc cosine. The result is in the range of 0.0 through 180.
atanDeg( x )
Arc tangent. The result is in the range of -90 through 90.
atan2Deg( y, x )
Converts rectangular coordinates (x,y) to polar (r,theta). This method computes the phase theta by computing an arc tangent of y/x
in the range of -180 to 180.
B.1.8 Maths
Standard mathematical and trigonometric functions. Trigonometric functions work with angles in radians.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
sin( theta )
Sine of an angle.
cos( theta )
Cosine of an angle.
tan( theta )
Tangent of an angle.
asin( x )
Arc sine of an angle. The result is in the range of -pi/2 through pi/2.
acos( x )
Arc cosine of an angle. The result is in the range of 0.0 through pi.
atan( x )
Arc tangent of an angle. The result is in the range of -pi/2 through pi/2.
exp( x )
Euler's number e raised to a power.
log10( x )
Logarithm to base 10.
ln( x )
Natural logarithm.
sqrt( x )
Square root. The result is correctly rounded and positive.
hypot( x, y )
Returns the square root of the sum of squares of its two arguments. Doing it like this may avoid intermediate overflow or underflow.
atan2( y, x )
Converts rectangular coordinates (x,y) to polar (r,theta). This method computes the phase theta by computing an arc tangent of y/x
in the range of -pi to pi.
pow( a, b )
Exponentiation. The result is the value of the first argument raised to the power of the second argument.
sinh( x )
Hyperbolic sine.
cosh( x )
Hyperbolic cosine.
tanh( x )
Hyperbolic tangent.
asinh( x )
Inverse hyperbolic sine.
acosh( x )
Inverse hyperbolic cosine.
atanh( x )
Inverse hyperbolic tangent.
E
Euler's number e, the base of natural logarithms.
PI
Pi, the ratio of the circumference of a circle to its diameter.
Infinity
Positive infinite floating point value.
NaN
Not-a-Number floating point value. Use with care; arithmetic and logical operations behave in strange ways near NaN (for instance,
NaN!=NaN). For most purposes this is equivalent to the blank value.
RANDOM
Evaluates to a random number in the range 0<=x<1. This is different for each cell of the table. The quality of the randomness may not
be particularly good.
B.1.9 Arrays
Functions which perform aggregating operations on array-valued cells. The functions in this class such as mean, sum, maximum etc can only
be used on values which are already arrays. In most cases that means on values in table columns which are declared as array-valued. FITS
and VOTable tables can have columns which contain array values, but other formats such as CSV cannot.
There is also a set of functions named array with various numbers of arguments, which let you assemble an array value from a list of scalar
numbers. This can be used for instance to get the mean of a set of three magnitudes by using an expression like "mean(array(jmag, hmag,
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
kmag))".
sum( array )
Returns the sum of all the non-blank elements in the array. If array is not a numeric array, null is returned.
mean( array )
Returns the mean of all the non-blank elements in the array. If array is not a numeric array, null is returned.
variance( array )
Returns the population variance of all the non-blank elements in the array. If array is not a numeric array, null is returned.
stdev( array )
Returns the population standard deviation of all the non-blank elements in the array. If array is not a numeric array, null is returned.
minimum( array )
Returns the smallest of the non-blank elements in the array. If array is not a numeric array, null is returned.
maximum( array )
Returns the largest of the non-blank elements in the array. If array is not a numeric array, null is returned.
median( array )
Returns the median of the non-blank elements in the array. If array is not a numeric array, null is returned.
quantile( array, quant )
Returns a quantile value of the non-blank elements in the array. Which quantile is determined by the quant value; values of 0, 0.5 and
1 give the minimum, median and maximum respectively. A value of 0.99 would give the 99th percentile.
size( array )
Returns the number of elements in the array. If array is not an array, zero is returned.
count( array )
Returns the number of non-blank elements in the array. If array is not an array, zero is returned.
join( array, joiner )
Returns a string composed of concatenating all the elements of an array, separated by a joiner string. If array is not an array, null is
returned.
array( x1 )
Returns a numeric array built from a given element.
array( x1, x2 )
Returns a numeric array built from given elements.
array( x1, x2, x3 )
Returns a numeric array built from given elements.
array( x1, x2, x3, x4 )
Returns a numeric array built from given elements.
array( x1, x2, x3, x4, x5 )
Returns a numeric array built from given elements.
array( x1, x2, x3, x4, x5, x6 )
Returns a numeric array built from given elements.
array( x1, x2, x3, x4, x5, x6, x7 )
Returns a numeric array built from given elements.
array( x1, x2, x3, x4, x5, x6, x7, x8 )
Returns a numeric array built from given elements.
B.1.10 Fluxes
Functions for conversion between flux and magnitude values. Functions are provided for conversion between flux in Janskys and AB
magnitudes.
Some constants for approximate conversions between different magnitude scales are also provided:
Constants JOHNSON_AB_*, for Johnson <-> AB magnitude conversions, from Frei and Gunn, Astronomical Journal 108, 1476 (1994),
Table 2 (1994AJ....108.1476F).
Constants VEGA_AB_*, for Vega <-> AB magnitude conversions, from Blanton et al., Astronomical Journal 129, 2562 (2005), Eqs. (5)
(2005AJ....129.2562B).
abToJansky( magAB )
Converts AB magnitude to flux in Jansky.
F/Jy=10(23-(AB+48.6)/2.5)
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
janskyToAb( fluxJansky )
Converts flux in Jansky to AB magnitude.
AB=2.5*(23-log10(F/Jy))-48.6
luminosityToFlux( lumin, dist )
Converts luminosity to flux given a luminosity distance.
F=lumin/(4 x Pi x dist2)
fluxToLuminosity( flux, dist )
Converts flux to luminosity given a luminosity distance.
lumin=(4 x Pi x dist2) F
JOHNSON_AB_V
Approximate offset between Johnson and AB magnitudes in V band. VJ~=VAB+JOHNSON_AB_V.
JOHNSON_AB_B
Approximate offset between Johnson and AB magnitudes in B band. BJ~=BAB+JOHNSON_AB_B.
JOHNSON_AB_Bj
Approximate offset between Johnson and AB magnitudes in Bj band. BjJ~=BjAB+JOHNSON_AB_Bj.
JOHNSON_AB_R
Approximate offset between Johnson and AB magnitudes in R band. RJ~=RAB+JOHNSON_AB_R.
JOHNSON_AB_I
Approximate offset between Johnson and AB magnitudes in I band. IJ~=IAB+JOHNSON_AB_I.
JOHNSON_AB_g
Approximate offset between Johnson and AB magnitudes in g band. gJ~=gAB+JOHNSON_AB_g.
JOHNSON_AB_r
Approximate offset between Johnson and AB magnitudes in r band. rJ~=rAB+JOHNSON_AB_r.
JOHNSON_AB_i
Approximate offset between Johnson and AB magnitudes in i band. iJ~=iAB+JOHNSON_AB_i.
JOHNSON_AB_Rc
Approximate offset between Johnson and AB magnitudes in Rc band. RcJ~=RcAB+JOHNSON_AB_Rc.
JOHNSON_AB_Ic
Approximate offset between Johnson and AB magnitudes in Ic band. IcJ~=IcAB+JOHNSON_AB_Ic.
JOHNSON_AB_uPrime
Offset between Johnson and AB magnitudes in u' band (zero). u'J=u'AB+JOHNSON_AB_uPrime=u'AB.
JOHNSON_AB_gPrime
Offset between Johnson and AB magnitudes in g' band (zero). g'J=g'AB+JOHNSON_AB_gPrime=g'AB.
JOHNSON_AB_rPrime
Offset between Johnson and AB magnitudes in r' band (zero). r'J=r'AB+JOHNSON_AB_rPrime=r'AB.
JOHNSON_AB_iPrime
Offset between Johnson and AB magnitudes in i' band (zero). i'J=i'AB+JOHNSON_AB_iPrime=i'AB.
JOHNSON_AB_zPrime
Offset between Johnson and AB magnitudes in z' band (zero). z'J=z'AB+JOHNSON_AB_zPrime=z'AB.
VEGA_AB_J
Approximate offset between Vega (as in 2MASS) and AB magnitudes in J band. JVega~=JAB+VEGA_AB_J.
VEGA_AB_H
Approximate offset between Vega (as in 2MASS) and AB magnitudes in H band. HVega~=HAB+VEGA_AB_H.
VEGA_AB_K
Approximate offset between Vega (as in 2MASS) and AB magnitudes in K band. KVega~=KAB+VEGA_AB_K.
B.1.11 Strings
String manipulation and query functions.
concat( s1, s2 )
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Concatenates two strings. In most cases the same effect can be achieved by writing s1+s2, but blank values can sometimes appear as
the string "null" if you do it like that.
concat( s1, s2, s3 )
Concatenates three strings. In most cases the same effect can be achieved by writing s1+s2+s3, but blank values can sometimes appear
as the string "null" if you do it like that.
concat( s1, s2, s3, s4 )
Concatenates four strings. In most cases the same effect can be achieved by writing s1+s2+s3+s4, but blank values can sometimes
appear as the string "null" if you do it like that.
equals( s1, s2 )
Determines whether two strings are equal. Note you should use this function instead of s1==s2, which can (for technical reasons)
return false even if the strings are the same.
equalsIgnoreCase( s1, s2 )
Determines whether two strings are equal apart from possible upper/lower case distinctions.
startsWith( whole, start )
Determines whether a string starts with a certain substring.
endsWith( whole, end )
Determines whether a string ends with a certain substring.
contains( whole, sub )
Determines whether a string contains a given substring.
length( str )
Returns the length of a string in characters.
split( words )
Splits a string into an array of space-separated words. One or more spaces separates each word from the next. Leading and trailing
spaces are ignored.
The result is an array of strings, and if you want to use the individual elements you need to use square-bracket indexing, with [0]
representing the first object
split( words, regex )
Splits a string into an array of words separated by a given regular expression.
The result is an array of strings, and if you want to use the individual elements you need to use square-bracket indexing, with [0]
representing the first object
matches( str, regex )
Tests whether a string matches a given regular expression.
matchGroup( str, regex )
Returns the first grouped expression matched in a string defined by a regular expression. A grouped expression is one enclosed in
parentheses.
replaceFirst( str, regex, replacement )
Replaces the first occurrence of a regular expression in a string with a different substring value.
replaceAll( str, regex, replacement )
Replaces all occurrences of a regular expression in a string with a different substring value.
substring( str, startIndex )
Returns the last part of a given string. The substring begins with the character at the specified index and extends to the end of this
string.
substring( str, startIndex, endIndex )
Returns a substring of a given string. The substring begins with the character at startIndex and continues to the character at index
endIndex-1 Thus the length of the substring is endIndex-startIndex.
toUpperCase( str )
Returns an uppercased version of a string.
toLowerCase( str )
Returns an uppercased version of a string.
trim( str )
Trims whitespace from both ends of a string.
padWithZeros( value, ndigit )
Takes an integer argument and returns a string representing the same numeric value but padded with leading zeros to a specified
length.
B.1.12 Formats
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
B.1.13 CoordsRadians
Functions for angle transformations and manipulations, based on radians rather than degrees. In particular, methods for translating between
radians and HH:MM:SS.S or DDD:MM:SS.S type sexagesimal representations are provided.
radiansToDms( rad )
Converts an angle in radians to a formatted degrees:minutes:seconds string. No fractional part of the seconds field is given.
radiansToDms( rad, secFig )
Converts an angle in radians to a formatted degrees:minutes:seconds string with a given number of decimal places in the seconds field.
radiansToHms( rad )
Converts an angle in radians to a formatted hours:minutes:seconds string. No fractional part of the seconds field is given.
radiansToHms( rad, secFig )
Converts an angle in radians to a formatted hours:minutes:seconds string with a given number of decimal places in the seconds field.
dmsToRadians( dms )
Converts a formatted degrees:minutes:seconds string to an angle in radians. Delimiters may be colon, space, characters dm[s], or some
others. Additional spaces and leading +/- are permitted. The :seconds part is optional.
hmsToRadians( hms )
Converts a formatted hours:minutes:seconds string to an angle in radians. Delimiters may be colon, space, characters hm[s], or some
others. Additional spaces and leading +/- are permitted. The :seconds part is optional.
dmsToRadians( deg, min, sec )
Converts degrees, minutes, seconds to an angle in radians.
In conversions of this type, one has to be careful to get the sign right in converting angles which are between 0 and -1 degrees. This
routine uses the sign bit of the deg argument, taking care to distinguish between +0 and -0 (their internal representations are different
for floating point values). It is illegal for the min or sec arguments to be negative.
hmsToRadians( hour, min, sec )
Converts hours, minutes, seconds to an angle in radians.
In conversions of this type, one has to be careful to get the sign right in converting angles which are between 0 and -1 hours. This
routine uses the sign bit of the hour argument, taking care to distinguish between +0 and -0 (their internal representations are different
for floating point values).
skyDistanceRadians( ra1, dec1, ra2, dec2 )
Calculates the separation (distance around a great circle) of two points on the sky in radians.
hoursToRadians( hours )
Converts hours to radians.
degreesToRadians( deg )
Converts degrees to radians.
radiansToDegrees( rad )
Converts radians to degrees.
raFK4toFK5radians( raFK4, decFK4 )
Converts a B1950.0 FK4 position to J2000.0 FK5 at an epoch of B1950.0 yielding Right Ascension. This assumes zero proper motion
in the FK5 frame.
decFK4toFK5radians( raFK4, decFK4 )
Converts a B1950.0 FK4 position to J2000.0 FK5 at an epoch of B1950.0 yielding Declination This assumes zero proper motion in the
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
FK5 frame.
raFK5toFK4radians( raFK5, decFK5 )
Converts a J2000.0 FK5 position to B1950.0 FK4 at an epoch of B1950.0 yielding Declination. This assumes zero proper motion,
parallax and radial velocity in the FK5 frame.
decFK5toFK4radians( raFK5, decFK5 )
Converts a J2000.0 FK5 position to B1950.0 FK4 at an epoch of B1950.0 yielding Declination. This assumes zero proper motion,
parallax and radial velocity in the FK5 frame.
raFK4toFK5Radians( raFK4, decFK4, bepoch )
Converts a B1950.0 FK4 position to J2000.0 FK5 yielding Right Ascension. This assumes zero proper motion in the FK5 frame. The
bepoch parameter is the epoch at which the position in the FK4 frame was determined.
decFK4toFK5Radians( raFK4, decFK4, bepoch )
Converts a B1950.0 FK4 position to J2000.0 FK5 yielding Declination. This assumes zero proper motion in the FK5 frame. The
bepoch parameter is the epoch at which the position in the FK4 frame was determined.
raFK5toFK4Radians( raFK5, decFK5, bepoch )
Converts a J2000.0 FK5 position to B1950.0 FK4 yielding Declination. This assumes zero proper motion, parallax and radial velocity
in the FK5 frame.
decFK5toFK4Radians( raFK5, decFK5, bepoch )
Converts a J2000.0 FK5 position to B1950.0 FK4 yielding Declination. This assumes zero proper motion, parallax and radial velocity
in the FK5 frame.
DEGREE_RADIANS
The size of one degree in radians.
HOUR_RADIANS
The size of one hour of right ascension in radians.
ARC_MINUTE_RADIANS
The size of one arcminute in radians.
ARC_SECOND_RADIANS
The size of one arcsecond in radians.
B.1.14 Coverage
Functions related to coverage and footprints.
One coverage standard is Multi-Order Coverage maps, described at http://www.ivoa.net/Documents/MOC/. MOC positions are always
defined in ICRS equatorial coordinates.
MOC locations may be given as either the filename or the URL of a MOC FITS file. Alternatively, they may be the identifier of a VizieR
table, for instance "V/139/sdss9" (SDSS DR9). A list of all the MOCs available from VizieR can currently be found at http://alasky.ustrasbg.fr/footprints/tables/vizier/. You can search for VizieR table identifiers from the VizieR web page (http://vizier.u-strasbg.fr/); note you
must use the table identifier (like "V/139/sdss9") and not the catalogue identifier (like "V/139").
inMoc( mocLocation, ra, dec )
Indicates whether a given sky position falls strictly within a given MOC (Multi-Order Coverage map). If the given mocLocation value
does not represent a MOC (for instance no file exists or the file is not in MOC format) a warning will be issued the first time it's
referenced, and the result will be false.
nearMoc( mocLocation, ra, dec, distanceDeg )
Indicates whether a given sky position either falls within, or is within a certain distance of the edge of, a given MOC (Multi-Order
Coverage map). If the given mocLocation value does not represent a MOC (for instance no file exists or the file is not in MOC format)
a warning will be issued the first time it's referenced, and the result will be false.
B.1.15 CoordsDegrees
Functions for angle transformations and manipulations, with angles generally in degrees. In particular, methods for translating between
degrees and HH:MM:SS.S or DDD:MM:SS.S type sexagesimal representations are provided.
degreesToDms( deg )
Converts an angle in degrees to a formatted degrees:minutes:seconds string. No fractional part of the seconds field is given.
degreesToDms( deg, secFig )
Converts an angle in degrees to a formatted degrees:minutes:seconds string with a given number of decimal places in the seconds
field.
degreesToHms( deg )
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Converts an angle in degrees to a formatted hours:minutes:seconds string. No fractional part of the seconds field is given.
degreesToHms( deg, secFig )
Converts an angle in degrees to a formatted hours:minutes:seconds string with a given number of decimal places in the seconds field.
dmsToDegrees( dms )
Converts a formatted degrees:minutes:seconds string to an angle in degrees. Delimiters may be colon, space, characters dm[s], or
some others. Additional spaces and leading +/- are permitted. The :seconds part is optional.
hmsToDegrees( hms )
Converts a formatted hours:minutes:seconds string to an angle in degrees. Delimiters may be colon, space, characters hm[s], or some
others. Additional spaces and leading +/- are permitted. The :seconds part is optional.
dmsToDegrees( deg, min, sec )
Converts degrees, minutes, seconds to an angle in degrees.
In conversions of this type, one has to be careful to get the sign right in converting angles which are between 0 and -1 degrees. This
routine uses the sign bit of the deg argument, taking care to distinguish between +0 and -0 (their internal representations are different
for floating point values). It is illegal for the min or sec arguments to be negative.
hmsToDegrees( hour, min, sec )
Converts hours, minutes, seconds to an angle in degrees.
In conversions of this type, one has to be careful to get the sign right in converting angles which are between 0 and -1 hours. This
routine uses the sign bit of the hour argument, taking care to distinguish between +0 and -0 (their internal representations are different
for floating point values).
skyDistanceDegrees( ra1, dec1, ra2, dec2 )
Calculates the separation (distance around a great circle) of two points on the sky in degrees.
B.2.1 Browsers
Displays URLs in web browsers.
basicBrowser( url )
Displays a URL in a basic HTML viewer. This is only likely to work for HTML, text or RTF data. The browser can follow hyperlinks
and has simple forward/back buttons, but lacks the sophistication of a proper WWW browser application.
systemBrowser( url )
Attempts to display a URL in the system's default web browser. Exactly what couts as the default web browser is system dependent, as
is whether this function will work properly.
mozilla( url )
Displays a URL in a Mozilla web browser. Probably only works on Unix-like operating systems, and only if Mozilla is already
running.
firefox( url )
Displays a URL in a Firefox web browser. Probably only works on Unix-like operating systems, and only if Firefox is already
running.
netscape( url )
Displays a URL in a Netscape web browser. Probably only works on Unix-like operating systems, and only if Netscape is already
running.
mozalike( cmd, url )
Displays a URL in a web browser from the Mozilla family; it must support flags of the type "-remote openURL(url)". Probably only
works on Unix-like operating systems, and only if the browser is already running.
B.2.2 Mgc
Specialist functions for use with data from the the Millennium Galaxy Survey.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
imageMgc( mgc_id )
Displays the postage stamp FITS image for an MGC object in an image viewer.
MGC_IMAGE_BASE
String prepended to MGC_ID for the FITS image URL.
MGC_IMAGE_TAIL
String appended to MGC_ID for the FITS image URL.
B.2.3 System
Executes commands on the local operating system. These are executed as if typed in from the shell, or command line.
exec( cmd, arg1 )
Executes an operating system command with one argument.
exec( cmd, arg1, arg2 )
Executes an operating system command with two arguments.
exec( cmd, arg1, arg2, arg3 )
Executes an operating system command with three arguments.
exec( line )
Executes a string as an operating system command. Any spaces in the string are taken to delimit words (the first word is the name of
the command).
B.2.4 Sdss
Specialist display functions for use with the Sloane Digital Sky Server.
sdssShowCutout( label, ra, dec, pixels )
Displays a colour cutout image of a specified size from the SDSS around a given sky position. The displayed image is square, a given
number of (0.4arcsec) pixels on each side.
sdssShowCutout( ra, dec, pixels, scale )
Displays a colour cutout image of a specified size from the SDSS around a given sky position with pixels of a given size. Pixels are
square, and their size on the sky is specified by the scale argument. The displayed image has pixels pixels along each side.
sdssShowCutout( ra, dec )
Displays a colour cutout image of a default size from the SDSS around a given sky position. The displayed image is 128 pixels square
- a pixel is 0.4arcsec.
SDSS_DR2_BASE_URL
Base URL for SkyServer JPEG retrieval service, DR2.
SDSS_BASE_URL
Base URL for SkyServer JPEG retrieval service.
B.2.5 SuperCosmos
Specialist display functions for use with the SuperCOSMOS survey. These functions display cutout images from the various archives hosted
at the SuperCOSMOS Sky Surveys (http://www-wfau.roe.ac.uk/sss/). In most cases these cover the whole of the southern sky.
sssShowCutout( ra, dec, pixels )
Displays a cutout image in one of the available bands from the SuperCOSMOS Sky Surveys. The displayed image is square, and
pixels pixels in the X and Y dimensions. Pixels are approximately 0.67 arcsec square. Sky coverage is complete.
sssShowCutout( ra, dec )
Displays a cutout image of default size in one of the available bands from the SuperCOSMOS Sky Surveys. Sky coverage is complete.
sssShowBlue( ra, dec, pixels )
Displays a cutout image of default size from one of the blue-band surveys from SuperCOSMOS. Sky coverage is complete.
sssShowRed( ra, dec, pixels )
Displays a cutout image of default size from one of the red-band surveys from SuperCOSMOS. Sky coverage is complete.
sssShowUkstB( ra, dec, pixels )
Displays a cutout image taken from the SuperCOSMOS Sky Surveys UK Schmidt Telescope Bj-band survey. The displayed image is
square, and pixels pixels in the X and Y dimensions. Pixels are approximately 0.67 arcsec square.
Sky coverage is -90<Dec<+2.5 (degrees).
sssShowUkstR( ra, dec, pixels )
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Displays a cutout image taken from the SuperCOSMOS Sky Surveys UK Schmidt Telescope R-band survey. The displayed image is
square, and pixels pixels in the X and Y dimensions. Pixels are approximately 0.67 arcsec square.
Sky coverage is -90<Dec<+2.5 (degrees).
sssShowUkstI( ra, dec, pixels )
Displays a cutout image taken from the SuperCOSMOS Sky Surveys UK Schmidt Telescope I-band survey. The displayed image is
square, and pixels pixels in the X and Y dimensions. Pixels are approximately 0.67 arcsec square.
Sky coverage is -90<Dec<+2.5 (degrees).
sssShowEsoR( ra, dec, pixels )
Displays a cutout image taken from the SuperCOSMOS Sky Surveys ESO R-band survey. The displayed image is square, and pixels
pixels in the X and Y dimensions. Pixels are approximately 0.67 arcsec square.
Sky coverage is -90<Dec<+2.5 (degrees).
sssShowPossE( ra, dec, pixels )
Displays a cutout image taken from the SuperCOSMOS Sky Surveys Palomar E-band survey. The displayed image is square, and
pixels pixels in the X and Y dimensions. Pixels are approximately 0.67 arcsec square.
Sky coverage is -20.5<Dec<+2.5 (degrees).
SSS_BASE_URL
Base URL for SuperCOSMOS image cutout service.
B.2.6 BasicImageDisplay
Functions for display of graphics-format images in a no-frills viewing window (an ImageWindow). Supported image formats include GIF,
JPEG, PNG and FITS, which may be compressed.
displayBasicImage( label, loc )
Displays the file at a given location as an image in a graphical viewer. label may be any string which identifies the window for
display, so that multiple images may be displayed in different windows without getting in each others' way. loc should be a filename
or URL, pointing to an image in a format that this viewer understands.
B.2.7 TwoQZ
Specialist functions for use with data from the the 2QZ survey. Spectral data are taken directly from the 2QZ web site at
http://www.2dfquasar.org/.
image2QZ( name )
Displays the postage stamp FITS image for a 2QZ object in an image viewer.
jpeg2QZ( name )
Displays the postage stamp JPEG image for a 2QZ object in an external viewer.
get2qzSubdir( name )
Returns the name of the subdirectory (such as "ra03_04") for a given 2QZ object name (ID).
TWOQZ_SPEC_BASE
String prepended to the object NAME for the FITS spectra file URL.
TWOQZ_SPEC_TAIL
String appended to the object NAME for the FITS spectra file URL.
TWOQZ_FITS_IMAGE_BASE
String prepended to the object NAME for the FITS postage stamp URL.
TWOQZ_FITS_IMAGE_TAIL
String appended to the object NAME for the FITS postage stamp URL.
TWOQZ_JPEG_IMAGE_BASE
String prepended to the object NAME for the JPEG postage stamp URL.
TWOQZ_JPEG_IMAGE_TAIL
String appended to the object NAME for the JPEG postage stamp URL.
B.2.8 Image
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Functions for display of images in a window. Supported image formats include GIF, JPEG, PNG and FITS, which may be compressed. The
SoG program (http://www.starlink.ac.uk/sog/) will be used if it is available, otherwise a no-frills image viewer will be used instead.
displayImage( label, location )
Displays the file at the given location in an image viewer.
B.2.9 Output
Functions for simple logging output.
print( str )
Outputs a string value to the user log.
print( num )
Outputs a numeric value to the user log.
B.2.10 Sog
Functions for display of images in external viewer SOG (http://www.starlink.ac.uk/sog/).
sog( label, loc )
Displays the file at a given location as an image in a graphical (SoG) viewer. label may be any string which identifies the window for
display, so that multiple images may be displayed in different windows without getting in each others' way. loc should be a filename
or URL, pointing to an image in a format that SOG understands (this includes FITS, compressed FITS, and NDFs).
C Release Notes
This is TOPCAT, Tool for OPerations on Catalogues And Tables. It is a general purpose viewer and editor for astronomical tabular data.
Author
Mark Taylor (Bristol University)
Email
[email protected]
WWW
http://www.starlink.ac.uk/topcat/
User comments, suggestions, requests and bug reports to the above address are welcomed.
Related software products are
STIL
The Starlink Tables Infrastructure Library, which provides the table handling classes on which TOPCAT is based.
STILTS
The STIL Tool Set, which provides some command-line table manipulation and analysis tools based on STIL. This is a non-GUI
counterpart to TOPCAT, providing many of the same facilities (matching, row selection, format conversion, plotting etc) but in a form
which can be incorporated into scripts, web services, etc.
See the TOPCAT web page, http://www.starlink.ac.uk/topcat/ for the latest news and releases.
C.1 Acknowledgements
TOPCAT was initially (2003-2005) developed under the UK Starlink project (1980-2005, R.I.P.). Since then it has been supported by grant
PP/D002486/1 from the UK's Particle Physics and Astronomy Research Council, the VOTech project (from EU FP6), the AstroGrid project
(from PPARC/STFC), the AIDA project (from EU FP7), grants ST/H008470/1, ST/I00176X/1, ST/J001414/1 and ST/L002388/1 from the
UK's Science and Technology Facilities Council (STFC), the GAVO project (BMBF Bewilligungsnummer 05A08VHA), the European
Space Agency, and the FP7 project GENIUS. All of this support is gratefully acknowledged.
Nearly all of this work has been done in the Astrophysics Group of the School of Physics, in the University of Bristol, UK, although the
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
University of Cambridge and the University of Heidelberg have also been involved.
Inspiration for some of TOPCAT's features has been taken from the following pre-existing tools:
Mirage (Bell labs)
VOPlot (VO-India)
Apart from the excellent Java 2 Standard Edition itself, the following external libraries provide parts of TOPCAT's functionality:
JEL (Konstantin Metlov, GNU) for algebraic expression evaluation
PixTools (Nikolay Kuropatkin, Fermilab EAG) for HEALPix-based celestial sphere row matching
IVOARegistry (NVO) for ADQL/X->S translations in registry searches
HTM (Sloan Digital Sky Survey) for HTM-based celestial sphere row matching (now deprecated within TOPCAT)
Ptplot (Ptolemy) for some 2D axis plotting
iText for PDF output
EPSGraphics2D (Jibble) for encapsulated postscript output
GifEncoder (Acme) for GIF output
IVOA FITS Package (Sloan Digital Sky Survey) for simple (non-SoG) display of FITS images
ADQL (Grgory Mantelet, CDS) for ADQL parsing
MOC (CDS) Multi-Order Coverage HEALPix maps for footprint manipulation
nom.tam.fits (NASA) for parts of FITS I/O
Skyview in a Jar (NASA) for sky axis drawing
JLaTeXMath (Scilab) for LaTeX typesetting in plots
JIDE Common Layer (Jidesoft) for double-ended slider controls
BrowserLauncher2 for launching default web browser
Contributed code from the following people is gratefully acknowledged:
Thomas Boch (CDS), for the VizieR load dialogue.
Gerard Lemson (MPE, Garching) for the GAVO load dialogue.
Marco Molinaro (INAF-OATS) for the BaSTI load dialogue.
The TOPCAT logo in use since version 4 was kindly drawn by Phil Hall.
TOPCAT has benefitted from, and is largely shaped by, advice, comments and feedback from very many users, testers and developers. Some
of the notable contributers are these:
Alasdair Allan (Starlink, Exeter)
Mark Allen (CDS)
Heinz Andernach (Guanajuato)
Thomas Boch (CDS)
Laurent Bourges (JMMC)
Danny Boxhoorn (Kapteyn, Groningen)
Baptiste Cecconi (LESIA)
Igor Chilingarian (CfA)
Malcolm Currie (Starlink, RAL)
Clive Davenhall (Royal Observatory Edinburgh)
Luke Davies (Bristol)
Christoph Deil (MPI Heidelberg)
Markus Demleitner (ARI Heidelberg)
Sebastien Derriere (CDS)
Peter Draper (Starlink, Durham)
Pierre Fernique (CDS)
Shashikiran Ganesh (PRL, India)
David Giaretta (Starlink, RAL)
Eduardo Gonzalez-Solares (IoA)
Norman Gray (Starlink, Glasgow)
Phil Hall (Son of Ken)
Haggis Harris (Bath)
Evanthia Hatziminaoglou (ESO)
Avon Huxor (Bristol/ARI)
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
11/18/14, 17:34
11/18/14, 17:34
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
11/18/14, 17:34
More information is available in added columns after the match; as well as the match score, information about matched
groups is inserted where appropriate.
The "Spherical Polar" match algorithm is now rebadged as the hopefully less confusing "Sky 3d".
Similar changes for 1-table and multi-table matches should follow in future versions.
MySpace Access
MySpace I/O has been re-implemented to use the ACR rather than the (now deprecated) CDK classes it was using before. As
well as probably being more reliable and less likely to break with future changes in MySpace server protocols, this gives the
benefit of single sign on. The effect of this is that you will need to have the AstroGrid desktop running on your machine before
you can access MySpace from TOPCAT.
Algebraic functions
Added Julian Epoch and Besselian Epoch conversion functions to Times class.
Added RANDOM special function.
Miscellaneous
When you select a column in the Columns window, it now scrolls the table in the Data Window so that the selected
column is visible. This is a boon when dealing with tables that have very many columns.
String "null" interpreted as a blank value in ASCII tables.
Added new activation action to launch system default browser.
Bugfixes
Fixed some relatively harmless bugs to do with actions available when you select the dummy "Index" column. You can
now unsort from a popup menu in the table viewer window.
Believed to work fine with Java 1.5 now (there were previously some issues with MySpace at Java 1.5).
Fixed bug in ASCII input handler which misidentified blank lines, or DOS-format line ends, as end of file.
Version 1.7-1 (4 October 2005)
Bugfixes:
Fixed broken MySpace access on MS Windows.
Version 1.8 (13 October 2005)
Added Sky Coordinates Window; it's now easy to add new sky coordinate columns based on old ones in different coordinate
systems.
roundDecimal and formatDecimal functions introduced for more control over visual appearance of numeric values.
Now copes with 'K'-format FITS binary table columns (64-bit integers).
Modifications to JNLP files.
Version 2.0 (3 February 2006)
A major upgrade of TOPCAT's visualisation capabilities has taken place in this release. There are considerable improvements in
functionality, flexibility and efficiency over previous versions:
New graphics windows
In addition to the 2-d scatter plot from previous versions, the following visualisation windows are now available:
Histogram (1-d)
3-d Cartesian scatter plot
3-d Spherical scatter plot (with optional radial dimension)
2-d Density map (2-d histogram)
The new 3-d functionality does not require you to install Java3D or any other third-party 3D toolkit to work (nor does it take
advantage of any such toolkit which may be present).
Multi-dataset/multi-table plotting
The plot windows are no longer associated with a single table. All of them allow you to display data from different tables, or
from different tuples of columns of the same table, on the same plot. You can layer as many plots as you like on the same axes,
using different plotting styles for the different datasets. As before, you can still display data from different subsets of the same
table and same columns using different styles.
Plotting Styles
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
All the graphics windows allow you to set the plotting style for each data set individually, using a wide range of options
including colour, line width, marker size, (histogram) bar style, etc. This allows you considerable control over the visual details
of the plots.
Transparent markers
All the 2-d and 3-d scatter plots allow you to render points using markers of variable transparency. In a crowded plot, this allows
you to see much more information than using opaque points, since you can get some idea of how many points (of different data
sets) have been drawn at a given point on the plotting surface.
Line drawing & linear correlation
The 2-d scatter plot can now optionally plot lines associated with data sets. It can either draw straight line segments joining all
the plotted points in a set, or draw per-dataset linear correlation lines. In the latter case it will report line gradient, intercept and
correlation coefficient.
Improved column selection
The selector boxes for selecting which columns to plot are now 'editable' - that is, instead of selecting the column from a drop
down list it is now also possible to type an expression into them instead. This may be more convenient if there is a very long list
of columns. It also means that you can use an algebraic expression based on the names of one or more columns instead of a
simple column name. The selectors also have small arrow boxes next to them which makes it easy to cycle through the list of
known columns. These features are also available at some other places in the program where a column value is required.
Manual axis configuration
As well as zooming in and out using the mouse, you can now set the axis limits by typing them into an axis dialogue box. You
can also set the text which will form the axis annotation on the plot.
Status line
Most plots now feature a panel at the bottom of the window indicating how many points have been plotted and the current
position of the mouse pointer (if any) on the plotting surface.
Performance
Scatter plots of large datasets now use considerably less memory and around an order of magnitude less CPU time than
previously (a 2-d million point replot now takes about 1 second - plotting it the first time may be rather longer since it needs to
acquire the data which may be I/O intensive).
Some non graphics-related improvements have also been made as follows:
Selection of a subset in the Control Window now triggers its selection in other windows (plot, statistics, subsets). The same
thing doesn't happen the other way around, since that might lead to confusing consequences.
Boolean columns now display null values distinctly from false ones. Additionally, null/false distinctions are handled more
carefully in FITS and VOTable files.
The Sky Coordinates Window now suggests names for new columns.
The Filestore Browser now allows you to enter the position in a file of the table to load (e.g. HDU index for FITS or TABLE
index for VOTable).
Added Hide All & Reveal All actions to the Columns window.
When joining tables, column name comparison to determine whether deduplication is required is now case-insensitive.
Fixed a problem which was causing TOPCAT to crash when attempting to save an altered copy of a FITS file under the same
name.
The manual has been reorganised somewhat, and a new Quick Start section added.
There is an experimental implementation of the Aladin interoperability interface. This hasn't really been tested however, so may
not work. Improved Aladin interoperability is expected in future releases.
Fixed a bug in Cartesian crossmatching algorithms which failed to match if the required error in any dimension was zero.
Version 2.1 (7 April 2006)
A number of graphical and other improvements have been made at this release.
Stacked Line Plot
A new Stacked Line Plot visualisation window has been added. This is especially suitable for use with time series data.
Asynchronous data reading in graphics windows
All the graphics windows now read data for plotting asynchronously. What this means is that when you change the plot in a way
which requires the data to be read or re-read then the GUI will not lock up and you can do other things, including changing the
plot in other ways before it has completed drawing. A progress bar at the bottom of the window indicates progress. This is only
noticeable for large (slow to read) files.
Axis Zooming
The existing Histogram, 2-D Scatter Plot and Density Map windows, as well as the new Stacked Line Plot, now allow you to do
a 1-d zoom by dragging the mouse near the axis, as well as the 2-d zoom by dragging on the plot surface.
PLASTIC Tool Interoperability
TOPCAT now sends and services messages using the PLatform for AStronomical Tool InterConnection protocol. See Section 9.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
11/18/14, 17:34
11/18/14, 17:34
Fixed bug in coordinate conversion that caused bad behaviour in the presence of malformed input coords.
Fixed bug with plotting very large or very small axis labels in 3-d plots.
Fixed a couple of minor crossmatching bugs (which would not have affected results).
Version 2.3-1 (Starlink Hokulei release)
Output to MySpace can now be streamed, if running under J2SE1.5 or later.
Intercept OutOfMemoryErrors during 3D plotting to give an explanatory popup.
Fixed bug in axis range checking.
Fixed bug in handling of single quotes in FITS file metadata.
Concatenation column assignments now smarter for fully compatible input tables.
Some optimisations for very large files.
Added Vega<->AB magnitude conversion constants to Fluxes functions.
Encapsulated PostScript exported from graphics windows is improved. These files should now print when sent directly to a
printer, and the image size is now guaranteed sensible for a portrait A4/letter page.
Added hyperbolic trig functions (sinh, cosh, tanh and inverses) Maths class (sinh, cosh, tanh and inverses).
Added cosmology distance calculations in class Distances.
Graphics upgrades
Column selector panels in graphics windows are now in scrollers.
Version 3.0 (5 July 2007)
This release includes major visualisation improvements and some changes to the plotting user interface:
Error bars
Comprehensive plotting of symmetric and asymmetric error bars (and crosshairs, and boxes, and ellipses, ...) in 1, 2 and 3
dimensional plots is now provided -- see Appendix A.5.1.3.
Auxiliary (colour) axes
It is now possible to modify the colour of plotted points according to values in one or more axes additional to the spatial ones -see Appendix A.5.1.5.
Histogram Weighting
The Histogram and Density Map windows now have the option of weighting the quantity represented, so that the binned values
are sums rather than just counts.
Density Map Colour Scale
When the density map is in indexed (non-RGB) mode you can now select from various colour maps to represent bin occupancy.
This makes level differences easier to see.
Plot window rearrangement
Buttons which affect data selection are now arranged in their own toolbar below the plot (Appendix A.5.1.1). The size of the
plot control area can be manually resized to give more room for the plot itself by using the Split Window (
) button, which is
useful on small screens.
Expression language enhancements
Table parameters can now be referenced in expressions using param$ notation (Section 7.3), and both columns and parameters
can be referenced by UCD using ucd$ notation (Section 7.1).
Statistics & Histogram result re-use
The Statistics and Histogram windows now both provide Save and Import actions, which take the data presented in the window
and allow it to be saved to a file or imported directly into TOPCAT as a new table.
Cartesian 3D zoom
It is now possible to zoom the 3D Plot towards the centre in the same way as the Spherical Plot.
GAVO Millennium simulation database load dialogue
You can now directly query the GAVO Millennium database service (Appendix A.6.10). Thanks to Gerard Lemson of GAVO
for contributing code for this.
Row subset improvements
Row Subset names can now be re-used, and when you are asked to select a new subset name you are allowed to choose one
from the list of existing ones. When a row selection is received from another application via PLASTIC the subset name (the
name of the sending application) is re-used in this way. This helps to keep the number of subsets under control.
Receving a row subset from PLASTIC in this way, and certain other actions, now cause the subset to be shown straight away
(and updated if necessary) on any existing plots, which makes this kind of PLASTIC interaction more responsive.
The size of each subset, and also the corresponding percentage of the table it represents, is now calculated automatically and
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
displayed in the Subset Window. The old behaviour of only calculating sizes on request can be reinstated using the Autocount
rows (
) menu item if required.
Fix Vertical in 3D plots
A Stay Upright (
) button is provided in the Cartesian and spherical 3D plots which allow you to keep the Z axis/north pole
) button to assign a
) button in the
11/18/14, 17:34
) to Histogram Window.
In overplots using different tables, an attempt is now made to use the same columns/expressions for axis values as for the
main table. This may be convenient when overplotting data from several similar tables.
FITS files with columns using variable-length arrays ('P' or 'Q' data type descriptors) can now be read (in random access
mode, i.e. from an uncompressed FITS file on disk, only).
The lut.files system property can now be used to configure custom colour maps for auxiliary axes and density maps - see
Section 10.2.3.
New class Arrays added to algebraic functions.
Histogram Offset control now works for logarithmic X scale as well as linear.
Bug fixes and other changes:
Efficiency improvements (~25%? in both CPU time and memory usage) for HEALPix-based sky crossmatching. Thanks
to Nikolay Kouropatkine at Fermilab for a new version of the PixTools library which provided this improvement (this
version also fixed a - minor? - HEALPix bug).
Sexagesimal field identification for ASCII input files has become more forgiving; it now accepts minutes or seconds equal
to 60 without a syntax error.
Fixed a pair matching performance bug (slower if tables were not given in the right order) introduced at v1.4.
The -disk flag is now honoured when loading tables from JDBC, which makes it possible to input larger datasets from
RDBMS.
Fixed problem which caused the graphics system to hang or fail when drawing Dot-to-dot lines in 2D plot for points a
very long way off the screen.
Fixed bug which caused incorrect plotting of cumulative histograms with small weights.
Slight modification to spike-style bar drawing in Histogram, now has tidier appearance when using dashed lines.
Internal
There has been extensive internal reorgamisation of the plotting classes. There should be no user-visible effects of this, but
please report anything which seems to be misbehaving.
Version 3.4 (23 December 2008)
SAMP
TOPCAT now uses SAMP as a (preferred) alternative to PLASTIC for inter-tool interoperability. SAMP is now usually the
default; the old behaviour can be recovered using the -plastic command-line flag. Although much of the messaging behaviour
remains the same, various improvements to the GUI accompany this change:
New SAMP Panel at the bottom of the Control Window summarising status
New SAMP Status (
) toolbar button in Control Window, which pops up new SAMP Window
Other slight rerrangements of toolbar buttons and menu items in Control Window
Broadcast Row checkbox added near Activation Action in Control Window
For more discussion see Section 9.
Registry Access
TOPCAT's registry access has finally been updated to use VOResource 1.03 and the Registry Interface 1.01 (it was previously
using very out of date protocols). This means that the Cone Search dialogue (as well as the semi-supported SIAP and Registry
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
dialogues) will now pick up a much more up to date set of services. Additionally, you can choose your own registry service, and
the registry searches in those dialogues now feature keyword searches rather than picking up all known cone/SIAP services. See
Appendix A.9.2.
Other enhancements
Table columns and parameters can now be referenced by Utype using utype$ syntax in a similar way to using UCDs - see
Section 7.1.
When a new subset is created by whatever method, the user can now elect to transmit it to other applications using
SAMP/PLASTIC as an alternative to adding a new subset to the table's subset list.
Add items to Help menu for viewing help in the default web browser rather than TOPCAT's help browser.
Add a plot output format option to write gzipped PostScript.
-version command line flag now reports subversion revision as well as symbolic version number.
Bugfixes
Fixed histogram bug (blank plot) for small values when using logarithmic Y axis.
Fix stacktrace error in 3D plots when no data is available.
The SIMBAD name resolver is fixed in the cone search window (it was using a no-longer-supported service format).
Version 3.4-1 (27 March 2009)
Note Sybase ASE works (documentation edit only)
Fixed bug which caused SIAP queries to fail every time.
SIAP load dialogue now has name resolution capability.
Added SSAP load dialogue. Basic functionality only.
Added documentation for previously-unadvertised SIAP/SSAP load dialogues.
Fixed bug which caused registry queries (Cone, SIA, SSA) to fail for Java 1.6.
Fixed bug which caused blank Contact field in registry query results.
Can now query registry for more registry services.
Fits BINTABLE TZERO/TSCAL value reading improvements:
Columns with integer TZERO values now read as integers rather than floating point values where possible. This includes
unsigned longs ('K'), which were previously represented as doubles with lost precision. Unsigned longs which are too
large however (>263) are read as nulls.
Byte-valued columns can now be written out by fits-basic output handler as signed byte values
(TFORM=B,TZERO=-128) rather than signed shorts (TFORM=I).
More comprehensive testing.
Fixed bug in calculating value scaled double ('D') values.
Fixed bug in typing value for scaled float ('E') arrays.
Added column selector documentation Appendix A.1.4.
Fix bug when decoding file:-type URLs containing %xx escapes.
Fix error reporting bug in registry search.
Report application name and version in User-Agent header of outgoing HTTP requests.
Provide aliases -sia and -ssa for -siap and -ssap command line flags.
Fix SIA and SSA queries to avoid exponential notation in parameters; there is currently no standard concerning numeric
representations, but this avoids problems with some servers.
The fixed length Substring Array Convention for string arrays (TFORMnn=rAw) is now understood for FITS binary tables.
Fixed -noserv flag.
Fixed so that attempting to run services under unfavourable firewall conditions does not cause startup to hang.
Minor SAMP bugs fixed (JSAMP upgraded to 0.3-1).
Version 3.4-2 (17 July 2009)
Plot windows now allow a plot title to be set from the Configure Axes and Title window (Appendix A.5.1.2).
Loading message now displayed in control window table list when table is being loaded from PLASTIC or SAMP, or during
startup.
Incoming and outgoing SAMP load.table messages now use the name parameter, which gives a better chance of a useful
human-readable name being attached to transmitted tables.
Sexagesimal delimiters can now be spaces as alternative to colons in Cone/SSA/SIA load dialogues.
GAVO load dialogue updated in line with modified database service.
Work around J2SE mark/reset bug when loading table direct from URL.
Produce null rather than nonsense results from sky coordinate conversions with unphysical latitudes.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Produce null rather than questionable results from sexagesimal conversions with mins/secs out of range.
Startup script improved to provide some cosmetic improvements for Mac users: the TOPCAT icon is shown in the dock rather
than the generic Java icon, and the menu application name is set to "TOPCAT" rather than the classname. Note these don't take
effect if running directly using java -jar.
STILTS run using topcat -stilts from standalone jar can now correctly report starjava revision.
Version 3.4-3 (31 July 2009)
Fixed two bugs related to drag and drop: intermittent failure of drop (Mac only?), and application crash when making a drop
that fails.
Version 3.5 (6 November 2009)
There are several improvements in this version, many of them to do with improved functionality and usability for loading or acquiring
data both from local files and from various Virtual Observatory services.
Multiple-table load
TOPCAT will now load multiple tables from a single file if multiple tables are present, rather than just the first one. This applies
to multi-extension FITS files which contain more than one table HDU, and to VOTable documents which contain more than one
TABLE element. It affects the Filestore dialogue, naming files on the command line, and the new VizieR load dialogue.
In previous versions, when you selected a multi-extension FITS file or VOTable from one of the load dialogues or on the
command line, only the first table contained in it would be loaded, and any others were silently ignored. Such files often only
contain a single table, but not always. Now, if multiple tables are present in the container file, each one will appear as a new
table in the tables list. Other table file formats are not currently affected, since there is no mechanism for storing multiple tables
in, say, a CSV file.
Multiple Cone, SIA and SSA searches
In previous versions, it was possible to use the Virtual Observatory Cone Search, Simple Image Access and Simple Spectral
Access services to locate catalogue records, images and spectra respectively in a single (cone-shaped) region of the sky, with
position and radius entered manually. In this version it is possible to execute such a query for each row of an input table, with
position and radius obtained from table data in appropriate columns. This effectively gives a join between a local table and a
remote one exposed by a cone-like searchable VO interface.
VizieR load dialogue
A new VizieR load dialogue has been introduced to make queries directly to CDS's VizieR service. Thanks to Thomas Boch for
contributing code for this.
VO menu
A new menu labelled VO (for Virtual Observatory) has been added to the Control Window. This currently contains single and
multiple Cone, SIA and SSA queries and the service specific load dialogues, namely the VizieR and Millennium ones. All these
features are also available elsewhere in the GUI, but the new menu groups together VO-related functionality for convenience.
Positional search dialogue enhancements
A number of improvements have been made to the Cone Search, SIA and SSA dialogues; these applies both to the old singleregion search dialogues and the new multi-region searches.
The service URL can now be entered (e.g. cut'n'pasted) directly as an alternative to obtaining it from a registry search.
This allows use of unregistered services, as well as making it easy to select the service URL for pasting elsewhere.
The resource table returned from the registry search can now be sorted by column contents, by clicking on the selected
column header.
While searching the registry, some indication of the number of services found so far is displayed.
Searching the registry is less likely to result in an out of memory error.
The (not very useful, and potentially confusing) registry Update button has been withdrawn; its function is now available
only from the Registry menu instead.
The metadata contained in tables returned from a successful search is improved.
The SIA and SSA dialogues now have a selector for choosing the desired image/spectrum format.
The SIA and SSA dialogues now longer require explicit entry of a size parameter (these protocols define default behaviour
for when no non-zero size has been specified).
The SIA and SSA now automatically query the registry for all appropriate services when first displayed. This is sensible
behaviour at the moment, since there is at time of writing a reasonable number of them. A directed search may be given
instead at the user's option.
The Cone Search window provides better instructions on use when first displayed.
A new section Section 6 has been added to the manual providing an introduction to the concepts of VO data access, and a new
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
apendix section Appendix A.9 describes the various single- and multiple-query windows.
Storage Policy change
The way that TOPCAT stores large tables has changed. In previous versions, table data was held in memory (the default Storage
Policy was "memory")) unless the -disk flag was specified (to use the "disk" storage policy), in which case it was stored in
temporary disk files. If you didn't put -disk on the command line, it was common to run out of memory when working with
large tables.
Now, the default storage policy is "adaptive". This means that relatively small tables are held in memory, and larger ones are
stored in temporary files. The effect should be that most of the time, you don't need to specify any special options, and you can
work with small or large tables without running out of memory. Using -disk is still permissible, and may help in unusual
circumstances. Running out of memory is still a possibility, but should be much less common.
The old behaviour can be restored by using the new -memory command-line flag.
The only differences you notice from this change should be good ones, however it is slightly experimental. Please contact the
author if you suspect it has introduced any problems.
SAMP-related enhancements
Spectrum Display activation action now uses SAMP or PLASTIC to display in a suitably compliant external spectrum
viewer. The old behaviour was to display the spectrum in an internal SPLAT window, but it didn't work very well.
The JSAMP library has been upgraded to v1.0, giving some SAMP behaviour changes, enhancements and bugfixes.
Control of things like TOPCAT server port and server endpoint hostname are now configurable using jsamp.* system
properties.
The -jsamp command-line flag has been added for convenience so that the TOPCAT jar file can be used easily as a
JSAMP toolkit.
VOTable-related enhancements
Namespacing of VOTable documents made more intelligent, and configurable using the votable.namespacing system
property.
VOTable 1.2 supported.
The VOTable 1.2 xtype attribute is now used to try to identify columns containing ISO-8601 format dates, which allows
them to be treated as numeric values for plotting etc.
As described above, when loading a VOTable document which contains multiple TABLE elements, all the contained
TABLEs are now separately loaded into TOPCAT rather than just the first one, which is what used to happen.
Loading changes
The Load Window now has toolbar buttons as well as items in the DataSources menu for more convenient access to the
various load dialogues.
The command-line flags corresponding to load dialogues (-tree, -file, -sql, -cone, -gavo, -registry, -sia, -ssa)
have been withdrawn from use; they were probably not widely used, and are of minimal usefulness with the new load
window toolbar buttons.
While a table is loading an entry is now visible in the Control Window table list. Previously it was not always clear
whether a slow load was in progress or not.
Bugfixes and minor enhancements
There are improvements (and possibly new problems) in the loading dialogue framework. One item is that a failed load
less often closes the dialogue.
HTML table output is now HTML 4.01 by default (includes THEAD and TBODY tags).
There is a workaround for illegally truncated type declarations in IPAC tables.
XML, including VOTable, output is handled more carefully; fix VOTable output encoding to be UTF-8, and ensure no
illegal XML characters are written.
Fixed plotting bugs - caused intermittent GUI corruption (e.g. missing toolbar buttons), especially on MacOS.
Bug fixed in crossmatching output: entries which should have been null were sometimes written as non-null (typically
large negative numbers) in FITS and in non-TABLEDATA VOTable output. This affected cells in otherwise non-nullable
columns where the entire row was absent. The previous behaviour is not likely to have been mistaken for genuine results.
parse* string->numeric conversion functions now cope with leading or trailing whitespace.
The list of example queries in the GAVO load dialogue has been extended to match those in its web interface.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Fixed an obscure bug which could under rare circumstances cause truncation of strings with leading/trailing whitespace
read from text-format files.
Version 3.5-1 (21 December 2009)
This version has one significant new feature:
Plot windows can now export to PDF as well as other formats.
Other than that, is is mostly performance and usability enhancements and bugfixes:
Fixed a bug which caused an error when attempting to load multiple files from the command line.
Improve documentation of 3D windows, including zoom options.
Fixed a bug which caused an error when attempting to do cone/SIA/SSA search from directly supplied service URL.
Improve error reporting from multi-cone (etc) window.
You can now cut and paste from the linear correlation coefficient display in the 2-d plot style editor.
Faster display of load window and VO menu options.
Fixed internationalisation bug which could cause cone searches etc to fail in locales that use "," for a decimal point.
Registry searches are now faster and less likely to run out of memory. Registry-search-based operations (cone search dialogues
etc) now run in topcat-lite configuration as well as topcat-full.
Now warns about non-active resources returned from registry searches (which shouldn't happen).
Improved helpfulness of error messages in multi-cone etc windows.
Performance improvements when loading from VOTable documents which contain many small tables, both in general and in the
special case of SIA/SSA results. This makes a big difference in some cases.
Version 3.5-2 (24 March 2010)
Add memory monitor indicator in control window.
Considerable performance and scalability improvements to the crossmatching algorithms. For several common regimes, using
default settings, memory use has been decreased by a factor of about 5, and CPU time reduced by a factor of about 3.
Add optional tuning controls (Tuning Parameters and Full Profiling) to the crossmatching windows. Experimentation with
these can lead to significant performance improvements for given matches.
Fixed a crossmatch bug; it was giving a possibility of suboptimal "Best Match Only" match assignments when pair matching in
crowded fields. Crossmatch results thus may differ between earlier versions and this one. Both are reasonable, but the newer
behaviour is more correct. In non-crowded fields, there should be no change.
Add new functions to Arrays: array functions for constructing arrays, and new aggregating functions median and quantile.
Added Verbosity selector in multi-cone window.
Improved logging of registry searches.
Adjusted the way that data types are read from JDBC databases. Date, Time and Timestamp type columns will now be
converted to Strings which means they can be written to most output formats (previously they were omitted from output tables).
Match Window documentation extended and somewhat reorganised (they now have their own appendix subsection).
MacOS icons improved: thanks to Simon Murphy (ANU) for this contribution.
Memory management adjusted further - default (Adaptive) storage policy now uses direct allocation (=malloc()) for
intermediate-sized buffers to avoid running out of java heap space.
Further performance improvement for VOTable documents with very many TABLEs.
Fix bug in code for handling very large mapped FITS files. This was causing fatal read errors in some cases.
Fix issue when sending some SAMP messages (unhelpful reuse of message tags).
Fixed minor error when a directory in the file browser got deleted while visible.
Fix minor scrolling bug in table and column windows.
Fix histogram save/export bug: the exported table now has the same X bounds as the currently displayed histogram.
Withdraw embedded SPLAT application. SPLAT could previously be used in some circumstances for in-JVM display of spectra,
but this facility didn't work well and was presumably little used. You can still view spectra by configuring an Activation Action
to talk to an external spectrum viewer (SPLAT or some other choice) via SAMP or PLASTIC.
Withdraw SOAP server functionality. This has been deprecated since v2.1. External control is better handled using SAMP (or
PLASTIC). If anybody misses this functionality, get in touch and I will consider a similar but less SOAPy alternative.
Version 3.6 (6 August 2010)
This version contains some new features and usability enhancements, and a number of bugfixes.
Load/Save Dialogue improvements:
There is a new System Browser option when loading and saving. This does essentially same job as the old Filestore
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Browser (still available), selecting a file to load or save, but it uses the system-default GUI to do it. For Mac and
Windows users, this may present a more familiar and functional interface to the file system (for Linux users, it is probably
not an improvement). Both options are available, so you can choose whichever you prefer.
You can now save multiple tables at once. The Save Window now offers three ways of saving: Current Table, Multiple
Tables and Session. Current Table saves the current Apparent Table as before. Multiple Table saves some or all of the
loaded Apparent Tables to a container file (typically Multi-Extension FITS or multi-TABLE VOTable). Session saves
some or all tables as well, but additionally saves many aspects of the TOPCAT state, such as table subsets, sort order,
hidden columns etc.
Other significant enhancements:
Finally - you can delete and rename row subsets in the Subset Window! Apologies to those who've been asking that this
has taken so long to implement.
There are new actions in the Control Window File menu to change the order of loaded tables in the table list (move them
up and down). You can use ALT-up/down keys to do the same thing. This may be useful in conjunction with the new
session/multi-table save facility.
Utype metadata items are now visible in the Parameter and Column windows.
The JSAMP library has been upgraded to version 1.1. This means that the hub will appear in the "System Tray" where
possible (when using java 1.6+, and when using a suitable display manager). It also recognises the SAMP_HUB
environment variable for non-standard hub locations.
There are a couple of improvements in the VizieR load dialogue: it has options to display sub-tables within catalogues and
to include or exclude obsolete catalogues.
Minor enhancements:
The current table can now be discarded by hitting the Delete key in the Control Window table list.
SDSS image cutout downloads updated to DR7 (was DR4).
The unofficial column type "long" is recognised in IPAC format tables.
An efficiency warning is now issued for large compressed FITS files.
Format row counts are displayed with group separators (e.g. thousands separated by commas) in some places for better
readability.
Fixes for bugs and misfeatures:
Table parameter values in algebraic expressions now evaluate to their current value, rather than the value when the
expression was entered.
Tables in TOPCAT now have private copies of column and table metadata. This means that changing a column name or
parameter in one table will not affect other tables. It should also prevent a related bug that allowed the column headings in
the table browser to get out of step with those in the columns window and elsewhere.
Receipt of a SAMP table.highlight.row message will no longer cause a similar message to be sent back (and similarly
for the PLASTIC ivo://votech.org/votable/highlightObject message). The previous behaviour was an unwanted
implementation side effect which could sometimes cause problems in interaction with other tools.
Fixed bug in FITS-plus metadata output (table parameters were getting lost).
Better behaviour (warn + failover) when attempting to read large files on 32-bit OS or JVM.
Corrected literature references in Fluxes conversion class documentation (thanks to Mattia Vaccari).
Fix memory usage issues (unnecessarily large output graphics files, possible out of memory errors) for density plots with
large pixel sizes.
Fixed bug in CSV file parsing that could ignore header row in absence of non-numeric columns.
Fix some minor bugs with Cancel operation during table save.
Reinstate help buttons from Save Window toolbar (erroneously removed since version 2.0).
Make sure that failed load of table with no rows reports as such rather than failing silently.
Loading tables by typing their name directly in the Load Window now loads multiple tables if present not just the first
one, in common with most of the other load dialogue types.
Upgraded PixTools HEALPix library to 2010/02/09 version. This fixes a bug that could theoretically cause deficient
crossmatch results, though I haven't managed to produce such errors.
Fixed (I hope) "Table no longer loaded" error when sending tables via SAMP.
Finally, from this release TOPCAT requires version 1.5 (a.k.a. 5.0) of the Java J2SE Runtime Environment; it will no longer run on
version 1.4, which is now very old. I don't expect this to cause compatibility issues for anyone, but I'm interested to hear if that's not
the case.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
11/18/14, 17:34
11/18/14, 17:34
changed to make clear that they use radians and not degrees.
The File|Discard Table action in the Control Window can now remove multiple tables at once if more than one is
selected.
ADQL parsing and syntax highligting has been added to the TAP load dialogue, thanks to Grgory Mantelet's ADQL
library.
TAP queries are now synchronous by default (the Synchronous checkbox is now checked by default).
The SQL Query Dialogue (finally) has a multi-line entry field for SQL query text.
Add To Browser button to Help Window - this displays the currently displayed help page in your normal web browser.
New convenience button added to Available Functions window which is a shortcut to display of the expression syntax in
the Help browser.
Other upgrades and enhancements:
JSAMP has been upgraded to version 1.3-1. The main change is that the Web Profile is now enabled by default in the
SAMP hub that TOPCAT launches. There are also more options in the Hub menus, and it will overwrite any moribund
.samp file at startup, which should eliminate annoying persistent "404 No handler for URL" warnings.
Add Delete On Exit checkbox to Running Jobs tab of TAP load dialogue. Jobs are now created by default with Delete On
Exit set true (you can change the default with the Deletion menu).
You can now run JyStilts from the topcat-*.jar jar files in the same way as from stilts.jar.
Add experimental system properties star.basicauth.user and star.basicauth.password.
Added the experimental topcat.exttools system property to allow custom tools to be added to the main toolbar at
runtime.
Improve resilience of multi-cone operation in the presence of unreliable or inconsistent DAL services.
Added new constants to expression language POSITIVE_INFINITY, NEGATIVE_INFINITY and NaN.
Add -running flag which loads tables specified on the command line into a existing instance of TOPCAT if one is already
running.
Add new join function to Arrays class to combine array elements into a string.
TAP load dialogue uses modified upload ID as per most recent TAPRegExt draft. This may cause some TAP services
incorrectly to appear not to support uploads if they have not made a similar update.
Bug fixes:
Improved some issues (reporting wrong row subset counts and membership) related to changing subset definitions.
Fix cone search verbosity parameter so that VERB=3 is not erroneously ignored.
Fix bug introduced at v3.7 related to labelling loaded files (improper handling and propagation of LOAD_SOURCE table
parameter).
A PARAMref element with no referent in a VOTable no longer causes an uncaught NullPointerException.
Fix a small bug related to enabledness of buttons in control window and hub connection.
Work round an obscure java misfeature which could cause the wrong cell to be edited if a sort interrupts an edit.
Version 4.0b (28 March 2013)
TOPCAT version 4 includes a complete rewrite of the plotting (see below for details). The new plotting functionality is however
experimental and changes may be made to the GUI following user feedback. For this reason, the classic plot windows remain
available from their usual toolbar buttons and the new plot windows are currently hidden away in the Graphics menu. The "b"
designation of this version acknowledges the experimental nature of the visualisation changes, but other new features are considered
stable.
Logo:
I finally bid an affectionate farewell to the Top Cat Hannah-Barbera cartoon graphic. Never having had any legal right
whatsoever to use this logo my conscience has eventually got the better of me and TOPCAT now has an excellent new logo
kindly drawn by my friend Phil Hall. It's still a yellow cat.
Plotting:
Four new "Layer plot" windows are available from the Graphics menu: Plane, Sky, Cube and Sphere layer plots. These feature
a new more powerful (and, yes, more complicated) user interface, and are fully documented in Appendix A.4. New functionality
includes:
New Sky Coordinate Plot
Choice of projection: Sin (rotatable), Aitoff, Plate Carre
Data and view sky coordinate systems selected separately: options are equatorial, galactic, supergalactic, ecliptic
Sky coordinate grid labelled and visible at all zooms
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
11/18/14, 17:34
generates a warning, and headers may now use minus signs instead of whitespace.
Fixed SAMP table loads to honour "name" parameter.
PNG graphics output no longer has transparent background.
Upgrade JSAMP library to version 1.3-3.
Work around change in VizieR output so that VizieR catalogue searching works again. This may be a temporary change.
Update URLs for GAVO Millennium database service at request of Gerard Lemson.
Add new class Coverage to the expression language containing MOC-related functions (currently, just inMoc).
Add explanatory section to manual on Multi-Object Matches.
Add -debug flag to manage logging messages better.
Bug fixes:
Fix serious and long-standing bug (bad TZERO header, causes subsequent reads to fail) for FITS output of boolean array
columns.
Fix small but genuine sky matching bug. The effect was that near the poles matches near the specified threshold could be
missed. The bug was in the PixTools library, fixed at the 2012-07-28 release.
Fix bug which failed when attempting to read FITS files with complex array columns (TFORMn=rC/rM).
Fix failure when loading very large sequential tables.
Fixed table concatenation so that column datatype array size etc is consistent with both input tables not just the first one.
Adjust SQL writer to avoid type error for MySQL.
Fix plotting bug that might have caused mysterious failures to update the plot. Or it might not.
Fix ADQL parsing in TAP window so that TAP_UPLOAD tables are treated correctly.
Fix bug which could cause truncation of strings in FITS and possibly VOTable output when tables were hand-edited to
add strings longer than previously-declared length.
Fixed bug in multi-table matches (>2 tables) which could result in output rows with columns from only a single table, i.e.
not representing an inter-table match.
Fix bug in HMS sexagesimal formatting: minus sign was omitted from negative angles. Now the output is forced positive.
Fix minor bug associated with deleting the current row subset (this now causes All to become current).
Cope with 1-column CSV files.
Fix (some, though probably not all) possible bug(s) related to running on Java 1.7 on Mac.
Use the correct form "rows"/"bytes" rather than "row"/"byte" for TAP capability unit values.
Infinite floating point values are now correctly encoded in VOTable output ("+Inf"/"-Inf", not "Infinity"/"-Infinity"
as in previous versions).
Fixed some layout problems which could lead to zero-width text entry fields for RA/Dec.
Fixed bug when attempting to explode a hidden array column.
Fix error bar rendering bug which could result in diagonal lines being offset near the edge of plots.
Fix problem with GUI locking up when plotting outsize histograms.
Fixed bug in stacked line plot which caused scribbly drawing in the presence of null X axis values.
Fixed problem with row highlight messages bouncing for ever between applications when the Transmit Row activation
action is in use.
Improve behaviour when deleting a parameter in the Parameter Window.
Version 4.0-1 (1 July 2013)
New Functionality
Add read-only support for CDF (NASA Common Data Format) files. Currently, no attempt is made to present time-like
values in a human-friendly way, but this may improve in a future release. The SAMP table.load.cdf MType is also
supported for receiving CDF files.
Improve handling of HTTP basic authorization. HTTP 401s now pop up a user/password dialogue window, unless the
star.basicauth.* system properties have been set up.
Add options to calculate the (scaled or unscaled) Median Absolute Deviation in the Statistics window.
Minor enhancements
Now subscribes to SAMP voresource.loadlist.tap MType, accepting resource list in TAP load dialogue "Select
Service" tab.
The Columns window now makes a better attempt at displaying non-standard per-column metadata of unusual types, in
particular array values.
Line plotting improved in layer plots (including better dashing, new antialias option).
Implemented fixes to reduce the chance of users inadvertently overloading external Cone/SIA/SSA services with
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
multicone-like queries. First, fix it so that abandoned queries are properly terminated, rather than continuing to hit the
server until completion or JVM shutdown. Second, implement a sensible default maximum value for the Parallelism field
in the multi-cone (etc) panel (though this may be adjusted with a system property).
Source code is now managed by git and not subversion. The format of the "Starjava revision" string reported by the version flag and the Help|About menu item has changed accordingly.
Bug fixes
Fix CSV regression bug introduced at v4.0b - CSV files now work again with MSDOS-style line breaks.
TAP example queries now quote table and column names where necessary. This fixes a bug that was particularly evident
with the VizieR TAP service for which nearly all table names are not legal ADQL identifiers.
Quoting behaviour has changed when generating SQL to write to RDBMS tables. This ought to reduce problems related
to mixed-case identifiers. However, it is possible that it could lead to unforseen new anomalies.
Fix bug with reading session files containing 1-column tables.
Fixed FITS output bug which could result in badly-formed string-valued header cards (no closing quote).
Turn off layer plot optimisation that could result in lost precision for double values.
Fix layer plot bug that broke the plot if both handles of a range slider were dragged to the same position.
Fixed it so that layer plot axis range settings are reset when the Rescale button is used.
Fixed a bug that caused an exception when a table in a layer plot was deleted from the application.
Fixed a bug when zooming way out from a sky plot.
Version 4.1 (7 March 2014)
In this version, the new plotting windows appear for the first time in the main Control Window toolbar, and are no longer considered
experimental. There have been many changes to their user interface and functionality since the last release. The old plotting windows
are still available from the Control Window Graphics menu, but are now considered somewhat deprecated, and will not be developed
or fixed further.
Navigation changes to the new plotting windows:
In 2d plots, right-button drag (or ctrl-drag) does a 2-d anisotropic zoom - you can stretch or squash the plot in both
directions.
In 3d plots, right-button drag (or ctrl-drag) does a 2-d anisotropic zoom along the 2 axes most face-on.
In 3d plots, middle-button drag (or shift-drag) slides the plot along the 2 axes most face-on.
In 2d plots, the pan/zoom actions (wheel, pan-drag, zoom-drag) can be done outside the plot to affect just one axis.
Most navigation mouse actions now show visual feedback on the screen.
A new tab Navigation is added to the Axis controls. This lets you configure zoom/pan actions, for instance selecting
zoom factor and X/Y/XY zoom options for when mouse wheel is used.
A hints panel is added below the plot showing current mouse navigation actions.
Removed zoom in/out buttons in the toolbar of the layer plot windows; there are better ways to zoom.
Other changes to the new plotting windows:
Histogram plot type added. You can also add histograms to a normal plane plot if you want to.
Layer plot windows now have a progress bar at the bottom for loading data, and optionally for other potentially slow
operations like replotting, identifying a point, turning blob-selected points into a subset etc.
For very large/slow plots, intermediate subsampled plots are optionally displayed while panning/zooming to improve
responsiveness.
Toolbar buttons rearranged; the buttons for adding and removing layer controls are now in the layer control panel not the
main plot window toolbar.
When a pair crossmatch completes successfully, you get the option to plot the results, which shows you exactly how the
located matches relate to the input positions (pairs of points are plotted).
Text label plotting now has crowding configuration options: according to configuration, text labels are only drawn if there
aren't too many close together.
New grid and label colour configuration options for plane and sky plots.
More colour maps added.
Antialiasing option added for grid line and label drawing.
New auto transparency shading mode.
Add some padding around auto-ranged plot limits.
Changing table in a plot now tries to retain the coordinate values if they still make sense.
Axis tick labelling improved, including avoiding overlapping tick labels.
Sky plot re-ranging improved: new data set now re-ranges unless lock button is set.
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
Clip selector added for density and aux colour maps, which means you can now use just part of a colour map, giving you
much more control over colouring.
Sky plot position formatting now honours sexagesimal setting.
Some minor threading/performance improvements.
Experimental time plot type added. This plot type is considered experimental and appears in the Graphics menu but not
currently on the main toolbar. It can plot time series and spectrograms. May be improved in future versions.
The control for plotting pairs of points works differently (now has its own layer control not just a Form). The triple-point
form (which didn't work properly) is withdrawn for now.
Other enhancements:
A new experimental SAMP message table.get.stil is supported, allowing SAMP clients to retrieve tables from
TOPCAT.
URL selector fields in Activation Action window are now editable.
Add cuboid match algorithm to match windows.
The Exact matcher now considers scalar numeric values equal if they have the same numeric value; they are no longer
required to have the same type.
Array-valued per-column metadata items are now displayed properly.
The toString function now works for byte and boolean values as well as other data types.
Replace the (slightly dangerous, also undocumented) Apply Subset option in the table viewer window with a new
Highlight Subset option. Also add a new Highlight Subset option in the Subsets window.
In the old-style histogram plot, exporting it now provides cumulative counts if the visible histogram is currently in
cumulative mode.
Keyboard focus is more helpfully positioned by default in some dialogue windows (it starts off in the first text field).
Bugfixes etc:
Fix a registry access bug related to namespaces. It is now finally possible to query the STSci/NVO/VAO registry, as well
as the AstroGrid and Euro-VO registries, from the Cone/SIA/SSA/TAP VO windows. Queries to the STSci registry have
not been working since mid-2010 as a consequence of bugs in (mostly) the TOPCAT client and (partially) the STSci
registry service.
Work around bug in MacOS text rendering in plots that painted text in the wrong direction when not horizontal (e.g.
letters going backwards when running vertically). The workaround involves defaulting to antialiased text when drawing
axis grids for MacOS. As well as getting the text the right way round this does look a bit nicer, but it is also perceptibly
slower. If speed is more important than correctness you can turn it off using the Antialias checkbox in the Axes-Grid tabs
of the various plot windows.
Withdraw Labels tab in the Sphere plot, since it didn't do anything.
Rename the File menu in most windows to Window, which is much more appropriate.
Fix bug when concatenating tables whose data cells may have been edited by hand.
Fix service selection bug (NullPointerException) in multi-SIA/SSA windows.
Fix bug which prevented access to long integer array elements from expression language.
Fix bug in Statistics window so that Boolean columns correctly report mean values (true/true+false proportion).
Fix TST input handler so TST files with fewer than 3 columns can be read.
Upgrade JSAMP to version 1.3-4 (hub now supports web clients with https URLs).
Moved text documenting table.load.cdf and table.load.stil SAMP MTypes from the transmit section (wrong) to
the receive section (right) of this document.
Minor improvements to CDF support.
Fix some plot threading issues.
The reported point count is improved in plots.
Better handling of OutOfMemoryErrors during plotting.
Better handling of LaTeX errors in axis labelling.
Version 4.2 (4 July 2014)
Significant new functionality and changes:
Add the new CDS X-Match Upload Window. In most cases (matching with a table that can be found in VizieR) this
window can and should be used instead of the old Multi-Cone window - it is much faster. The button for this window
replaces the MultiCone button in the main Control Window toolbar. MultiCone is still available from the VO and Joins
menus, but is now for most purposes deprecated.
Windows with a Registry Query Panel can now talk to the registry using either RI1.0 (the only option in previous
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
versions) or RegTAP. RegTAP is generally much better (faster, less bandwidth, more reliable), and is the default choice,
but a selector allows you to revert to RI1.0 if preferred.
The "frame"-style zooming that was used in old-style plots is now available in the new-style plots - drag the mouse using
the middle button or shift key.
The TAP Window button replaces the Concatenate window button on the toolbar. The Concatenate window is still
available from the Joins menu. This is not new functionality, but the UI change reflects the growing usefulness of TAP
services.
Minor improvements:
Form configuration options are now preserved, rather than reset, when a new table is selected in one of the plot windows.
Registry search panels now display resource count at the bottom of the resource list.
Update the endpoint for the NVO/VAO RI1.0 registry (now deprecated in favour of RegTAP), on advice from Theresa
Dower.
Fixed TAP load dialogue so that by default it stays open after a table is loaded (the Stay Open option is set true by
default).
Improve TAP window Running Jobs display. The Job URL is now always shown even when the other job details scroll off
screen, and the details scroll to the top not the bottom when a job is selected or refreshed.
Upgraded Gregory Mantelet's ADQL library to version 1.2. Better ADQL parsing.
Modify the way antialiasing is controlled in plot windows. The Grid antialiasing option, where present, now just covers
the actual grid lines. Text antialiasing is now selected with a new "Antialias" option in the (now possibly misnamed) "Text
Syntax" item in Font configuration. This now affects the Aux axis and Legend labelling as well as the grid labelling.
Added new graphics output format png-transp to generate PNG files with transparent backgrounds.
Bug fixes:
Set antialiasing on by default for OSX - get it right this time.
Fixed some bugs related to TAP table uploads.
Fix out-by-one error in reporting of Row of min/max values in Statistics window.
Add missing geometric reserved words to ADQL reserved word list. Has a slight effect on ADQL validation in TAP
window.
No longer disable "View URL As ..." options in Activation window when no suitable columns are present.
Fixed bug in which cube plot navigation help button gave you sphere plot help and vice versa.
Version 4.2-1 (13 November 2014)
New functionality:
Add (experimental) read-only support for Gaia/DPAC GBIN format.
Add special variables $ncol and $nrow to the expression language to refer to the column and row counts in the underlying
table. The special variable index is also deprecated in favour of $index or $0.
Support viewing tables up to 231 (2 billion) rows in the table viewer window. The previous limit was 227 (134 million)
rows. This does not necessarily mean that using TOPCAT on Gigarow tables is a good idea!
Minor improvements and bugfixes:
Change the default RegTAP registry endpoint to http://reg.g-vo.org/tap, which should have good reliability, since it
can point to different RegTAP services as required.
Add some more colour maps for aux/density shading.
Fix regression bug (introduced at v4.2) which caused authentication to fail when using the SQL Query load dialogue.
Attempting to write FITS tables with >999 columns now fails with a more helpful error message.
Somewhat improved Unicode handling in VOTables. If you load a VOTable with columns marked
datatype="unicodeChar" and save it again, the columns now remain unicodeChar instead of getting squashed to type
char. Some lurking Unicode-related issues remain.
Fix time plot to work for ISO-8601 times. This change also breaks use of ISO-8601 times in non-time plots, but that didn't
work particularly well before. Please complain if this change of functionality causes a problem.
Fix problem with activation action image viewer selection box.
TOPCAT - Tool for OPerations on Catalogues And Tables
Starlink User Note253
TOPCAT web page: http://www.starlink.ac.uk/topcat/
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html
11/18/14, 17:34
http://www.star.bris.ac.uk/~mbt/topcat/sun253/sun253.html