NasaExoplanetArchiveClass¶
-
class
astroquery.nasa_exoplanet_archive.
NasaExoplanetArchiveClass
[source]¶ Bases:
astroquery.query.BaseQuery
The interface for querying the NASA Exoplanet Archive API
A full discussion of the available tables and query syntax is available on the documentation page.
Attributes Summary
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 global tables for information about a confirmed planet or planet host
query_planet
(planet_name[, cache, regularize])Deprecated since version v0.4.1.
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
query_star
(host_name[, cache, regularize])Deprecated since version v0.4.1.
Attributes Documentation
-
CACHE
= False¶
-
TIMEOUT
= 600¶
-
URL
= 'https://exoplanetarchive.ipac.caltech.edu/cgi-bin/nstedAPI/nph-nstedAPI'¶
Methods Documentation
-
query_aliases
(object_name, *, cache=None)[source]¶ Search for aliases for a given confirmed planet or planet host
- Parameters
- object_namestr
The name of a planet or star to regularize using the
aliastable
table.- cachebool, 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
- responselist
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 API documentation page [1]. In particular, the most commonly used criteria will be
select
andwhere
.- Parameters
- tablestr
The name of the table to query. A list of the tables on the Exoplanet Archive can be found on the documentation page [1].
- get_query_payloadbool, optional
Just return the dict of HTTP request parameters. Defaults to
False
.- cachebool, 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], but some examples include
select="*"
to return all columns of the queried table orwhere=pl_name='K2-18 b'
to filter a specific column.
- Returns
- tableA
Table
object.
- tableA
References
-
query_criteria_async
(table, get_query_payload=False, cache=None, **criteria)[source]¶ Search a table given a set of criteria or return the full table
The syntax for these queries is described on the Exoplanet Archive API documentation page [1]. In particular, the most commonly used criteria will be
select
andwhere
.- Parameters
- tablestr
The name of the table to query. A list of the tables on the Exoplanet Archive can be found on the documentation page [1].
- get_query_payloadbool, optional
Just return the dict of HTTP request parameters. Defaults to
False
.- cachebool, 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], but some examples include
select="*"
to return all columns of the queried table orwhere=pl_name='K2-18 b'
to filter a specific column.
- Returns
- response
requests.Response
The HTTP response returned from the service.
- response
References
-
query_object
(*args, **kwargs)¶ Queries the service and returns a table object.
Search the global tables for information about a confirmed planet or planet host
The tables available to this query are the following (more information can be found on the archive’s documentation page [1]):
exoplanets
: This table contains parameters derived from a single, published reference that are designated as the archive’s default parameter set.compositepars
: This table contains a full set of parameters compiled from multiple, published references.exomultpars
: This table includes all sets of planet and stellar parameters for confirmed planets and hosts in the archive.
- Parameters
- object_namestr
The name of the planet or star. If
regularize
isTrue
, an attempt will be made to regularize this name using thealiastable
table.- table[
"exoplanets"
,"compositepars"
, or"exomultpars"
], optional The table to query, must be one of the supported tables:
"exoplanets"
,"compositepars"
, or"exomultpars"
. Defaults to"exoplanets"
.- get_query_payloadbool, optional
Just return the dict of HTTP request parameters. Defaults to
False
.- cachebool, 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
.- regularizebool, optional
If
True
, thealiastable
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
- tableA
Table
object.
- tableA
References
-
query_object_async
(object_name, *, table='exoplanets', get_query_payload=False, cache=None, regularize=True, **criteria)[source]¶ Search the global tables for information about a confirmed planet or planet host
The tables available to this query are the following (more information can be found on the archive’s documentation page [1]):
exoplanets
: This table contains parameters derived from a single, published reference that are designated as the archive’s default parameter set.compositepars
: This table contains a full set of parameters compiled from multiple, published references.exomultpars
: This table includes all sets of planet and stellar parameters for confirmed planets and hosts in the archive.
- Parameters
- object_namestr
The name of the planet or star. If
regularize
isTrue
, an attempt will be made to regularize this name using thealiastable
table.- table[
"exoplanets"
,"compositepars"
, or"exomultpars"
], optional The table to query, must be one of the supported tables:
"exoplanets"
,"compositepars"
, or"exomultpars"
. Defaults to"exoplanets"
.- get_query_payloadbool, optional
Just return the dict of HTTP request parameters. Defaults to
False
.- cachebool, 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
.- regularizebool, optional
If
True
, thealiastable
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.
- response
References
-
query_planet
(planet_name, cache=None, regularize=True, **criteria)[source]¶ Deprecated since version v0.4.1: The query_planet function is deprecated and may be removed in a future version. Use query_object instead.
Search the
exoplanets
table for a confirmed planet- Parameters
- planet_namestr
The name of a confirmed planet. If
regularize
isTrue
, an attempt will be made to regularize this name using thealiastable
table.- cachebool, 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
.- regularizebool, optional
If
True
, thealiastable
will be used to regularize the target name.- **criteria
Any other filtering criteria to apply. Values provided using the
where
keyword will be ignored.
-
query_region
(*args, **kwargs)¶ Queries the service and returns a table object.
Filter a table using a cone search around specified coordinates
- Parameters
- tablestr
The name of the table to query. A list of the tables on the Exoplanet Archive can be found on the documentation page [1].
- coordinatesstr or
coordinates
The coordinates around which to query.
- radiusstr or
Quantity
The radius of the cone search. Assumed to be have units of degrees if not provided as a
Quantity
.- get_query_payloadbool, optional
Just return the dict of HTTP request parameters. Defaults to
False
.- cachebool, 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], but some examples include
select="*"
to return all columns of the queried table orwhere=pl_name='K2-18 b'
to filter a specific column.
- Returns
- tableA
Table
object.
- tableA
References
-
query_region_async
(table, coordinates, radius, *, get_query_payload=False, cache=None, **criteria)[source]¶ Filter a table using a cone search around specified coordinates
- Parameters
- tablestr
The name of the table to query. A list of the tables on the Exoplanet Archive can be found on the documentation page [1].
- coordinatesstr or
coordinates
The coordinates around which to query.
- radiusstr or
Quantity
The radius of the cone search. Assumed to be have units of degrees if not provided as a
Quantity
.- get_query_payloadbool, optional
Just return the dict of HTTP request parameters. Defaults to
False
.- cachebool, 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], but some examples include
select="*"
to return all columns of the queried table orwhere=pl_name='K2-18 b'
to filter a specific column.
- Returns
- response
requests.Response
The HTTP response returned from the service.
- response
References
-
query_star
(host_name, cache=None, regularize=True, **criteria)[source]¶ Deprecated since version v0.4.1: The query_star function is deprecated and may be removed in a future version. Use query_object instead.
Search the
exoplanets
table for a confirmed planet host- Parameters
- host_namestr
The name of a confirmed planet host. If
regularize
isTrue
, an attempt will be made to regularize this name using thealiastable
table.- cachebool, 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
.- regularizebool, optional
If
True
, thealiastable
will be used to regularize the target name.- **criteria
Any other filtering criteria to apply. Values provided using the
where
keyword will be ignored.
-