Archive Observations

The ESO archive currently (June 2020) contains more than 1.7 million spectra, more than 650,000 images, and more than 240,000 cubes.

There are three main ways to access the vaste amount of information present in the ESO archive:

In addition, the archive_observations provides simple wrappers to efficiently embed the access to the ESO archive into python routines.

Overview

Similarly to the module archive_catalogues (see Archive Catalogues), the base for archive_observations is the query_observations.ESOObservations 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_obs

  • 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 you can fill the result_from_query attribute using the method run_query(), for instance:

from ESOAsg.queries import query_observations
# define a query to obtain all ALMA observations in the ESO Archive
query = "SELECT target_name, dp_id, s_ra, s_dec, instrument_name FROM ivoa.ObsCore WHERE instrument_name = 'ALMA'"
# instantiate the class adn limit to the first 100 results
alma_query = query_observations.ESOObservations(query=query, maxrec=100)
# run the query
alma_query.run_query()
# print the result on terminal
alma_query.result_from_query.pprint()

The module archive_observations provides a set of functions to help a user to search and download for data without explicitly creating a TAP query.

Some examples

query to a specific position in the sky

The access to data in the ESO archive that intersects a cone with a certain radius (for instance around the star HD 057060: RA=07:18:40.38, Dec.=-24:33:31.3, radius=5arcsec) it is possible either with the archive science portal (see also Archive Science Portal), or by running the TAP query to ivoa.ObsCore:

SELECT
    target_name, dp_id, s_ra, s_dec, t_exptime, em_min, em_max,
    dataproduct_type, instrument_name, obstech, abmaglim,
    proposal_id, obs_collection
FROM
    ivoa.ObsCore
WHERE
    INTERSECTS(CIRCLE('ICRS',109.66824871,-24.55869773,0.0014), s_region) = 1

The same result, could be obtained using the function query_from_radec():

from ESOAsg import archive_observations
from astropy.coordinates import SkyCoord
star_position = SkyCoord.from_name('HD 057060')
eso_data = archive_observations.query_from_radec(star_position, radius=5.)

eso_data is an astropy.table containing the information on the available data products. It is possible to download all this data feeding the dp_id column to the download function:

archive_observations.download(eso_data['dp_id']

A step-by-step explanation for the procedure to select and download data is provided in this jupyter notebook.

The ESOAsg package also provides the get_data_from_radec script to fully exploit this functionality (see Archive Access Scripts for futher details).