EsoClass

class astroquery.eso.EsoClass[source]

Bases: astroquery.query.QueryWithLogin

Attributes Summary

QUERY_INSTRUMENT_URL

ROW_LIMIT

USERNAME

Methods Summary

get_headers(product_ids[, cache])

Get the headers associated to a list of data product IDs

list_instruments([cache])

List all the available instrument-specific queries offered by the ESO archive.

list_surveys([cache])

List all the available surveys (phase 3) in the ESO archive.

login([username, store_password, ...])

Login to the ESO User Portal.

query_apex_quicklooks([project_id, help, ...])

APEX data are distributed with quicklook products identified with a different name than other ESO products.

query_instrument(instrument[, ...])

Query instrument-specific raw data contained in the ESO archive.

query_main([column_filters, columns, ...])

Query raw data contained in the ESO archive.

query_surveys([surveys, cache, help, open_form])

Query survey Phase 3 data contained in the ESO archive.

retrieve_data(datasets[, continuation, ...])

Retrieve a list of datasets form the ESO archive.

verify_data_exists(dataset)

Given a data set name, return 'True' if ESO has the file and 'False' otherwise

Attributes Documentation

QUERY_INSTRUMENT_URL = 'http://archive.eso.org/wdb/wdb/eso'
ROW_LIMIT = 50
USERNAME = ''

Methods Documentation

get_headers(product_ids, cache=True)[source]

Get the headers associated to a list of data product IDs

This method returns a Table where the rows correspond to the provided data product IDs, and the columns are from each of the Fits headers keywords.

Note: The additional column 'DP.ID' found in the returned table corresponds to the provided data product IDs.

Parameters
product_idseither a list of strings or a Column

List of data product IDs.

Returns
resultTable

A table where: columns are header keywords, rows are product_ids.

list_instruments(cache=True)[source]

List all the available instrument-specific queries offered by the ESO archive.

Returns
instrument_listlist of strings
cachebool

Cache the response for faster subsequent retrieval

list_surveys(cache=True)[source]

List all the available surveys (phase 3) in the ESO archive.

Returns
survey_listlist of strings
cachebool

Cache the response for faster subsequent retrieval

login(username=None, store_password=False, reenter_password=False)

Login to the ESO User Portal.

Parameters
usernamestr, optional

Username to the ESO Public Portal. If not given, it should be specified in the config file.

store_passwordbool, optional

Stores the password securely in your keyring. Default is False.

reenter_passwordbool, optional

Asks for the password even if it is already stored in the keyring. This is the way to overwrite an already stored passwork on the keyring. Default is False.

query_apex_quicklooks(project_id=None, help=False, open_form=False, cache=True, **kwargs)[source]

APEX data are distributed with quicklook products identified with a different name than other ESO products. This query tool searches by project ID or any other supported keywords.

Examples

>>> tbl = Eso.query_apex_quicklooks('093.C-0144')
>>> files = Eso.retrieve_data(tbl['Product ID'])
query_instrument(instrument, column_filters={}, columns=[], open_form=False, help=False, cache=True, **kwargs)[source]

Query instrument-specific raw data contained in the ESO archive.

Parameters
instrumentstring

Name of the instrument to query, one of the names returned by list_instruments.

column_filtersdict

Constraints applied to the query.

columnslist of strings

Columns returned by the query.

open_formbool

If True, opens in your default browser the query form for the requested instrument.

helpbool

If True, prints all the parameters accepted in column_filters and columns for the requested instrument.

cachebool

Cache the response for faster subsequent retrieval.

Returns
tableTable

A table representing the data available in the archive for the specified instrument, matching the constraints specified in kwargs. The number of rows returned is capped by the ROW_LIMIT configuration item.

query_main(column_filters={}, columns=[], open_form=False, help=False, cache=True, **kwargs)[source]

Query raw data contained in the ESO archive.

Parameters
column_filtersdict

Constraints applied to the query.

columnslist of strings

Columns returned by the query.

open_formbool

If True, opens in your default browser the query form for the requested instrument.

helpbool

If True, prints all the parameters accepted in column_filters and columns for the requested instrument.

cachebool

Cache the response for faster subsequent retrieval.

Returns
tableTable

A table representing the data available in the archive for the specified instrument, matching the constraints specified in kwargs. The number of rows returned is capped by the ROW_LIMIT configuration item.

query_surveys(surveys='', cache=True, help=False, open_form=False, **kwargs)[source]

Query survey Phase 3 data contained in the ESO archive.

Parameters
surveystring or list

Name of the survey(s) to query. Should beone or more of the names returned by list_surveys. If specified as a string, should be a comma-separated list of survey names.

cachebool

Cache the response for faster subsequent retrieval

Returns
tableTable or None

A table representing the data available in the archive for the specified survey, matching the constraints specified in kwargs. The number of rows returned is capped by the ROW_LIMIT configuration item. None is returned when the query has no results.

retrieve_data(datasets, continuation=False, destination=None, with_calib='none', request_all_objects=False, unzip=True, request_id=None)[source]

Retrieve a list of datasets form the ESO archive.

Parameters
datasetslist of strings or string

List of datasets strings to retrieve from the archive.

destination: string

Directory where the files are copied. Files already found in the destination directory are skipped, unless continuation=True. Default to astropy cache.

continuationbool

Force the retrieval of data that are present in the destination directory.

with_calibstring

Retrieve associated calibration files: ‘none’ (default), ‘raw’ for raw calibrations, or ‘processed’ for processed calibrations.

request_all_objectsbool

When retrieving associated calibrations (with_calib != 'none'), this allows to request all the objects included the already downloaded ones, to be sure to retrieve all calibration files. This is useful when the download was interrupted. False by default.

unzipbool

Unzip compressed files from the archive after download. True by default.

request_idstr, int

Retrieve from an existing request number rather than sending a new query, with the identifier from the URL in the email sent from the archive from the earlier request as in:

Returns
fileslist of strings or string

List of files that have been locally downloaded from the archive.

Examples

>>> dptbl = Eso.query_instrument('apex', pi_coi='ginsburg')
>>> dpids = [row['DP.ID'] for row in dptbl if 'Map' in row['Object']]
>>> files = Eso.retrieve_data(dpids)
verify_data_exists(dataset)[source]

Given a data set name, return ‘True’ if ESO has the file and ‘False’ otherwise