Skip to content

Latest commit

 

History

History
164 lines (113 loc) · 7.15 KB

File metadata and controls

164 lines (113 loc) · 7.15 KB

ESO Queries (astroquery.eso)

Quick Start

Note

Check if this is a version of astroquery.eso (0.4.12 or later) that includes TAP support (see ⚠️ Backward Compatibility Notice ⚠️ below).

This quick start example shows how to use the astroquery.eso interface to query the ESO Science Archive for both raw and reduced observations, as well as catalogue data.

Observations

Here, we perform a cone search for ESPRESSO spectra towards the star HD 37903, and show how to download the corresponding data products.

.. doctest-remote-data::

    >>> from astroquery.eso import Eso
    >>> eso = Eso()

.. doctest-remote-data::

    >>> from astropy.coordinates import SkyCoord   # doctest: +SKIP
    >>> import astropy.units as u
    >>> coords = SkyCoord.from_name("HD 37903")  # doctest: +SKIP
    >>> ra = coords.ra.value  # doctest: +SKIP
    >>> dec = coords.dec.value  # doctest: +SKIP
    >>> r = (1*u.arcsec).to(u.deg).value  # doctest: +SKIP

    >>> table_raw = eso.query_main("ESPRESSO", cone_ra=ra, cone_dec=dec, cone_radius=r)  # doctest: +SKIP
    >>> table_reduced = eso.query_surveys("ESPRESSO", cone_ra=ra, cone_dec=dec, cone_radius=r)  # doctest: +SKIP

    >>> eso.retrieve_data(table_raw["dp_id"])  # doctest: +SKIP
    >>> eso.retrieve_data(table_reduced["dp_id"])  # doctest: +SKIP

Catalogues

Catalogue queries operate on published survey tables and return column-based results. For example, to query the KiDS DR4 catalogue and inspect a small subset of rows:

.. doctest-remote-data::

    >>> table_cat = eso.query_catalogue("KiDS_DR4_1_ugriZYJHKs_cat_fits", ROW_LIMIT=5)

By default, queries are limited to returning a maximum of 1000 rows. This limit can be modified by setting the ROW_LIMIT attribute. To disable truncation and return all matching results (up to TAP limit of 15,000,000), set:

.. doctest-remote-data::

    >>> eso.ROW_LIMIT = -1 # 0 or None to return all results without truncation

Getting Started

This guide walks through logging in, running your first archive queries, inspecting metadata, downloading products, and querying catalogues.

Authentication

.. toctree::
   :maxdepth: 2

   eso_login

Observation Queries

.. toctree::
   :maxdepth: 2

   eso_obs_cone_search
   eso_obs_raw_general
   eso_obs_raw_instrument
   eso_obs_reduced
   eso_obs_tap
   eso_obs_apex
   eso_obs_header_info
   eso_obs_download

Catalogue Queries

.. toctree::
   :maxdepth: 2

   eso_cat_cone_search
   eso_cat_query
   eso_cat_tap

Help

.. toctree::
   :maxdepth: 2

   eso_troubleshooting

Warning

⚠️ Backward Compatibility Notice ⚠️

The WDB (Web DataBase) AI has been deprecated and replaced by TAP (Table Access Protocol), a standardized interface for querying astronomical datasets using ADQL (Astronomical Data Query Language). While the Python interface remains the same, the values accepted by the columns and column_filters parameters must reflect TAP field names and ADQL syntax. This means that, although the structure of your code won't need to change, the values you pass to the arguments columns and column_filters must be revised to comply with the new format.

In TAP, column_filters accepts ADQL expressions. For example:

>>> column_filters = {
...        "some_int_column": "< 5",
...        "some_float_column_2": ">= 1.23",
...        "some_char_column": "like '%John%'",
...        "some_generic_column": "in ('mango', 'apple', 'kiwi')",
...        "other_generic_column": "between '2024-01-01' and '2024-12-31'"
...        }

Please review your queries carefully and update them accordingly to ensure compatibility with the new astroquery versions. See section :ref:`column-filters-fix` for more information and examples.

Introduction

Overview of the ESO Archive

The ESO Science Archive Facility (SAF) is one of the largest ground-based astronomical data repositories in the world. It contains, and provides access to, data from ESO telescopes at the La Silla, Paranal, as well as the (sub-)millimeter APEX telescope and ALMA array, and selected external datasets, such as raw WFCAM/UKIDSS data from the UKIRT facility in Hawaii. The archive includes both raw data, and a wide range of processed data products, either generated by ESO or contributed by the community (via ESO Phase 3). Processed data downloaded from the ESO Archive are assigned a Digital Object Identifier (DOI), where the list of available DOIs can be browsed in the ESO DOI query page.

Ways to Access the Archive

Access to data follows ESO’s standard data policy: the Principal Investigator (PI) of an observing programme has exclusive access to their data during a proprietary period (typically one year), after which the data become publicly available. See the ESO Data Access Policy and FAQ for more information. Browsing the archive does not require authentication, but login is necessary to access proprietary datasets. Use of ESO archival data should be acknowledged in all publications.

There are multiple ways to access the archive:

This documentation focuses on the last method: accessing the archive programmatically using the astroquery.eso module. This Python interface allows users to search for both raw and reduced data, retrieve metadata, and download data products directly using dataset identifiers. Proprietary access is supported via authentication with the ESO User Portal.

Reference/API

.. automodapi:: astroquery.eso
    :no-inheritance-diagram: