Archive Catalogues

The ESO Catalogue Facility provides access to the collection of catalogues and data that were produced by PIs of ESO programmes and then integrated into the ESO science archive through the Phase 3 process. The full list of available catalogues could be found here.

To access the data you can use the programmatic access via the tap_cat TAP Service. The module archive_catalogues provides some simple python wrapper around this.

More examples on how to use the TAP services for the ESO archive are provided in these notebooks.

Overview

The module archive_catalogues is based on the query_catalogues.ESOCatalogues class (a child of the query.Query class) that has the following attributes:

  • query – A string that contains the query to be perfomed via the TAP Service tap_cat

  • result_from_query – A table containing the result of the query

  • maxrec – An integer that the define the maximum number of records that will be returned for a query

  • type_of_query – A string that defines if the query will be run synchronously or asynchronously

After defining a query the result_from_query attribute is automatically filled by the method run_query(), for instance:

from ESOAsg.queries import query_catalogues
# define a query to obtain all `table_name` in the ESO Archive
query = 'SELECT schema_name, table_name from TAP_SCHEMA.tables'
# instantiate the class
all_catalogue_query = query_catalogues.ESOCatalogues(query=query)
# run the query
all_catalogue_query.run_query()
# print the result on terminal
all_catalogue_query.result_from_query.pprint()

The module archive_catalogue provides a set of additional quality-of-life functions to circumvent the actual creation of the queries. These allow one to directly obtain the information needed in a table format.

Some examples

Note

The way the queries are created allows one to set as input either collections or tables. However, we strongly discurage to use both at the same times. Given that the connector between the two conditions is an AND this may give rise to an un-expected behaviour

Which catalogues are available

In general, it is possible to explore which catalogue are available in the ESO archive either with the query interface webpage, or with the archive science portal, or by running the TAP query to obtain all versions of all catalogues:

SELECT
    cat_id, collection, table_name, title, number_rows, number_columns,
    version, acknowledgment
FROM
    TAP_SCHEMA.tables
WHERE
    schema_name = 'safcat'

or this one to obtain only the latest version of the catalogues:

SELECT
    t1.cat_id, t1.collection, t1.table_name, t1.title,
    t1.number_rows, t1.number_columns,
    t1.version, t1.acknowledgment
FROM
    tables t1
LEFT OUTER JOIN
    tables t2 ON (t1.title = t2.title AND t1.version < t2.version)
WHERE
   t2.title IS null AND t1.cat_id IS NOT null AND t1.schema_name = 'safcat'

Alternatively, it is possible to obtain an astropy.table containing information on all catalogues and all their versions using (note that the query is more complicated of the ones above because more information are collected):

from ESOAsg import archive_catalogues
archive_catalogues.all_catalogues_info(all_versions=True)

This returns an astropy.table containing:

Column name

Description

collection

Name of the Phase 3 collection the catalogue belongs to

title

Title of the catalogue

version

Version of the catalogue

table_name

The fully qualified table name

filter

Name(s) of the filter bandpasses the original data were aquired with

instrument

Name(s) of the instrument(s) the original data were acquired with

telescope

Name(s) of the telescope(s) the original data were acquired with

publication_date

The data the catalogue was published

description

Describes tables in the tableset

number_rows

Number of rows present in this version of the catalogue

number_columns

Number of columns present in this version of the catalogue

rel_descr_url

Location of the release description document (typically a pdf)

acknowledgment

It provides the sentence to be used in your publication when making use of this catalogue

cat_id

Internal catalogue identifier

mjd_obs

The observational data this catalogue is based were taken between mjd_obs and mjd_end

mjd_end

The observational data this catalogue is based were taken between mjd_obs and mjd_end

skysqdeg

Area of the sky (in square degrees) covered by this catalogue

bibliography

Bibliographic reference in the form of either a BIBCODE or a DOI

document_id

Internal identifier of the release description document 1

from_column

Column in the from_table

target_table

The table with the primary key

target_column

Column in the target_table

last_version

True if this is the latest version of the catalogue

RA_id

Identifier for RA in the catalogue

Dec_id

Identifier for Dec in the catalogue

Note

At first sight it may seem that not all cataloguess have the RA_id and Dec_id. This is because the catalogue is spread into more than one table. To identify the same source among the different tables of a catalogue the target_table and target_column should be used.

Which columns are in a catalogue

It is possible to get information on all columns present in a catalogue. For instance, the columns of the VIKING DR4 catalogue can be obtained running the following TAP query:

SELECT
    table_name, column_name, ucd, datatype, description, unit
FROM
    TAP_SCHEMA.columns
WHERE
    table_name = 'viking_er5_zyjj_1j_2hks_catMetaData_fits_V4'

A similar result can be obtained running:

archive_catalogues.columns_info(tables='viking_er5_zyjj_1j_2hks_catMetaData_fits_V4')

where the result is stored in an astropy.table.

Footnotes

1

The web user interface for this catalogue is reachable via the URL computed appending the cat_id to the string: https://www.eso.org/qi/catalogQuery/index/