astro query:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- astroquery v0.4.11 »
- ESA Herschel Science Archive (`astroquery.esa.hsa`) »
- HSAClass

# HSAClass

class astroquery.esa.hsa.HSAClass(tap_handler=None)

  Bases: `BaseQuery`

  Attributes Summary

  `data_url` |
  `metadata_url` |
  `timeout` |

  Methods Summary

  `download_data`(*[, retrieval_type, ...]) | Download data from Herschel
  `get_columns`(table_name, *[, only_names, verbose]) | Get the available columns for a table in HSA TAP service
  `get_observation`(observation_id, ...[, ...]) | Download observation from Herschel.
  `get_postcard`(observation_id, instrument_name, *) | Download postcard from Herschel
  `get_tables`(*[, only_names, verbose]) | Get the available table in HSA TAP service
  `query_hsa_tap`(query, *[, output_file, ...]) | Launches a synchronous job to query HSA Tabular Access Protocol (TAP) Service
  `query_observations`(coordinate, radius, *[, ...]) | Get the observation IDs from a given region
  `query_region`(coordinate, radius, *[, n_obs, ...]) | Get the observation metadata from a given region

  Attributes Documentation

  data_url = 'http://archives.esac.esa.int/hsa/whsa-tap-server/data?'
  metadata_url = 'http://archives.esac.esa.int/hsa/whsa-tap-server/tap'
  timeout = 60

  Methods Documentation

  download_data(*, retrieval_type='OBSERVATION', observation_id=None, instrument_name=None, filename=None, observation_oid=None, instrument_oid=None, product_level=None, verbose=False, download_dir='', cache=True, **kwargs)

    Download data from Herschel

    Parameters:
      observation_id string, optional

        id of the observation to be downloaded The identifies of the observation we want to retrieve, 10 digits example: 1342195355

      retrieval_type string, optional, default ‘OBSERVATION’

        The type of product that we want to retrieve values: OBSERVATION, PRODUCT, POSTCARD, POSTCARDFITS, REQUESTFILE_XML, STANDALONE, UPDP, HPDP

      instrument_name string, optional, default ‘PACS’

        values: PACS, SPIRE, HIFI The instrument name, by default ‘PACS’ if the retrieval_type is ‘OBSERVATION’

      filename string, optional, default None

        If the filename is not set it will use the observation_id as filename file name to be used to store the file

      verbose bool, optional, default False

        flag to display information about the process

      observation_oid string, optional

        Observation internal identifies. This is the database identifier

      instrument_oid string, optional

        The database identifies of the instrument values: 1, 2, 3

      product_level string, optional

        level to download values: ALL, AUXILIARY, CALIBRATION, LEVEL0, LEVEL0_5, LEVEL1, LEVEL2, LEVEL2_5, LEVEL3, ALL-LEVEL3

      download_dir string, optional

        The directory in which the file will be downloaded

      cache bool

        Defaults to True. If set overrides global caching behavior. See caching documentation.

    Returns:
      File name of downloaded data
  get_columns(table_name, *, only_names=True, verbose=False)

    Get the available columns for a table in HSA TAP service

    Parameters:
      table_name string

        table name of which, columns will be returned

      only_names bool, optional, default True

        True to load column names only

      verbose bool, optional, default False

        flag to display information about the process

    Returns:
      A list of columns
  get_observation(observation_id, instrument_name, *, filename=None, observation_oid=None, instrument_oid=None, product_level=None, verbose=False, download_dir='', cache=True, **kwargs)

    Download observation from Herschel. This consists of a .tar file containing:

    - The auxiliary directory: contains all Herschel non-science spacecraft data

    - The calibarion directory: contains the uplink and downlink calibration products

    - <obs_id> directory: contains the science data distributed in sub-directories called level0/0.5/1/2/2.5/3.

    More information can be found here:

      https://www.cosmos.esa.int/web/herschel/data-products-overview

    Parameters:
      observation_id string

        id of the observation to be downloaded The identifies of the observation we want to retrieve, 10 digits example: 1342195355

      instrument_name string

        The instrument name values: PACS, SPIRE, HIFI

      filename string, optional, default None

        If the filename is not set it will use the observation_id as filename file name to be used to store the file

      verbose bool, optional, default ‘False’

        flag to display information about the process

      observation_oid string, optional

        Observation internal identifies. This is the database identifier

      istrument_oid string, optional

        The database identifies of the instrument values: 1, 2, 3

      product_level string, optional

        level to download values: ALL, AUXILIARY, CALIBRATION, LEVEL0, LEVEL0_5, LEVEL1, LEVEL2, LEVEL2_5, LEVEL3, ALL-LEVEL3

      download_dir string, optional

        The directory in which the file will be downloaded

    Returns:
      File name of downloaded data
  get_postcard(observation_id, instrument_name, *, filename=None, verbose=False, download_dir='', cache=True, **kwargs)

    Download postcard from Herschel

    Parameters:
      observation_id string

        id of the observation to be downloaded The identifies of the observation we want to retrieve, 10 digits example: 1342195355

      instrument_name string

        The instrument name values: PACS, SPIRE, HIFI

      filename string, optional, default None

        If the filename is not set it will use the observation_id as filename file name to be used to store the file

      verbose bool, optional, default False

        flag to display information about the process

      observation_oid string, optional

        Observation internal identifies. This is the database identifier

      istrument_oid string, optional

        The database identifies of the instrument values: 1, 2, 3

      product_level string, optional

        level to download values: ALL, AUXILIARY, CALIBRATION, LEVEL0, LEVEL0_5, LEVEL1, LEVEL2, LEVEL2_5, LEVEL3, ALL-LEVEL3

      postcard_single string, optional

        ‘true’ to retrieve one single postcard (main one) values: true, false

      download_dir string, optional

        The directory in which the file will be downloaded

    Returns:
      File name of downloaded data
  get_tables(*, only_names=True, verbose=False)

    Get the available table in HSA TAP service

    Parameters:
      only_names bool, optional, default True

        True to load table names only

      verbose bool, optional, default False

        flag to display information about the process

    Returns:
      A list of tables
  query_hsa_tap(query, *, output_file=None, output_format='votable', verbose=False)

    Launches a synchronous job to query HSA Tabular Access Protocol (TAP) Service

    Parameters:
      query string

        query (adql) to be executed

      output_file string, 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 string, optional, default ‘votable’

        values ‘votable’ or ‘csv’

      verbose bool, optional, default ‘False’

        flag to display information about the process

    Returns:
      A table object
  query_observations(coordinate, radius, *, n_obs=10, **kwargs)

    Get the observation IDs from a given region

    Parameters:
      coordinate string / `astropy.coordinates`

        the identifier or coordinates around which to query

      radius int / `Quantity`

        the radius of the region

      n_obs int, optional

        the number of observations

      kwargs dict

        passed to `query_hsa_tap`

    Returns:
      A table object with the list of observations in the region
  query_region(coordinate, radius, *, n_obs=10, columns='*', **kwargs)

    Get the observation metadata from a given region

    Parameters:
      coordinate string / `astropy.coordinates`

        the identifier or coordinates around which to query

      radius int / `Quantity`

        the radius of the region

      n_obs int, optional

        the number of observations

      columns str, optional

        the columns to retrieve from the data table

      kwargs dict

        passed to `query_hsa_tap`

    Returns:
      A table object with the list of observations in the region