Next Previous Up Contents
Next: SAMP control
Up: Top
Previous: Activation Functions


9 Tool Interoperability

TOPCAT is able to communicate with other tools using one or other of two messaging protocols:

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 expected soon]) table analysis tools (VisIVO, STILTS, other instances of TOPCAT itself), spectrum analysis tools (SPLAT, VOSpec) scripting languages (SAMPy, Perl SAMP) 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 somewhat deprecated in favour of SAMP. At time of writing (December 2008) more tools speak PLASTIC than SAMP, but it is hoped that this will change over the next few months, and that SAMP will come to replace PLASTIC across the astronomical toolbase. 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 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.


Next Previous Up Contents
Next: SAMP control
Up: Top
Previous: Activation Functions

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