Skip to content
Snippets Groups Projects
Title: How to use VO SCS data
Author: Jutta
Topics:
  - summary from open course 
  - https://edu.km3net.de/course/accessing-the-km3net-open-data/

status: dump

Accessing data through the VO server

A short online course has been provided at our Education Portal.

Complying with the standards set by IVOA, the KM3NeT open data are accessible with services defined by the Table Access Protocol (TAP). The services operating under this protocol allow the execution of queries in order to retrieve the data from the database tables as well as to inspect various metadata. The TAP services support SQL commands. It is highly recommended the queries to be written in Astronomical Data Query Language (ADQL). A nice introduction of ADQL used in a TAP service is found here. Another way to retrieve the data is the Simple Cone Search (SCS). This defines queries for sky search in a cone with given position and radius.

The standard Table Access Protocol allows the existance of TAP clients. The most widely used are the Aladin client as well as the TOPCAT client. The TAP clients interoperate and communicate under the Simple Application Messaging Protocol (SAMP). There is also an option to access the data via python scripting. This is possible using the pyVO, a package affiliated with Astropy.

Using VO clients

Information on how to download and install Aladin is found at https://aladin.u-strasbg.fr/java/nph-aladin.pl?frame=downloading.

An introduction on how to use ADQL is found here.

Using the VO python interface

You can find information on how to install Astropy at https://www.astropy.org/ and for the pyVO at https://pyvo.readthedocs.io/en/latest/

import pyvo as vo

service = vo.dal.TAPService("http://vo.km3net.de/__system__/tap/run/tap")

# resultset works like a numpy record array
resultset = service.search("SELECT * FROM ant20_01.main")
print(resultset.fieldnames)
print(resultset)

resultset = service.search("SELECT * FROM ant20_01.main WHERE ABS(decl)<10 AND ABS(ra)<20 AND nhit>90")
print(resultset)

resultset = service.search("SELECT * FROM ant20_01.main WHERE ABS(mjd-57474.8)<1.0")
print(resultset)

An introduction on how to use ADQL is found here