astro query:docs

- Index
- Modules

### Navigation

- next »
- « previous |
- astroquery v0.4.11 »
- NASA Exoplanet Archive (`astroquery.ipac.nexsci.nasa_exoplanet_archive`) »
- NasaExoplanetArchiveClass

# NasaExoplanetArchiveClass

class astroquery.ipac.nexsci.nasa_exoplanet_archive.NasaExoplanetArchiveClass

  Bases: `BaseVOQuery`, `BaseQuery`

  The interface for querying the NASA Exoplanet Archive TAP and API services

  A full discussion of the available tables and query syntax is available on the documentation pages for TAP and API.

  Attributes Summary

  `CACHE` |
  `TAP_TABLES` |
  `TIMEOUT` |
  `URL_API` |
  `URL_TAP` |

  Methods Summary

  `query_aliases`(object_name, *[, cache]) | Search for aliases for a given confirmed planet or planet host
  `query_criteria`(*args, **kwargs) | Queries the service and returns a table object.
  `query_criteria_async`(table[, ...]) | Search a table given a set of criteria or return the full table
  `query_object`(*args, **kwargs) | Queries the service and returns a table object.
  `query_object_async`(object_name, *[, table, ...]) | Search the tables of confirmed exoplanets for information about a planet or planet host
  `query_region`(*args, **kwargs) | Queries the service and returns a table object.
  `query_region_async`(table, coordinates, radius, *) | Filter a table using a cone search around specified coordinates

  Attributes Documentation

  CACHE = False
  TAP_TABLES
  TIMEOUT = 600
  URL_API = 'https://exoplanetarchive.ipac.caltech.edu/cgi-bin/nstedAPI/nph-nstedAPI'
  URL_TAP = 'https://exoplanetarchive.ipac.caltech.edu/TAP/'

  Methods Documentation

  query_aliases(object_name, *, cache=False)

    Search for aliases for a given confirmed planet or planet host

    Parameters:
      object_name str

        The name of a planet or star to regularize using the `aliaslookup` service.

      cache bool, optional

        Should the request result be cached? This can be useful for large repeated queries, but since the data in the archive is updated regularly, this defaults to `False`.

    Returns:
      response list

        A list of aliases found for the object name. The default name will be listed first.

  query_criteria(*args, **kwargs)

    Queries the service and returns a table object.

    Search a table given a set of criteria or return the full table

    The syntax for these queries is described on the Exoplanet Archive TAP[Rb480749af1eb-1]_ API[Rb480749af1eb-2]_ documentation pages. In particular, the most commonly used criteria will be `select` and `where`.

    Parameters:
      table str

        The name of the table to query. A list of the tables on the Exoplanet Archive can be found on the documentation pages [1], [2].

      get_query_payload bool, optional

        Just return the dict of HTTP request parameters. Defaults to `False`.

      cache bool, optional

        Should the request result be cached? This can be useful for large repeated queries, but since the data in the archive is updated regularly, this defaults to `False`.

      **criteria

        The filtering criteria to apply. These are described in detail in the archive documentation [1], [2] but some examples include `select="*"` to return all columns of the queried table or `where=pl_name='K2-18 b'` to filter a specific column.

    Returns:
      table A `Table` object.

    References

    [1] (1,2)

    NASA Exoplanet Archive TAP Documentation

    [2] (1,2)

    NASA Exoplanet Archive API Documentation

  query_criteria_async(table, get_query_payload=False, cache=None, **criteria)

    Search a table given a set of criteria or return the full table

    The syntax for these queries is described on the Exoplanet Archive TAP[Re5bd529a510c-1]_ API[Re5bd529a510c-2]_ documentation pages. In particular, the most commonly used criteria will be `select` and `where`.

    Parameters:
      table str

        The name of the table to query. A list of the tables on the Exoplanet Archive can be found on the documentation pages [1], [2].

      get_query_payload bool, optional

        Just return the dict of HTTP request parameters. Defaults to `False`.

      cache bool, optional

        Should the request result be cached? This can be useful for large repeated queries, but since the data in the archive is updated regularly, this defaults to `False`.

      **criteria

        The filtering criteria to apply. These are described in detail in the archive documentation [1], [2] but some examples include `select="*"` to return all columns of the queried table or `where=pl_name='K2-18 b'` to filter a specific column.

    Returns:
      response `requests.Response`

        The HTTP response returned from the service.

    References

    [1] (1,2)

    NASA Exoplanet Archive TAP Documentation

    [2] (1,2)

    NASA Exoplanet Archive API Documentation

  query_object(*args, **kwargs)

    Queries the service and returns a table object.

    Search the tables of confirmed exoplanets for information about a planet or planet host

    The tables available to this query are the following (more information can be found on the archive’s documentation pages [1]):

    - `ps`: This table compiles parameters derived from a multiple published references on separate rows, each row containing self-consistent values from one reference.

    - `pscomppars`: This table compiles all parameters of confirmed exoplanets from multiple, published references in one row (not all self-consistent) per object.

    Parameters:
      object_name str

        The name of the planet or star. If `regularize` is `True`, an attempt will be made to regularize this name using the `aliastable` table. Defaults to `True`.

      table[`"ps"` or `"pscomppars"`], optional

        The table to query, must be one of the supported tables: `"ps"` or `"pscomppars"`. Defaults to `"ps"`.

      get_query_payload bool, optional

        Just return the dict of HTTP request parameters. Defaults to `False`.

      cache bool, optional

        Should the request result be cached? This can be useful for large repeated queries, but since the data in the archive is updated regularly, this defaults to `False`.

      regularize bool, optional

        If `True`, the `aliastable` will be used to regularize the target name.

      **criteria

        Any other filtering criteria to apply. Values provided using the `where` keyword will be ignored.

    Returns:
      table A `Table` object.

    References

    [1]

    NASA Exoplanet Archive TAP Documentation

    [2]

    NASA Exoplanet Archive API Documentation

  query_object_async(object_name, *, table='ps', get_query_payload=False, cache=None, regularize=True, **criteria)

    Search the tables of confirmed exoplanets for information about a planet or planet host

    The tables available to this query are the following (more information can be found on the archive’s documentation pages [1]):

    - `ps`: This table compiles parameters derived from a multiple published references on separate rows, each row containing self-consistent values from one reference.

    - `pscomppars`: This table compiles all parameters of confirmed exoplanets from multiple, published references in one row (not all self-consistent) per object.

    Parameters:
      object_name str

        The name of the planet or star. If `regularize` is `True`, an attempt will be made to regularize this name using the `aliastable` table. Defaults to `True`.

      table[`"ps"` or `"pscomppars"`], optional

        The table to query, must be one of the supported tables: `"ps"` or `"pscomppars"`. Defaults to `"ps"`.

      get_query_payload bool, optional

        Just return the dict of HTTP request parameters. Defaults to `False`.

      cache bool, optional

        Should the request result be cached? This can be useful for large repeated queries, but since the data in the archive is updated regularly, this defaults to `False`.

      regularize bool, optional

        If `True`, the `aliastable` will be used to regularize the target name.

      **criteria

        Any other filtering criteria to apply. Values provided using the `where` keyword will be ignored.

    Returns:
      response `requests.Response`

        The HTTP response returned from the service.

    References

    [1]

    NASA Exoplanet Archive TAP Documentation

    [2]

    NASA Exoplanet Archive API Documentation

  query_region(*args, **kwargs)

    Queries the service and returns a table object.

    Filter a table using a cone search around specified coordinates

    Parameters:
      table str

        The name of the table to query. A list of the tables on the Exoplanet Archive can be found on the documentation pages [1], [2].

      coordinates str or `coordinates`

        The coordinates around which to query.

      radius str or `Quantity`

        The radius of the cone search. Assumed to be have units of degrees if not provided as a `Quantity`.

      get_query_payload bool, optional

        Just return the dict of HTTP request parameters. Defaults to `False`.

      cache bool, optional

        Should the request result be cached? This can be useful for large repeated queries, but since the data in the archive is updated regularly, this defaults to `False`.

      **criteria

        Any other filtering criteria to apply. These are described in detail in the archive documentation [1],[R868944752ed9-2]_ but some examples include `select="*"` to return all columns of the queried table or `where=pl_name='K2-18 b'` to filter a specific column.

    Returns:
      table A `Table` object.

    References

    [1] (1,2)

    NASA Exoplanet Archive TAP Documentation

    [2]

    NASA Exoplanet Archive API Documentation

  query_region_async(table, coordinates, radius, *, get_query_payload=False, cache=None, **criteria)

    Filter a table using a cone search around specified coordinates

    Parameters:
      table str

        The name of the table to query. A list of the tables on the Exoplanet Archive can be found on the documentation pages [1], [2].

      coordinates str or `coordinates`

        The coordinates around which to query.

      radius str or `Quantity`

        The radius of the cone search. Assumed to be have units of degrees if not provided as a `Quantity`.

      get_query_payload bool, optional

        Just return the dict of HTTP request parameters. Defaults to `False`.

      cache bool, optional

        Should the request result be cached? This can be useful for large repeated queries, but since the data in the archive is updated regularly, this defaults to `False`.

      **criteria

        Any other filtering criteria to apply. These are described in detail in the archive documentation [1],[R97e77e5c5942-2]_ but some examples include `select="*"` to return all columns of the queried table or `where=pl_name='K2-18 b'` to filter a specific column.

    Returns:
      response `requests.Response`

        The HTTP response returned from the service.

    References

    [1] (1,2)

    NASA Exoplanet Archive TAP Documentation

    [2]

    NASA Exoplanet Archive API Documentation