EsoClass

class astroquery.eso.EsoClass[source]

Bases: astroquery.query.QueryWithLogin

Attributes Summary

ROW_LIMIT
USERNAME

Methods Summary

data_retrieval(datasets) DEPRECATED: see retrieve_data
get_headers(product_ids[, cache]) Get the headers associated to a list of data product IDs
list_instruments([cache]) List all the available instruments in the ESO archive.
list_surveys([cache]) List all the available surveys (phase 3) in the ESO archive.
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_survey(**kwargs)
query_surveys([surveys, cache, help, open_form]) Query survey Phase 3 data contained in the ESO archive.
retrieve_data(datasets[, cache, 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’

Attributes Documentation

ROW_LIMIT = 50
USERNAME = u''

Methods Documentation

data_retrieval(datasets)[source]

DEPRECATED: see retrieve_data

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_ids : either a list of strings or a Column

List of data product IDs.

Returns:

result : Table

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

list_instruments(cache=True)[source]

List all the available instruments in the ESO archive.

Returns:

instrument_list : list of strings

cache : bool

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_list : list of strings

cache : bool

Cache the response for faster subsequent retrieval

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('E-093.C-0144A')
>>> 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:

instrument : string

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

column_filters : dict

Constraints applied to the query.

columns : list of strings

Columns returned by the query.

open_form : bool

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

help : bool

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

cache : bool

Cache the response for faster subsequent retrieval.

Returns:

table : Table

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_survey(**kwargs)[source]
query_surveys(surveys='', cache=True, help=False, open_form=False, **kwargs)[source]

Query survey Phase 3 data contained in the ESO archive.

Parameters:

survey : string 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.

cache : bool

Cache the response for faster subsequent retrieval

Returns:

table : Table 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, cache=True, continuation=False)[source]

Retrieve a list of datasets form the ESO archive.

Parameters:

datasets : list of strings or string

List of datasets strings to retrieve from the archive.

cache : bool

Cache the retrieval forms (not the data - they are downloaded independent of this keyword)

Returns:

files : list 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