@@ -161,7 +161,7 @@ is an ra, dec pair expressed in degrees:
161
161
10.005549 10.018401 0.16 0.14 ... 1443005 91 4805087784811171840
162
162
163
163
Selecting Columns
164
- --------------------
164
+ -----------------
165
165
166
166
The IRSA service allows to query either a subset of the default columns for
167
167
a given table, or additional columns that are not present by default. This
@@ -188,27 +188,36 @@ https://irsa.ipac.caltech.edu/holdings/catalogs.html. The "Long Form" button
188
188
at the top of the column names table must be clicked to access a full list
189
189
of all available columns.
190
190
191
+ Direct TAP query to the IRSA server
192
+ -----------------------------------
191
193
192
- Changing the precision of ascii output
193
- --------------------------------------
194
-
195
- The precision of the table display of each column is set upstream by the archive,
196
- and appears as the ``.format `` attribute of individual columns. This attribute affects
197
- not only the display of columns, but also the precision that is output when the table
198
- is written in ``ascii.ipac `` or ``ascii.csv `` formats. The ``.format `` attribute of
199
- individual columns may be set to increase the precision.
194
+ The `~astroquery.ipac.irsa.IrsaClass.query_tap ` method allows for a rich variety of queries. ADQL queries
195
+ provided via the ``query `` parameter is sent directly to the IRSA TAP server, and the result is
196
+ returned as a `~pyvo.dal.TAPResults ` object. Its ``to_table `` or ``to_qtable `` method convert the result to a
197
+ `~astropy.table.Table ` or `~astropy.table.QTable ` object.
200
198
201
199
.. doctest-remote-data ::
202
200
203
201
>>> from astroquery.ipac.irsa import Irsa
204
- >>> table = Irsa.query_region(" HIP 12" , catalog = " allwise_p3as_psd" , spatial = " Cone" , columns = " ra,dec,w1mpro" )
205
- >>> table[' ra' ].format = ' {:10.6f } '
206
- >>> table[' dec' ].format = ' {:10.6f } '
207
- >>> print (table)
208
- ra dec w1mpro
209
- deg deg mag
210
- ---------- ---------- -------
211
- 0.040791 -35.960260 4.837
202
+ >>> query = (" SELECT TOP 10 ra,dec,j_m,j_msigcom,h_m,h_msigcom,k_m,k_msigcom,ph_qual,cc_flg "
203
+ ... " FROM fp_psc WHERE CONTAINS(POINT('ICRS',ra, dec), CIRCLE('ICRS',202.48417,47.23056,0.4))=1" )
204
+ >>> results = Irsa.query_tap(query = query).to_qtable() # doctest: +IGNORE_WARNINGS
205
+ >>> results
206
+ <QTable length=10>
207
+ ra dec j_m j_msigcom ... k_m k_msigcom ph_qual cc_flg
208
+ deg deg mag mag ... mag mag
209
+ float64 float64 float32 float32 ... float32 float32 object object
210
+ ---------- ---------- ------- --------- ... ------- --------- ------- ------
211
+ 202.900750 46.961285 16.168 0.096 ... 15.180 0.158 ABC 000
212
+ 202.951614 47.024986 15.773 0.072 ... 15.541 0.234 ABD 000
213
+ 202.922589 47.024452 14.628 0.032 ... 14.036 0.059 AAA 000
214
+ 202.911833 47.011093 13.948 0.025 ... 13.318 0.036 AAA 000
215
+ 202.925932 47.004223 16.461 0.131 ... 17.007 ——— BCU 000
216
+ 202.515450 46.929302 15.967 0.088 ... 15.077 0.140 AAB 000
217
+ 202.532240 46.931587 16.575 0.145 ... 15.888 ——— BDU 000
218
+ 202.607930 46.932255 16.658 0.147 ... 15.430 0.193 BUC 000
219
+ 202.823902 47.011593 16.555 0.143 ... 16.136 ——— BBU 000
220
+ 202.809023 46.964558 15.874 0.081 ... 15.322 0.188 AAC 000
212
221
213
222
214
223
Other Configurations
0 commit comments