1.17. Working with the VO (External Tools)

The Virtual Observatory is a set of technologies allowing, among other things, the integration of different data analysis applications. You can view and manipulate data in one application (such as HIPE), send it to another application with the click of a button, view and manipulate the data there, and send it back to the original application. HIPE supports this using SAMP, Simple Application Message Protocol .

SAMP works using a message hub , a very light-weight piece of software that coordinates data exchange among VO-aware applications.

All ESA archives are VO-aware already, but access to VO-aware archives in HIPE is not available yet. Aladin or VOSpec (please open this link in a new tab or window) already provide an interface to many data sources, such as the ESA archives, including ISO. So it is possible to access the ESA archives by retrieving the data using Aladin and sending it to HIPE from there.

1.17.1. Sending products from HIPE to external tools

To send a data product to a VO-enabled application, follow these steps:

  1. If the application is not one of SAOImage DS9 , Topcat , Aladin or VOSpec , start it manually. If the application is one of those listed, HIPE will start it automatically when sending the data.

    You can start some VO-enabled applications directly from HIPE. Click the External Tools icon in the HIPE Welcome page to display the list. Click an icon to launch the corresponding application.

  2. Select the product in the Variables view.

  3. Do either of the following:

    • From ToolsInteroperabilitySend Data to , select the application to which you want to send your product.

    • Right click on the product in the Variables view and from the Send to menu choose the application to which you want to send your product.

The product appears in the chosen application.

To return the data to HIPE, send them from the other application. Refer to the documentation of the external application for instructions.

Troubleshooting.

  • Data exchange is possible only if there is an overlap between the VO interfaces supported by HIPE and the other application. If the applications have no supported interface in common, no data can be exchanged. This is indicated by the external application name being greyed out in the Send Data to menu.

  • There is no VO protocol to exchange whole data cubes between application. You must instead extract and send single images or spectra.

  • If the application is not listed in the Send Data to menu at all, make sure that the application is connected to SAMP.

  • VOSpec may be listed twice in the menu as VOSpec and VOSpec (2, not supported) . This is due to a bug in version 6.5.p2 of VOSpec. Use the VOSpec entry and ignore the other one.

  • If HIPE cannot find SAOImage DS9 on your system, choose EditPreferences and go to External Tools , where you can specify where the application is installed.

  • HIPE connects to the VO automatically at startup. If the icon at the bottom right corner of HIPE is white ( ) instead of yellow ( ) it means that HIPE has disconnected for some reason. Choose ToolsInteroperabilityConnect to the VO to connect again.

  • When you select an application from the Send Data to menu and that application is downloaded via Java WebStart, you may need to send the data a second time after the application has started.

  • If none of the above points solves your problem, you may have found a bug in the software. Please raise a Helpdesk ticket.

Choosing ToolsInteroperabilitySAMP Hub Status opens the SAMP Hub Monitor:

The SAMP Hub Monitor window.

Figure 1.39. The SAMP Hub Monitor window.


Here you can find information about the client applications connected to the hub and the messages sent and received by each application. You should not have to look at this window other than for debugging purposes.

1.17.2. Sending products from external tools to HIPE

To return the data to HIPE, send them from the other application. Refer to the documentation of the external application for instructions.

Caveats. Sending data from external applications to HIPE has the following limitations:

  • It is not possible to send multiple planes at once from Aladin to HIPE.

  • It is not possible to send HIFI OTF maps back to HIPE from Aladin.

  • When sending a table dataset to Topcat, units are not treated correctly. Degrees and arcminutes are converted to radians, while other units are ignored.

1.17.3. Opening VO Tables from HIPE

You can open VO table data in XML form without resorting to SAMP interoperability. This type of VO Table file is returned from the execution of TAP queries on services like VizieR or Simbad, or using tools like Topcat and Aladin. It can be identified by the root tag <VOTABLE> or the XML declaration <?xml at the beginning of the file. To do that, you make use of the task voToTable. This task takes two parameters, data is the path to the VO table XML file and name is the mandatory name for the output TableDataset. The path parameter can be either an absolute path or relative to HIPE installation and the XML file could even be packaged in a JAR file.

table1 = voToTable(data='votable.xml', name='Dubhe')

Example 1.40. Converting a VO table in XML format to TableDataset.


The output is a regular instance of TableDataset containing all the info from the VO table XML file.

1.17.4. Writing tables to files in VO-table XML format

To write a TableDataset instance to a file in VO-table XML format, there is a task called tableToVo which takes as arguments the file name and the TableDataset to write. You can use the following two examples as reference:

# Taking a dataset from an auxiliary product - happens to be a EventsLogDataset in this case.
obs = getObservation(obsid=1342265972, useHsa=True)
data = obs.refs["auxiliary"].product.refs["EventsLogProduct"].product["16_2"]
from tempfile import NamedTemporaryFile
outfile = NamedTemporaryFile(delete=False)
# The task requires a specific file extension (.xml, .vot or .votable)
outfile.name += ".xml"
tableToVo(file=outfile.name, table=data)

Example 1.41. Writing a TableDataset from an observation to an XML-based VO file.


# Constructing a simple TableDataset from scratch
t = TableDataset()
t["First"] = Column(Double1d(10))
t["Second"] = Column(Double1d(10))
 
from tempfile import NamedTemporaryFile
outfile = NamedTemporaryFile(delete=False)
# The task requires a specific file extension (.xml, .vot or .votable)
outfile.name += ".xml"
tableToVo(file=outfile.name, table=t)

Example 1.42. Writing a synthetic TableDataset to an XML-based VO file.