Skip to content

Commit 305ed6e

Browse files
committed
Fixing example outputs to make tests pass
1 parent 82e83ac commit 305ed6e

File tree

1 file changed

+84
-68
lines changed

1 file changed

+84
-68
lines changed

docs/nasa_exoplanet_archive/nasa_exoplanet_archive.rst

Lines changed: 84 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ NASA Exoplanet Archive (`astroquery.nasa_exoplanet_archive`)
77
This module can be used to query the `NASA Exoplanet Archive <https://exoplanetarchive.ipac.caltech.edu>`_ via
88
`the TAP service <https://exoplanetarchive.ipac.caltech.edu/docs/TAP/usingTAP.html>`_ or
99
`the API <https://exoplanetarchive.ipac.caltech.edu/docs/program_interfaces.html>`_.
10-
A full discussion of the available tables and query syntax through the two interfaces is available at [1]_ and [2]_.
10+
A full discussion of the available tables and query syntax through the two interfaces is available at [1]_ and [2]_.
1111
More information about the development of a more integrated NASA Exoplanet Archive and ongoing transition to
1212
fully TAP supported services can be found at [3]_.
1313

14-
*NOTE*: the ``exoplanet`` and ``exomultpars`` tables are no longer available and have been replaced by the
15-
Planetary Systems table (``ps``). Likewise, the `compositepars` table has been replaced by the
16-
Planetary Systems Composite Parameters table (``pscomppars``). Both the ``ps`` and ``pscomppars`` tables are accessible
17-
through the Exoplanet Archive TAP service. Database column names have changed;
18-
`this document <https://exoplanetarchive.ipac.caltech.edu/docs/API_PS_columns.html>`_ contains the current definitions
14+
*NOTE*: the ``exoplanet`` and ``exomultpars`` tables are no longer available and have been replaced by the
15+
Planetary Systems table (``ps``). Likewise, the `compositepars` table has been replaced by the
16+
Planetary Systems Composite Parameters table (``pscomppars``). Both the ``ps`` and ``pscomppars`` tables are accessible
17+
through the Exoplanet Archive TAP service. Database column names have changed;
18+
`this document <https://exoplanetarchive.ipac.caltech.edu/docs/API_PS_columns.html>`_ contains the current definitions
1919
and a mapping between the new and deprecated names.
2020

2121
Query methods
@@ -29,16 +29,21 @@ For example, the following query searches the ``ps`` table of confirmed exoplane
2929
>>> from astroquery.nasa_exoplanet_archive import NasaExoplanetArchive
3030
>>> NasaExoplanetArchive.query_object("K2-18 b")
3131
<QTable masked=True length=11>
32-
pl_name pl_letter hostname hd_name hip_name tic_id ... sy_hmagerr2 sy_hmagstr sy_kmag sy_kmagerr1 sy_kmagerr2 sky_coord
33-
... deg,deg
34-
str7 str1 str5 str1 str1 str13 ... float64 str18 float64 float64 float64 object
35-
------- --------- -------- ------- -------- ------------- ... ----------- ------------------ ------- ----------- ----------- --------------------
36-
K2-18 b b K2-18 TIC 388804061 ... -0.026 9.135&plusmn;0.026 8.899 0.019 -0.019 172.560141,7.5878315
37-
K2-18 b b K2-18 TIC 388804061 ... -0.026 9.135&plusmn;0.026 8.899 0.019 -0.019 172.560141,7.5878315
38-
... ... ... ... ... ... ... ... ... ... ... ... ...
39-
K2-18 b b K2-18 TIC 388804061 ... -0.026 9.135&plusmn;0.026 8.899 0.019 -0.019 172.560141,7.5878315
40-
K2-18 b b K2-18 TIC 388804061 ... -0.026 9.135&plusmn;0.026 8.899 0.019 -0.019 172.560141,7.5878315
41-
K2-18 b b K2-18 TIC 388804061 ... -0.026 9.135&plusmn;0.026 8.899 0.019 -0.019 172.560141,7.5878315
32+
pl_name pl_letter hostname ... sy_kmagerr1 sy_kmagerr2 sky_coord
33+
... deg,deg
34+
str7 str1 str5 ... float64 float64 object
35+
------- --------- -------- ... ----------- ----------- --------------------
36+
K2-18 b b K2-18 ... 0.019 -0.019 172.560141,7.5878315
37+
K2-18 b b K2-18 ... 0.019 -0.019 172.560141,7.5878315
38+
K2-18 b b K2-18 ... 0.019 -0.019 172.560141,7.5878315
39+
K2-18 b b K2-18 ... 0.019 -0.019 172.560141,7.5878315
40+
K2-18 b b K2-18 ... 0.019 -0.019 172.560141,7.5878315
41+
K2-18 b b K2-18 ... 0.019 -0.019 172.560141,7.5878315
42+
K2-18 b b K2-18 ... 0.019 -0.019 172.560141,7.5878315
43+
K2-18 b b K2-18 ... 0.019 -0.019 172.560141,7.5878315
44+
K2-18 b b K2-18 ... 0.019 -0.019 172.560141,7.5878315
45+
K2-18 b b K2-18 ... 0.019 -0.019 172.560141,7.5878315
46+
K2-18 b b K2-18 ... 0.019 -0.019 172.560141,7.5878315
4247

4348

4449
Similarly, cone searches can be executed using the `~astroquery.nasa_exoplanet_archive.NasaExoplanetArchiveClass.query_region` method:
@@ -53,12 +58,12 @@ Similarly, cone searches can be executed using the `~astroquery.nasa_exoplanet_a
5358
... table="pscomppars", coordinates=SkyCoord(ra=172.56 * u.deg, dec=7.59 * u.deg),
5459
... radius=1.0 * u.deg)
5560
<QTable masked=True length=2>
56-
pl_name pl_letter hostname hd_name hip_name tic_id ... x y z htm20 sky_coord
57-
... deg,deg
58-
str7 str1 str5 str1 str1 str13 ... float64 float64 float64 int32 object
59-
------- --------- -------- ------- -------- ------------- ... ------------------- ------------------- ------------------- ---------- --------------------
60-
K2-18 b b K2-18 TIC 388804061 ... -0.9828986469005482 0.12835161653867366 0.13204587253292302 -244884223 172.560141,7.5878315
61-
K2-18 c c K2-18 TIC 388804061 ... -0.9828986469005482 0.12835161653867366 0.13204587253292302 -244884223 172.560141,7.5878315
61+
pl_name pl_letter hostname ... htm20 sky_coord
62+
... deg,deg
63+
str7 str1 str5 ... int32 object
64+
------- --------- -------- ... ---------- --------------------
65+
K2-18 b b K2-18 ... -244884223 172.560141,7.5878315
66+
K2-18 c c K2-18 ... -244884223 172.560141,7.5878315
6267

6368

6469
The most general queries can be performed using the `~astroquery.nasa_exoplanet_archive.NasaExoplanetArchiveClass.query_criteria` method.
@@ -70,17 +75,18 @@ For example, a full table can be queried as follows:
7075
>>> from astroquery.nasa_exoplanet_archive import NasaExoplanetArchive
7176
>>> NasaExoplanetArchive.query_criteria(table="cumulative", select="*")
7277
<QTable masked=True length=9564>
73-
kepid kepoi_name kepler_name ra ra_err ra_str ... koi_srho koi_srho_err1 koi_srho_err2 koi_fittype koi_score sky_coord
74-
deg deg ... deg,deg
75-
int64 str9 str15 float64 float64 str12 ... float64 float64 float64 str7 float64 object
76-
-------- ---------- ------------ --------- ------- ------------ ... -------- ------------- ------------- ----------- --------- -------------------
77-
10797460 K00752.01 Kepler-227 b 291.93423 0.0 19h27m44.22s ... 3.20796 0.33173 -1.09986 LS+MCMC 1.0 291.93423,48.141651
78-
10797460 K00752.02 Kepler-227 c 291.93423 0.0 19h27m44.22s ... 3.02368 2.20489 -2.49638 LS+MCMC 0.969 291.93423,48.141651
79-
... ... ... ... ... ... ... ... ... ... ... ... ...
80-
10147276 K07987.01 294.16489 0.0 19h36m39.57s ... 8.97692 23.11894 -8.63287 LS+MCMC 0.021 294.16489,47.176281
81-
10155286 K07988.01 296.76288 0.0 19h47m03.09s ... 85.88623 17.31552 -41.55038 LS+MCMC 0.092 296.76288,47.145142
82-
10156110 K07989.01 297.00977 0.0 19h48m02.34s ... 1.40645 0.16166 -0.95964 LS+MCMC 0.0 297.00977,47.121021
83-
78+
kepid kepoi_name kepler_name ... koi_fittype koi_score sky_coord
79+
... deg,deg
80+
int64 str9 str15 ... str7 float64 object
81+
-------- ---------- ------------ ... ----------- --------- -------------------
82+
10797460 K00752.01 Kepler-227 b ... LS+MCMC 1.0 291.93423,48.141651
83+
10797460 K00752.02 Kepler-227 c ... LS+MCMC 0.969 291.93423,48.141651
84+
10811496 K00753.01 ... LS+MCMC 0.0 297.00482,48.134129
85+
10848459 K00754.01 ... LS+MCMC 0.0 285.53461,48.28521
86+
10854555 K00755.01 Kepler-664 b ... LS+MCMC 1.0 288.75488,48.2262
87+
... ... ... ... ... ... ...
88+
10155286 K07988.01 ... LS+MCMC 0.092 296.76288,47.145142
89+
10156110 K07989.01 ... LS+MCMC 0.0 297.00977,47.121021
8490

8591
Example queries
8692
===============
@@ -99,9 +105,9 @@ In this section, we demonstrate
99105
... where="disc_facility like '%TESS%'")
100106
<QTable masked=True length=1>
101107
count(*)
102-
int32
108+
int32
103109
--------
104-
125
110+
131
105111

106112

107113
2. The list of confirmed planets discovered by TESS and their host star coordinates:
@@ -112,17 +118,18 @@ In this section, we demonstrate
112118
>>> from astroquery.nasa_exoplanet_archive import NasaExoplanetArchive
113119
>>> NasaExoplanetArchive.query_criteria(table="pscomppars", select="pl_name,ra,dec",
114120
... where="disc_facility like '%TESS%'")
115-
<QTable masked=True length=125>
116-
pl_name ra dec sky_coord
117-
deg deg deg,deg
118-
str15 float64 float64 object
119-
------------- ----------- ----------- ----------------------
120-
WD 1856+534 b 284.415675 53.5090244 284.415675,53.5090244
121-
HD 213885 b 338.9837166 -59.864829 338.9837166,-59.864829
122-
... ... ... ...
123-
TOI-257 b 47.5172608 -50.8322632 47.5172608,-50.8322632
124-
HD 5278 b 12.5467785 -83.7437671 12.5467785,-83.7437671
125-
LHS 1478 b 44.3388743 76.5514045 44.3388743,76.5514045
121+
<QTable masked=True length=131>
122+
pl_name ra dec sky_coord
123+
deg deg deg,deg
124+
str15 float64 float64 object
125+
------------- ----------- ----------- -----------------------
126+
WD 1856+534 b 284.415675 53.5090244 284.415675,53.5090244
127+
HD 213885 b 338.9837166 -59.864829 338.9837166,-59.864829
128+
HD 219666 b 349.5592665 -56.9039857 349.5592665,-56.9039857
129+
... ... ... ...
130+
TOI-257 b 47.5172608 -50.8322632 47.5172608,-50.8322632
131+
HD 5278 b 12.5467785 -83.7437671 12.5467785,-83.7437671
132+
LHS 1478 b 44.3388743 76.5514045 44.3388743,76.5514045
126133

127134

128135
3. The list of confirmed planets discovered using microlensing that have data available in the archive:
@@ -134,16 +141,19 @@ In this section, we demonstrate
134141
>>> NasaExoplanetArchive.query_criteria(
135142
... table="pscomppars", where="discoverymethod like 'Microlensing'")
136143
<QTable masked=True length=108>
137-
pl_name pl_letter hostname hd_name hip_name ... y z htm20 sky_coord
138-
.. . deg,deg
139-
str24 str1 str22 str1 str1 ... float64 float64 int32 object
140-
--------------------- --------- ------------------- ------- -------- ... ------------------- -------------------- ----------- ----------------------
141-
OGLE-2016-BLG-1227L b b OGLE-2016-BLG-1227L ... -0.8289213204458156 -0.5557121192123485 -768415656 265.597125,-33.7597778
142-
OGLE-2015-BLG-0966L b b OGLE-2015-BLG-0966L ... -0.8740141511624064 -0.4855286069187158 2084638177 268.75425,-29.0471111
143-
... ... ... ... ... ... ... ... .. . ...
144-
OGLE-2017-BLG-0482L b b OGLE-2017-BLG-0482L ... -0.8612591541866998 -0.5079647920007812 -287458961 269.048889,-30.5283604
145-
MOA-2010-BLG-353L b b MOA-2010-BLG-353L ... -0.8884412773722796 -0.45854460452933654 -1953724135 271.303917,-27.2932333
146-
OGLE-2014-BLG-1722L c c OGLE-2014-BLG-1722L ... -0.8527200352847211 -0.5220379872608265 361334854 268.75238,-31.4690552
144+
pl_name pl_letter ... htm20 sky_coord
145+
... deg,deg
146+
str24 str1 ... int32 object
147+
--------------------- --------- ... ----------- -----------------------
148+
OGLE-2016-BLG-1227L b b ... -768415656 265.597125,-33.7597778
149+
OGLE-2015-BLG-0966L b b ... 2084638177 268.75425,-29.0471111
150+
OGLE-2017-BLG-0173L b b ... 1462336374 267.970612,-29.2713604
151+
OGLE-2017-BLG-1140L b b ... -925663673 266.883057,-24.5226669
152+
... ... ... ... ...
153+
OGLE-2012-BLG-0358L b b ... 2111594269 265.694875,-24.261
154+
OGLE-2017-BLG-0482L b b ... -287458961 269.048889,-30.5283604
155+
MOA-2010-BLG-353L b b ... -1953724135 271.303917,-27.2932333
156+
OGLE-2014-BLG-1722L c c ... 361334854 268.75238,-31.4690552
147157

148158

149159
4. The list of confirmed planets where the host star name starts with "Kepler" using a *wildcard search*:
@@ -154,17 +164,23 @@ In this section, we demonstrate
154164
>>> from astroquery.nasa_exoplanet_archive import NasaExoplanetArchive
155165
>>> NasaExoplanetArchive.query_criteria(
156166
... table="pscomppars", where="hostname like 'Kepler%'", order="hostname")
157-
<QTable masked=True length=2366>
158-
pl_name pl_letter hostname hd_name hip_name ... x y z htm20 sky_coord
159-
.. . deg,deg
160-
str14 str1 str12 str9 str9 ... float64 float64 float64 int32 object
161-
------------ --------- ---------- ------- -------- ... ------------------- ------------------- ------------------ ----------- ----------------------
162-
Kepler-10 c c Kepler-10 ... 0.17284092708557064 -0.6157551422018003 0.7687467845631883 512815427 285.679298,50.2414842
163-
Kepler-10 b b Kepler-10 ... 0.17284092708557064 -0.6157551422018003 0.7687467845631883 512815427 285.679298,50.2414842
164-
... ... ... ... ... ... ... ... ... .. . ...
165-
Kepler-997 b b Kepler-997 ... 0.2120139905204571 -0.6076812103558353 0.7653584875103029 604179197 289.2333767,49.9388952
166-
Kepler-998 b b Kepler-998 ... 0.29409419078908217 -0.5833667239066759 0.7570943616105639 1883599570 296.7541629,49.2087085
167-
Kepler-999 b b Kepler-999 ... 0.3425231804882674 -0.6014704986342327 0.7217417198007119 -1948748132 299.6604865,46.1984679
167+
<QTable masked=True length=2369>
168+
pl_name pl_letter hostname ... htm20 sky_coord
169+
... deg,deg
170+
str14 str1 str12 ... int32 object
171+
------------- --------- ----------- ... ----------- ----------------------
172+
Kepler-10 c c Kepler-10 ... 512815427 285.679298,50.2414842
173+
Kepler-10 b b Kepler-10 ... 512815427 285.679298,50.2414842
174+
Kepler-100 b b Kepler-100 ... -383871624 291.3861294,41.9901394
175+
Kepler-100 d d Kepler-100 ... -383871624 291.3861294,41.9901394
176+
Kepler-100 c c Kepler-100 ... -383871624 291.3861294,41.9901394
177+
Kepler-1000 b b Kepler-1000 ... -1745355506 286.6854729,47.0981948
178+
... ... ... ... ... ...
179+
Kepler-995 b b Kepler-995 ... -369943676 284.6157154,39.130998
180+
Kepler-996 b b Kepler-996 ... -288530943 291.9127633,41.5335891
181+
Kepler-997 b b Kepler-997 ... 604179197 289.2333767,49.9388952
182+
Kepler-998 b b Kepler-998 ... 1883599570 296.7541629,49.2087085
183+
Kepler-999 b b Kepler-999 ... -1948748132 299.6604865,46.1984679
168184

169185

170186
5. The Kepler Objects of Interest that were vetted more recently than January 24, 2015 using a *date search*:
@@ -178,7 +194,7 @@ In this section, we demonstrate
178194
... select="kepoi_name,koi_vet_date", order="koi_vet_date")
179195
<QTable length=34652>
180196
kepoi_name koi_vet_date
181-
str9 str10
197+
str9 str10
182198
---------- ------------
183199
K00866.01 2015-09-24
184200
K00867.01 2015-09-24

0 commit comments

Comments
 (0)