ESA Hubble

ESA Hubble Space Telescope archive (eHST).

  • Module name: esa_hubble

  • Python class: astroquery.esa.hubble.ESAHubble

  • Functions: 23

Call any function below with the astroquery_execute MCP tool. Descriptions are taken from the upstream astroquery/astropy docstrings.

Function

Summary

clear_cache

Removes all cache files.

cone_search

To execute a cone search defined by a coordinate and a radius

cone_search_criteria

To execute a cone search defined by a coordinate (an

download_file

Download a file from eHST based on its filename.

download_files_from_program

Download artifacts from EHST. Artifact is a single Hubble product file.

download_fits_files

Retrieves all the FITS files associated to an observation

download_product

Download products from EHST based on their observation ID and the

get_artifact

Download artifacts from EHST. Artifact is a single Hubble product file.

get_associated_files

Retrieves all the files associated to an observation

get_columns

Get the available columns for a table in EHST TAP service

get_datalabs_path

Get the available columns for a table in EHST TAP service

get_hap_hst_link

Returns the related members of hap and hst observations

get_member_observations

Returns the related members of simple and composite observations

get_observation_type

Returns the type of an observation

get_observations_from_program

Retrieves all the observations associated to a program/proposal ID

get_postcard

Download postcards from EHST

get_status_messages

Retrieve the messages to inform users about

get_tables

Get the available table in EHST TAP service

query_criteria

Launches a synchronous or asynchronous job to query the HST tap

query_metadata

ESAHubble.query_metadata

query_tap

Launches a synchronous or asynchronous job to query the HST tap

query_target

It executes a query over EHST and download the xml with the results.

reset_cache_location

Resets the cache location to the default astropy cache

Functions

clear_cache

Call via MCP

astroquery_execute(
    module_name="esa_hubble",
    function_name="clear_cache",
    params={},
)
ESAHubbleClass.clear_cache()

Removes all cache files.

cone_search_criteria

Call via MCP

astroquery_execute(
    module_name="esa_hubble",
    function_name="cone_search_criteria",
    params={"radius": "<radius>"},
)
ESAHubbleClass.cone_search_criteria(radius, *, target=None, coordinates=None, calibration_level=None, data_product_type=None, intent=None, obs_collection=None, instrument_name=None, filters=None, proposal=None, async_job=True, filename=None, output_format='votable', save=False, cache=True, verbose=False)

To execute a cone search defined by a coordinate (an astropy.coordinate element or a target name which is resolved), a radius and a set of criteria to filter the results. This function comprises the outputs of query_target, cone_search and query_criteria methods.

Parameters:
  • radius (float or quantity) – radius in arcmin (int, float) or quantity of the cone_search

  • target (str, mandatory if no coordinates is provided) – name of the target, that will act as center in the cone search

  • coordinates (astropy.coordinate, mandatory if no target is provided) – coordinates of the center in the cone search

  • calibration_level (str or int, optional) – The identifier of the data reduction/processing applied to the data. RAW (1), CALIBRATED (2), PRODUCT (3) or AUXILIARY (0)

  • data_product_type (str, optional) – High level description of the product. image, spectrum or timeseries.

  • intent (str, optional) – The intent of the original observer in acquiring this observation. SCIENCE or CALIBRATION

  • collection (list of str, optional) – List of collections that are available in eHST catalogue. HLA, HST

  • instrument_name (list of str, optional) – Name(s) of the instrument(s) used to generate the dataset

  • filters (list of str, optional) – Name(s) of the filter(s) used to generate the dataset

  • proposal (int, optional) – Proposal ID associated to the observations

  • async_job (bool, optional, default 'False') – executes the query (job) in asynchronous/synchronous mode (default synchronous)

  • filename (str, default None) – Path and name of the file to store the results. If the filename is defined, the file will be automatically saved

  • output_format (string) – results format. Options are: ‘votable’: str, binary VOTable format ‘csv’: str, comma-separated values format

  • save (bool) – optional, default ‘False’ Flag to save the result in a file. If the filename is not defined, it will use a formatted name to save the file

  • cache (bool) – optional, default ‘True’ Flag to save the results in the local cache

  • verbose (bool, optional, default 'False') – flag to display information about the process

Return type:

astropy.table.Table with the result of the cone_search

download_file

Call via MCP

astroquery_execute(
    module_name="esa_hubble",
    function_name="download_file",
    params={"file": "<file>"},
)
ESAHubbleClass.download_file(file, *, filename=None, folder=None, verbose=False)

Download a file from eHST based on its filename.

Parameters:
  • file (string) – file name of the artifact to be downloaded

  • filename (string) – file name to be used to store the file, optional, default None

  • folder (string) – optional, default current path Local folder to store the file

  • verbose (bool) – optional, default ‘False’ flag to display information about the process

Return type:

None. The file is associated

download_files_from_program

Call via MCP

astroquery_execute(
    module_name="esa_hubble",
    function_name="download_files_from_program",
    params={"program": "<program>"},
)
ESAHubbleClass.download_files_from_program(program, *, folder=None, calibration_level=None, data_product_type=None, intent=None, obs_collection=None, instrument_name=None, filters=None, only_fits=False)

Download artifacts from EHST. Artifact is a single Hubble product file.

Parameters:
  • program (int) – Program or Proposal ID associated to the observations

  • folder (string) – optional, default current path Local folder to store the file

  • calibration_level (str or int, optional) – The identifier of the data reduction/processing applied to the data. RAW (1), CALIBRATED (2), PRODUCT (3) or AUXILIARY (0)

  • data_product_type (str, optional) – High level description of the product. image, spectrum or timeseries.

  • intent (str, optional) – The intent of the original observer in acquiring this observation. SCIENCE or CALIBRATION

  • obs_collection (list of str, optional) – List of collections that are available in eHST catalogue. HLA, HST, HAP

  • instrument_name (str or list of str, optional) – Name(s) of the instrument(s) used to generate the dataset

  • filters (list of str, optional) – Name(s) of the filter(s) used to generate the dataset

  • only_fits (bool) – optional, default ‘False’ flag to download only FITS files

Return type:

None. It downloads the artifact indicated

download_fits_files

Call via MCP

astroquery_execute(
    module_name="esa_hubble",
    function_name="download_fits_files",
    params={"observation_id": "<observation_id>"},
)
ESAHubbleClass.download_fits_files(observation_id, *, folder=None, verbose=False)

Retrieves all the FITS files associated to an observation

Parameters:
  • observation_id (string or list of strings) – id of the observation to be downloaded, mandatory The identifier of the observation we want to retrieve, regardless of whether it is simple or composite.

  • folder (string) – optional, default current path Local folder to store the file

  • verbose (bool) – optional, default ‘False’ flag to display information about the process

Return type:

None. The file is associated

download_product

Call via MCP

astroquery_execute(
    module_name="esa_hubble",
    function_name="download_product",
    params={"observation_id": "<observation_id>"},
)
ESAHubbleClass.download_product(observation_id, *, calibration_level=None, filename=None, folder=None, verbose=False, product_type=None)

Download products from EHST based on their observation ID and the calibration level or the product type.

Parameters:
  • observation_id (string) – id of the observation to be downloaded, mandatory The identifier of the observation we want to retrieve, regardless of whether it is simple or composite.

  • calibration_level (string) – calibration level, optional The identifier of the data reduction/processing applied to the data. By default, the most scientifically relevant level will be chosen. RAW, CALIBRATED, PRODUCT or AUXILIARY

  • filename (string) – File name to be used to store the artifact, optional, default None

  • folder (string) – optional, default current folder Local folder to store the file

  • verbose (bool) – optional, default ‘False’ flag to display information about the process

  • product_type (string) – type of product retrieval, optional SCIENCE, PREVIEW, THUMBNAIL or AUXILIARY ———— Deprecation Warning: PRODUCT, SCIENCE_PRODUCT or POSTCARD are no longer supported. ————

Return type:

None. It downloads the observation indicated

get_artifact

Call via MCP

astroquery_execute(
    module_name="esa_hubble",
    function_name="get_artifact",
    params={"artifact_id": "<artifact_id>"},
)
ESAHubbleClass.get_artifact(artifact_id, *, filename=None, folder=None, verbose=False)

Download artifacts from EHST. Artifact is a single Hubble product file.

Parameters:
  • artifact_id (string) – filename to be downloaded, mandatory The identifier of the physical product (file) we want to retrieve.

  • filename (string) – file name to be used to store the artifact, optional, default None File name for the artifact

  • folder (string) – optional, default current path Local folder to store the file

  • verbose (bool) – optional, default ‘False’ flag to display information about the process

Return type:

None. It downloads the artifact indicated

get_associated_files

Call via MCP

astroquery_execute(
    module_name="esa_hubble",
    function_name="get_associated_files",
    params={"observation_id": "<observation_id>"},
)
ESAHubbleClass.get_associated_files(observation_id, *, verbose=False)

Retrieves all the files associated to an observation

Parameters:
  • observation_id (string or list of strings) – id(s) of the observation(s) to be downloaded, mandatory The identifier of the observation we want to retrieve, regardless of whether it is simple or composite.

  • verbose (bool) – optional, default ‘False’ flag to display information about the process

Return type:

None. The file is associated

get_columns

Call via MCP

astroquery_execute(
    module_name="esa_hubble",
    function_name="get_columns",
    params={"table_name": "<table_name>"},
)
ESAHubbleClass.get_columns(table_name, *, only_names=True, verbose=False)

Get the available columns for a table in EHST TAP service

Parameters:
  • table_name (string, mandatory, default None) – table name of which, columns will be returned

  • only_names (bool, TAP+ only, optional, default 'False') – True to load table names only

  • verbose (bool, optional, default 'False') – flag to display information about the process

Return type:

A list of columns

get_datalabs_path

Call via MCP

astroquery_execute(
    module_name="esa_hubble",
    function_name="get_datalabs_path",
    params={"filename": "<filename>"},
)
ESAHubbleClass.get_datalabs_path(filename, default_volume=None)

Get the available columns for a table in EHST TAP service

Parameters:
  • filename (string, mandatory, default None) – file name to search for its full path

  • default_volume (string, optional, default None) – Default folder name in datalabs. If None, it is filled automatically

Return type:

The complete path of the file name in Datalabs

get_member_observations

Call via MCP

astroquery_execute(
    module_name="esa_hubble",
    function_name="get_member_observations",
    params={"observation_id": "<observation_id>"},
)
ESAHubbleClass.get_member_observations(observation_id)

Returns the related members of simple and composite observations

Parameters:

observation_id (str) – Observation identifier.

Returns:

  • A list of strings with the observation_id of the associated

  • observations

get_observation_type

Call via MCP

astroquery_execute(
    module_name="esa_hubble",
    function_name="get_observation_type",
    params={"observation_id": "<observation_id>"},
)
ESAHubbleClass.get_observation_type(observation_id)

Returns the type of an observation

Parameters:

observation_id (string) – id of the observation to be downloaded, mandatory The identifier of the observation we want to retrieve, regardless of whether it is simple or composite.

Return type:

String with the observation type

get_observations_from_program

Call via MCP

astroquery_execute(
    module_name="esa_hubble",
    function_name="get_observations_from_program",
    params={"program": "<program>"},
)
ESAHubbleClass.get_observations_from_program(program, *, output_file=None, output_format='votable', verbose=False)

Retrieves all the observations associated to a program/proposal ID

Parameters:
  • program (int) – Program or Proposal ID associated to the observations

  • output_file (string) – optional, default None file name to be used to store the result

  • output_format (string) – results format. Options are: ‘votable’: str, binary VOTable format ‘csv’: str, comma-separated values format

  • verbose (bool) – optional, default ‘False’ flag to display information about the process

Return type:

A table object

get_postcard

Call via MCP

astroquery_execute(
    module_name="esa_hubble",
    function_name="get_postcard",
    params={"observation_id": "<observation_id>"},
)
ESAHubbleClass.get_postcard(observation_id, *, calibration_level='RAW', resolution=256, filename=None, verbose=False)

Download postcards from EHST

Parameters:
  • observation_id (string) – id of the observation for which download the postcard, mandatory The identifier of the observation we want to retrieve, regardless of whether it is simple or composite.

  • calibration_level (string) – calibration level, optional, default ‘RAW’ The identifier of the data reduction/processing applied to the data. By default, the most scientifically relevant level will be chosen. RAW, CALIBRATED, PRODUCT or AUXILIARY

  • resolution (integer) – postcard resolution, optional, default 256 Resolution of the retrieved postcard. 256 or 1024

  • filename (string) – file name to be used to store the postcard, optional, default None File name for the artifact

  • verbose (bool) – optional, default ‘False’ Flag to display information about the process

Return type:

None. It downloads the observation postcard indicated

get_status_messages

Call via MCP

astroquery_execute(
    module_name="esa_hubble",
    function_name="get_status_messages",
    params={},
)
ESAHubbleClass.get_status_messages()

Retrieve the messages to inform users about the status of eHST TAP

get_tables

Call via MCP

astroquery_execute(
    module_name="esa_hubble",
    function_name="get_tables",
    params={},
)
ESAHubbleClass.get_tables(*, only_names=True, verbose=False)

Get the available table in EHST TAP service

Parameters:
  • only_names (bool, TAP+ only, optional, default 'False') – True to load table names only

  • verbose (bool, optional, default 'False') – flag to display information about the process

Return type:

A list of tables

query_criteria

Call via MCP

astroquery_execute(
    module_name="esa_hubble",
    function_name="query_criteria",
    params={},
)
ESAHubbleClass.query_criteria(*, calibration_level=None, data_product_type=None, intent=None, obs_collection=None, instrument_name=None, filters=None, proposal=None, async_job=True, output_file=None, output_format='votable', verbose=False, get_query=False)

Launches a synchronous or asynchronous job to query the HST tap using calibration level, data product type, intent, collection, instrument name, and filters as criteria to create and execute the associated query.

Parameters:
  • calibration_level (str or int, optional) – The identifier of the data reduction/processing applied to the data. RAW (1), CALIBRATED (2), PRODUCT (3) or AUXILIARY (0)

  • data_product_type (str, optional) – High level description of the product. image, spectrum or timeseries.

  • intent (str, optional) – The intent of the original observer in acquiring this observation. SCIENCE or CALIBRATION

  • obs_collection (list of str, optional) – List of collections that are available in eHST catalogue. HLA, HST, HAP

  • instrument_name (str or list of str, optional) – Name(s) of the instrument(s) used to generate the dataset

  • filters (list of str, optional) – Name(s) of the filter(s) used to generate the dataset

  • proposal (int, optional) – Proposal ID associated to the observations

  • async_job (bool, optional, default 'True') – executes the query (job) in asynchronous/synchronous mode (default synchronous)

  • output_file (str, optional, default None) – file name where the results are saved if dumpToFile is True. If this parameter is not provided, the jobid is used instead

  • output_format (str, optional, default 'votable') – results format

  • verbose (bool, optional, default 'False') – flag to display information about the process

  • get_query (bool, optional, default 'False') – flag to return the query associated to the criteria as the result of this function.

Return type:

A table object

query_metadata

Call via MCP

astroquery_execute(
    module_name="esa_hubble",
    function_name="query_metadata",
    params={},
)
ESAHubbleClass.query_metadata(*, output_format='votable', verbose=False)

query_tap

Call via MCP

astroquery_execute(
    module_name="esa_hubble",
    function_name="query_tap",
    params={"query": "<query>"},
)
ESAHubbleClass.query_tap(query, *, async_job=False, output_file=None, output_format='votable', verbose=False)

Launches a synchronous or asynchronous job to query the HST tap

Parameters:
  • query (str, mandatory) – query (adql) to be executed

  • async_job (bool, optional, default 'False') – executes the query (job) in asynchronous/synchronous mode (default synchronous)

  • output_file (str, optional, default None) – file name where the results are saved if dumpToFile is True. If this parameter is not provided, the jobid is used instead

  • output_format (str, optional, default 'votable') – results format

  • verbose (bool, optional, default 'False') – flag to display information about the process

Return type:

A table object

query_target

Call via MCP

astroquery_execute(
    module_name="esa_hubble",
    function_name="query_target",
    params={"name": "<name>"},
)
ESAHubbleClass.query_target(name, *, filename=None, output_format='votable', verbose=False, async_job=False, radius=7)

It executes a query over EHST and download the xml with the results.

Parameters:
  • name (string) – target name to be requested, mandatory

  • filename (string) – file name to be used to store the metadata, optional, default None

  • output_format (string) – optional, default ‘votable’ output format of the query

  • verbose (bool) – optional, default ‘False’ Flag to display information about the process

  • async_job (bool, optional, default 'False') – executes the query (job) in asynchronous/synchronous mode (default synchronous)

  • radius (int) – optional, default 7 radius in arcmin (int, float) or quantity of the cone_search

Return type:

Table with the result of the query. It downloads metadata as a file.

reset_cache_location

Call via MCP

astroquery_execute(
    module_name="esa_hubble",
    function_name="reset_cache_location",
    params={},
)
ESAHubbleClass.reset_cache_location()

Resets the cache location to the default astropy cache