MWA ASVO: VO Services

Table Access Protocol (TAP)

The IVOA's table access protocol (TAP) provides tabular metadata to astronomers via a standard interface. The most common use of the TAP service is within a VO client, such as TOPCAT or pyvo. For more background information on the IVOA and using VO protocols, please see IVOA: Information for Astronomers

Using TOPCAT to access the MWA TAP Service

  • Download and install the freely available TOPCAT.
  • Start TOPCAT. On most systems this just involves double clicking the topcate JAR file.
  • Select VOTable Access Protocol (TAP) Query from the main menu.
  • Copy and paste or type the following into TAP URL in the Selected TAP Service section http://vo.mwatelescope.org/mwa_asvo/tap
  • Click Use Service
  • You should now be taken to a new window which contains a list of available tables on the left and an ADQL Text box in the lower section.
  • At this point you can type in ADQL queries and click Run Query to execute and return data.
  • Each time you run a query a new entry will appear in another window TOPCAT creates.
  • You can then view the data returned (use the ViewTable Data menu option) or produce plots, etc via the Graphics menu.
  • This is intended to be a quick start guide for using TOPCAT. It is a very powerful tool and you should review TOPCAT's full documentation to get the most out of it.

Using PyVO to access the MWA TAP Service

PyVO is a library that is affiliated with astropy which allows astronomers to programmatically access VO services via Python. You can access MWA metadata very easily using this method.

  • Install PyVO
  • Then, using import pyvo, you can execute ADQL queries against MWA's TAP service.

Example code:

import pyvo as vo

# Connect to the MWA TAP service
mwa_tap_service = vo.dal.TAPService("http://vo.mwatelescope.org/mwa_asvo/tap")

# Execute a simple query
results = mwa_tap_service.search("SELECT TOP 3 obs_id, obsname FROM mwa.observation WHERE mode = 'HW_LFILES'")

# Print the results to the console
print(results)

Results in:

<Table length=3>
  obs_id        obsname      
  int64         bytes255     
---------- ------------------
1261912984  Cal_PKS2356-61_69
1261913160  Cal_PKS2356-61_93
1261913336  Cal_PKS2356-61_121

Calling PyVO from shell

Here's a handy little snippet that lets you write ADQL queries from your shell

python - <<EoF 
__import__('pyvo').dal.TAPService("http://vo.mwatelescope.org/mwa_asvo/tap").search("""
--- your ADQL query here
SELECT TOP 3 obs_id, obsname 
FROM mwa.observation 
WHERE mode = 'HW_LFILES'
---
""").table.pprint_all()
EoF

Using ADQL to Write TAP Queries

The Astronomical Data Query Language (ADQL) an SQL-like language used by astronomers to interact with TAP services. The full specification is available here: http://www.ivoa.net/documents/ADQL, however if you have a little or no familiarity with SQL you can get started writing queries in ADQL.

Please also see the following excellent resources to help you learn ADQL syntax:

Available MWA TAP Tables

ivoa.obscore

The ivoa.obscore table is a common table implemented by most TAP services to allow TAP client applications access any TAP service in a standard way. Due to the fact it is designed to cover most possible astronomical datasets, obscore provides only limited metadata for MWA observations. However, obscore does provide basic temporal and spatial data for each MWA observation which can be useful for cross-matching with other datasets. For more MWA-specific metadata, please see the tables in the "mwa" schema (below).

Quick example:

-- 
-- Find a specific observation, by obs_id
--
SELECT *
FROM ivoa.obscore
WHERE obs_id = 1222441344

See Also:

mwa.observation

This is a custom table which stores one record per MWA observation. An MWA observation can include correlator observations, voltage captures, mode changes, and "no capture" events and can be thought of as a record of the configuration of the telescope the time of the observation.  

Quick example:

--
-- Find observations which are:
-- * Correlator
-- * Taken during June 2014
-- * Taken by the GLEAM project (G0008)
-- * Are good data quality 
--
SELECT *
FROM mwa.observation
WHERE
mode = 'HW_LFILES' 
AND starttime_utc >= '2014-06-01' AND starttime_utc < '2014-07-01'
AND projectid = 'G0008'
AND dataqualityname = 'Good'

See Also:

mwa.obs_data_file

This is a custom table which stores a summary of the size and number of files of each type for an observation. Data files include raw correlator visibilities (aka gpubox files), raw voltages, incoherent sums, flag files, etc. Each data file is related to an MWA observation via the "obs_id" field which is in both the ivoa.obscore and mwa.observation tables.

Quick example:

--
-- Return a summary of all data files from obs_id 1222441344
--
SELECT * 
FROM mwa.obs_data_file
WHERE obs_id = 1222441344

See Also:

mwa.obs_download_history

This is a custom table which stores a row for each known download of an observation.

The records for downloads come from a variety of sources and may not be complete.

Quick example:

--
-- Return a summary of all downloads of obs_id 1222441344
--
SELECT * 
FROM mwa.obs_download_history
WHERE obs_id = 1222441344

See Also:

Simple Cone Search (SCS)

The MWA ASVO also provide an implementation of the simple cone search protocol. This is a quick search tool which will perform a coordindate search based on an RA, Dec and radius and provide a list of observations which match the criteria.

The cone search url is: http://vo.mwatelescope.org/mwa_asvo/scs/obscore/ 

The most common use of the SCS is within a VO client, such as TOPCAT.