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_name : str
The name of a planet or star to regularize using the
aliastable
table.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 API documentation page [R15]. In particular, the most commonly used criteria will be
select
andwhere
.- 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 page [R15].
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 [R15], 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
table : A
Table
object.
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 [R16]. In particular, the most commonly used criteria will be
select
andwhere
.- 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 page [R16].
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 [R16], 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.
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 [R17]):
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_name : str
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"
], optionalThe table to query, must be one of the supported tables:
"exoplanets"
,"compositepars"
, or"exomultpars"
. Defaults to"exoplanets"
.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
, 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
table : A
Table
object.
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 [R18]):
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_name : str
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"
], optionalThe table to query, must be one of the supported tables:
"exoplanets"
,"compositepars"
, or"exomultpars"
. Defaults to"exoplanets"
.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
, 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.
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_name : str
The name of a confirmed planet. If
regularize
isTrue
, an attempt will be made to regularize this name using thealiastable
table.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
, 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
table : str
The name of the table to query. A list of the tables on the Exoplanet Archive can be found on the documentation page [R19].
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 [R19], 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
table : A
Table
object.
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
table : str
The name of the table to query. A list of the tables on the Exoplanet Archive can be found on the documentation page [R20].
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 [R20], 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.
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_name : str
The name of a confirmed planet host. If
regularize
isTrue
, an attempt will be made to regularize this name using thealiastable
table.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
, 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.
-