astro query:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- astroquery v0.4.11 »
- IRSA Dust Extinction Service Queries (`astroquery.ipac.irsa.irsa_dust`) »
- IrsaDustClass

# IrsaDustClass

class astroquery.ipac.irsa.irsa_dust.IrsaDustClass

  Bases: `BaseQuery`

  Attributes Summary

  `DUST_SERVICE_URL` |
  `TIMEOUT` |
  `image_type_to_section` |

  Methods Summary

  `extract_image_urls`(raw_xml, *[, image_type]) | Extracts the image URLs from the query results and returns these as a list.
  `get_extinction_table`(coordinate, *[, ...]) | Query function that fetches the extinction table from the query result.
  `get_extinction_table_async`(coordinate, *[, ...]) | A query function similar to `astroquery.ipac.irsa.irsa_dust.IrsaDustClass.get_extinction_table` but returns a file-handler to the remote files rather than downloading it.
  `get_image_list`(coordinate, *[, radius, ...]) | Query function that performs coordinate-based query and returns a list of URLs to the Irsa-Dust images.
  `get_images`(coordinate, *[, radius, ...]) | A query function that performs a coordinate-based query to acquire Irsa-Dust images.
  `get_images_async`(coordinate, *[, radius, ...]) | A query function similar to `astroquery.ipac.irsa.irsa_dust.IrsaDustClass.get_images` but returns file-handlers to the remote files rather than downloading them.
  `get_query_table`(coordinate, *[, radius, ...]) | Create and return an `Table` representing the query response(s).
  `list_image_types`() | Returns a list of image_types available in the Irsa Dust query results

  Attributes Documentation

  DUST_SERVICE_URL = 'https://irsa.ipac.caltech.edu/cgi-bin/DUST/nph-dust'
  TIMEOUT = 30
  image_type_to_section = {'100um': 'e', 'ebv': 'r', 'temperature': 't'}

  Methods Documentation

  extract_image_urls(raw_xml, *, image_type=None)

    Extracts the image URLs from the query results and returns these as a list. If section is missing or `'all'` returns all the URLs, otherwise returns URL corresponding to the section specified (`'emission'`, `'reddening'`, `'temperature'`).

    Parameters:
      raw_xml str

        XML response returned by the query as a string

      image_type str, optional

        When missing returns for all the images. Otherwise returns only for image of the specified type which must be one of `'temperature'`, `'ebv'`, `'100um'`. Defaults to `None`.

    Returns:
      url_list list

        list of URLs to images extracted from query results.

  get_extinction_table(coordinate, *, radius=None, timeout=30, show_progress=True)

    Query function that fetches the extinction table from the query result.

    Parameters:
      coordinate str

        Can be either the name of an object or a coordinate string If a name, must be resolvable by NED, SIMBAD, 2MASS, or SWAS. Examples of acceptable coordinate strings, can be found here.

      radius str / `Quantity`, optional

        The size of the region to include in the dust query, in radian, degree or hour as per format specified by `Angle` or `Quantity`. Defaults to 5 degrees.

      timeout int, optional

        Time limit for establishing successful connection with remote server. Defaults to `TIMEOUT`.

    Returns:
      table `Table`
  get_extinction_table_async(coordinate, *, radius=None, timeout=30, show_progress=True)

    A query function similar to `astroquery.ipac.irsa.irsa_dust.IrsaDustClass.get_extinction_table` but returns a file-handler to the remote files rather than downloading it. Useful for asynchronous queries so that the actual download may be performed later.

    Parameters:
      coordinate str

        Can be either the name of an object or a coordinate string If a name, must be resolvable by NED, SIMBAD, 2MASS, or SWAS. Examples of acceptable coordinate strings, can be found here.

      radius str, optional

        The size of the region to include in the dust query, in radian, degree or hour as per format specified by `Angle`. Defaults to 5 degrees.

      timeout int, optional

        Time limit for establishing successful connection with remote server. Defaults to `TIMEOUT`.

    Returns:
      result A context manager that yields a file like readable object.
  get_image_list(coordinate, *, radius=None, image_type=None, timeout=30)

    Query function that performs coordinate-based query and returns a list of URLs to the Irsa-Dust images.

    Parameters:
      coordinate str

        Can be either the name of an object or a coordinate string If a name, must be resolvable by NED, SIMBAD, 2MASS, or SWAS. Examples of acceptable coordinate strings, can be found here.

      radius str / `Quantity`, optional

        The size of the region to include in the dust query, in radian, degree or hour as per format specified by `Angle` or `Quantity`. Defaults to 5 degrees.

      image_type str, optional

        When missing returns for all the images. Otherwise returns only for image of the specified type which must be one of `'temperature'`, `'ebv'`, `'100um'`. Defaults to `None`.

      timeout int, optional

        Time limit for establishing successful connection with remote server. Defaults to `TIMEOUT`.

      get_query_payload bool

        If `True` then returns the dictionary of query parameters, posted to remote server. Defaults to `False`.

    Returns:
      url_list list

        A list of URLs to the FITS images corresponding to the queried object.

  get_images(coordinate, *, radius=None, image_type=None, timeout=30, get_query_payload=False, show_progress=True)

    A query function that performs a coordinate-based query to acquire Irsa-Dust images.

    Parameters:
      coordinate str

        Can be either the name of an object or a coordinate string If a name, must be resolvable by NED, SIMBAD, 2MASS, or SWAS. Examples of acceptable coordinate strings, can be found here.

      radius str / `Quantity`, optional

        The size of the region to include in the dust query, in radian, degree or hour as per format specified by `Angle` or `Quantity`. Defaults to 5 degrees.

      image_type str, optional

        When missing returns for all the images. Otherwise returns only for image of the specified type which must be one of `'temperature'`, `'ebv'`, `'100um'`. Defaults to `None`.

      timeout int, optional

        Time limit for establishing successful connection with remote server. Defaults to `TIMEOUT`.

      get_query_payload bool, optional

        If `True` then returns the dictionary of query parameters, posted to remote server. Defaults to `False`.

    Returns:
      A list of `HDUList` objects
  get_images_async(coordinate, *, radius=None, image_type=None, timeout=30, get_query_payload=False, show_progress=True)

    A query function similar to `astroquery.ipac.irsa.irsa_dust.IrsaDustClass.get_images` but returns file-handlers to the remote files rather than downloading them. Useful for asynchronous queries so that the actual download may be performed later.

    Parameters:
      coordinate str

        Can be either the name of an object or a coordinate string If a name, must be resolvable by NED, SIMBAD, 2MASS, or SWAS. Examples of acceptable coordinate strings, can be found here.

      radius str / `Quantity`, optional

        The size of the region to include in the dust query, in radian, degree or hour as per format specified by `Angle` or `Quantity`. Defaults to 5 degrees.

      image_type str, optional

        When missing returns for all the images. Otherwise returns only for image of the specified type which must be one of `'temperature'`, `'ebv'`, `'100um'`. Defaults to `None`.

      timeout int, optional

        Time limit for establishing successful connection with remote server. Defaults to `TIMEOUT`.

      get_query_payload bool, optional

        If `True` then returns the dictionary of query parameters, posted to remote server. Defaults to `False`.

    Returns:
      list list

        A list of context-managers that yield readable file-like objects.

  get_query_table(coordinate, *, radius=None, section=None, timeout=30, url='https://irsa.ipac.caltech.edu/cgi-bin/DUST/nph-dust')

    Create and return an `Table` representing the query response(s).

    When `section` is missing, returns the full table. When a section is specified (`'location'`, `'temperature'`, `'ebv'`, or `'100um'`), only that portion of the table is returned.

    Parameters:
      coordinate str

        Can be either the name of an object or a coordinate string If a name, must be resolvable by NED, SIMBAD, 2MASS, or SWAS. Examples of acceptable coordinate strings, can be found here.

      radius str / `Quantity`, optional

        The size of the region to include in the dust query, in radian, degree or hour as per format specified by `Angle` or `Quantity`. Defaults to 5 degrees.

      section str, optional

        When missing, all the sections of the query result are returned. Otherwise only the specified section (`'ebv'`, `'100um'`, `'temperature'`, `'location'`) is returned. Defaults to `None`.

      timeout int, optional

        Time limit for establishing successful connection with remote server. Defaults to `TIMEOUT`.

      url str, optional

        Only provided for debugging. Should generally not be assigned. Defaults to `DUST_SERVICE_URL`.

    Returns:
      table `Table`

        Table representing the query results, (all or as per specified).

  list_image_types()

    Returns a list of image_types available in the Irsa Dust query results