Skip to main content

Archive - FAQ (Getting Data - Programmatic) - Knowledgebase / Archive / FAQ - ESO Operations Helpdesk

Archive - FAQ (Getting Data - Programmatic)

Authors list
  • Myha Vuong

ESO Archive Frequently Asked Questions

 

How do I programmatically access the Archive?

 

Currently there are two possibilities that allow to programmatically (a) search data files of certain characterstics (e.g. belwonging to your observing programme) and (b) download the identified datasets:

  1. scripting access to Raw Data, Reduced Data, Science Catalogues, and to Ambient Measurements using standard VO protocols
  2. using the astroquery.eso module made available starting with astroquery version 0.4.7; NOTE: previous versions will not work after July 2025 (see below).

Other methods were available (e.g. using some scripts provided via the Archive FAQs) but those are now deprecated given the upcoming decommissioning (July 2025) of an old software component called the Request Handler.

Within a couple of months, a new version of the astroquery.eso module will be made available with enhanced capabilities.  

Scripting access via VO protocols

  • How can I learn how to build my own ADQL queries, and in general how to script my access to the archive?

A dedicate and interactive page demonstrating the new functionality is available at https://archive.eso.org/programmatic/. Via that page you can learn how to formulate queries (use tab: Query a TAP service), how to script them (use tab: Script your access), which URLs to use to fetch metadata, or previews, or provenance information, etc. (use tab: Learn dataset actions). Many examples are provided therein; you can try different precooked queries, or you can edit them and execute them directly from that page. You will find there some python (astropy/pyvo) scripts, jupyter notebooks, and other information.

  • Background information

Since 2018, it is possible to access the ESO Science Archive using standard protocols and interfaces based on virtual observatory standards. Users are given direct read-only access to the ESO databases, and therefore can write their own queries, using the SQL-based Astronomical Data Query Language (ADQL 2.0), and execute them using the Tabular Access Protocol (TAP). Files can be downloaded directly via https. Via DataLink, calibration reference files can be associated to the raw frames. Token authentication is supported both to perform authorised queries, and to download files under proprietary period. The new access layer also opens up the possibility to use common astronomical tools to query and access files directly from within tools like Aladin, TOPCAT, and SPLAT-VO.

In particular, ESO offers two TAP services:  tap_obs to query the database tables describing the observed raw data, the reduced data (including ALMA), and the database tables containing the ESO ambient conditions and meteorological measurements (seeing, isoplanatic angle, precipitable water, turbulence profiles, etc.) of the La Silla Paranal Observatory; tap_cat to query the scientific catalogues provided by the principal investigators [PIs] of ESO public surveys and observing programmes.

Astroquery ESO module

The current astroquery ESO module was published few years back in astroquery v0.4.7. Older versions will stop working as soon as the old Request Handler is decommissioned (July 2025). Version 0.4.7 will still work, but not for long as we plan changes to the part that affects the data searches. A newer and better version has been provided to the astroquery team for their review, and should get published soon. The official documentation page is available at: https://astroquery.readthedocs.io/en/latest/eso/eso.html. Once the new version will be made available, you will see at the top of that documentation page a "Backward Compatibility Notice" explaining the intevening modifications. At that point we will upgrade the user interfaces making version 0.4.7 unusable.

Data Access Policy

Access to the ESO science archive remains regulated by the ESO Data Access Policy.