6 Using SAMP to exchange spectra

SPLAT-VO can communicate with other desktop tools using SAMP3 (Simple Applications Messaging Protocol).

The main job that can be done using SAMP is to exchange spectra. If another tool sends a spectrum to SPLAT-VO, it will appear in the global list as if it had just been loaded. Conversely, SPLAT-VO can send a spectrum to another tool, which will probably respond in a similar way. To send from SPLAT-VO, select a spectrum in the global list, and then use the Broadcast spectrum or Send spectrum to … options in the Interop menu. The Broadcast option sends to all listening tools, while the Send option sends only to a single selected tool; you choose which one from the submenu on the right. Only tools which (claim they) know what to do with spectral data will be listed; if none of the currently-registered tools is prepared to accept spectra, the Send option will be unavailable.

You can also send the results of an SSA query as a table from the Query VO for spectra window. Again, use the Broadcast and Send options from the Interop menu to do this.

The communication architecture of SAMP uses a central “Hub” process to pass messages between registered applications, so a hub must be running in order for the messaging to operate. If a hub is running when SPLAT-VO starts, or if one starts up while SPLAT-VO is in operation, it will connect to it automatically, unless you have started SPLAT-VO with the --interop none command-line option. Other tools 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. A hub can be started from within SPLAT-VO if required. The --hub or --exthub command-line flags start an “internal” or “external” hub respectively; the difference is that an internal hub will terminate when SPLAT-VO exits, while an external one continues running in its own process. Alternatively, a hub can be started from within the GUI.

The SAMP control button is visible in the browser window toolbar. Its appearance changes according to whether SPLAT-VO is currently registered: PIC or unregistered: PIC . In either case, clicking the button will show the SAMP window.


The left hand panel shows which applications are registered, and the right hand panel gives you information about the selected one; it’s not necessary to understand this in detail, though some of the information is self-explanatory. If no applications show up in the list, then SPLAT-VO is not registered, most likely because no hub is running. Clicking on the (Un)Register with Hub button will give you a chance to start one. The other tabs in the window provide information about messages sent to and from SPLAT-VO. They can be useful to see whether spectra which have been sent have arrived safely or not.

For those interested in the technical details, the domain-specific SAMP MTypes which SPLAT-VO knows about are: