1
- .. doctest-skip-all
2
-
3
1
.. _astroquery.irsa :
4
2
5
3
********************************
@@ -9,7 +7,6 @@ IRSA Queries (`astroquery.irsa`)
9
7
Getting started
10
8
===============
11
9
12
-
13
10
This module can has methods to perform different types of queries on the
14
11
catalogs present in the IRSA general catalog service. All queries can be
15
12
performed by calling :meth: `~astroquery.irsa.IrsaClass.query_region `, with
@@ -18,6 +15,7 @@ supported: ``Cone``, ``Box``, ``Polygon`` and ``All-Sky``. All successful
18
15
queries return the results in a `~astropy.table.Table `. We now look at some
19
16
examples.
20
17
18
+
21
19
Available catalogs
22
20
------------------
23
21
@@ -26,10 +24,10 @@ the catalog in the IRSA database, on which the query must be performed. To take
26
24
a look at all the available catalogs:
27
25
28
26
.. code-block :: python
27
+ .. doctest-remote-data ::
29
28
30
29
>>> from astroquery.irsa import Irsa
31
- >> > Irsa.list_catalogs()
32
-
30
+ >>> Irsa.list_catalogs() # doctest: +IGNORE_OUTPUT
33
31
{'a1763t2': 'Abell 1763 Source Catalog',
34
32
'a1763t3': 'Abell 1763 MIPS 70 micron Catalog',
35
33
'acs_iphot_sep07': 'COSMOS ACS I-band photometry catalog September 2007',
@@ -44,19 +42,17 @@ This returns a dictionary of catalog names with their description. If you would
44
42
rather just print out this information:
45
43
46
44
.. code-block :: python
45
+ .. doctest-remote-data ::
47
46
48
47
>>> from astroquery.irsa import Irsa
49
48
>>> Irsa.print_catalogs()
50
-
51
- wise_allsky_2band_p1bm_frm WISE Post- Cryo Single Exposure (L1b) Image Inventory Table
52
- wise_allsky_4band_p3as_psr WISE All- Sky Reject Table
53
- cosmos_morph_col_1 COSMOS Zamojski Morphology Catalog v1.0
54
- wise_prelim_p3al_lod WISE Preliminary Release Atlas Inventory Table (Superseded)
55
- com_pccs1_100 Planck PCCS 100GHz Catalog
56
- swire_lhisod SWIRE Lockman Hole ISOCAM Deep Field Catalog
49
+ allwise_p3as_psd AllWISE Source Catalog
50
+ allwise_p3as_mep AllWISE Multiepoch Photometry Table
51
+ allwise_p3as_psr AllWISE Reject Table
57
52
...
58
- ...
59
- sdwfs_ch1_epoch3 SDWFS Aug ' 09 DR1.1 IRAC 3.6um-Selected 3x30sec Coadd, epoch 3 (Feb ' 08 )
53
+ wisegalhii WISE Catalog of Galactic HII Regions v2.2
54
+ denis3 DENIS 3rd Release (Sep. 2005)
55
+
60
56
61
57
Performing a cone search
62
58
------------------------
@@ -69,32 +65,23 @@ any appropriate unit using a `~astropy.units.Quantity` object. It may also be
69
65
entered as a string that is parsable by `~astropy.coordinates.Angle `.
70
66
71
67
.. code-block :: python
68
+ .. doctest-remote-data ::
72
69
73
70
>>> from astroquery.irsa import Irsa
74
71
>>> import astropy.units as u
75
72
>>> table = Irsa.query_region(" m31" , catalog = " fp_psc" , spatial = " Cone" ,
76
73
... radius= 2 * u.arcmin)
77
74
>>> print (table)
78
-
79
- ra dec clon clat err_maj ... j_h h_k j_k id
80
- ------ - ------ - ------------ ------------ ------ - ... ---- - ------ ------ -- -
81
- 10.685 41.248 00h42m44 .45s 41d14m52 .56s 0.14 ... 1.792 - 0.821 0.971 0
82
- 10.697 41.275 00h42m47 .39s 41d16m30 .25s 0.13 ... -- -- -- 1
83
- 10.673 41.254 00h42m41 .63s 41d15m15 .66s 0.26 ... -- 1.433 -- 2
84
- 10.671 41.267 00h42m41 .10s 41d15m59 .97s 0.17 ... -- -- -- 3
85
- 10.684 41.290 00h42m44 .11s 41d17m24 .99s 0.19 ... 0.261 - 1.484 - 1.223 4
86
- 10.692 41.290 00h42m46 .08s 41d17m24 .99s 0.18 ... -- -- 0.433 5
87
- 10.716 41.260 00h42m51 .77s 41d15m36 .31s 0.13 ... 0.65 -- -- 6
88
- 10.650 41.286 00h42m35 .96s 41d17m08 .48s 0.41 ... 1.205 -- -- 7
89
- ... ... ... ... ... ... ... ... ... ...
90
- 10.686 41.271 00h42m44 .60s 41d16m14 .16s 0.13 ... -- -- -- 768
91
- 10.694 41.277 00h42m46 .55s 41d16m36 .13s 0.27 ... -- -- -- 769
92
- 10.690 41.277 00h42m45 .71s 41d16m36 .54s 0.15 ... -- -- -- 770
93
- 10.679 41.281 00h42m42 .88s 41d16m51 .62s 0.43 ... -- -- -- 771
94
- 10.689 41.237 00h42m45 .26s 41d14m13 .32s 0.22 ... -- -- -- 772
95
- 10.661 41.274 00h42m38 .53s 41d16m24 .76s 0.18 ... -- -- -- 773
96
- 10.653 41.281 00h42m36 .78s 41d16m52 .98s 0.17 ... -- 0.795 -- 774
97
-
75
+ ra dec clon clat ... j_h h_k j_k
76
+ deg deg ...
77
+ ---------- ---------- ------------ ------------ ... ----- ------ -----
78
+ 10.684737 41.269035 00h42m44.34s 41d16m08.53s ... 0.785 0.193 0.978
79
+ 10.685657 41.269550 00h42m44.56s 41d16m10.38s ... -- -- --
80
+ ... ... ... ... ... ... ... ...
81
+ 10.702501 41.299492 00h42m48.60s 41d17m58.17s ... -- -- --
82
+ 10.728661 41.273312 00h42m54.88s 41d16m23.92s ... -- -- --
83
+ 10.728869 41.265533 00h42m54.93s 41d15m55.92s ... 0.803 0.613 1.416
84
+ Length = 500 rows
98
85
99
86
100
87
The coordinates of the center may be specified rather than using the target
@@ -103,6 +90,7 @@ name. The coordinates can be specified using the appropriate
103
90
a string, as specified by `astropy.coordinates `:
104
91
105
92
.. code-block :: python
93
+ .. doctest-remote-data ::
106
94
107
95
>>> from astroquery.irsa import Irsa
108
96
>>> import astropy.coordinates as coord
@@ -111,6 +99,17 @@ a string, as specified by `astropy.coordinates`:
111
99
... frame= ' galactic' ),
112
100
... catalog= ' fp_psc' , radius= ' 0d2m0s' )
113
101
>>> print (table)
102
+ ra dec clon clat ... angle j_h h_k j_k
103
+ deg deg ... deg
104
+ ---------- ---------- ------------ ------------ ... ---------- ----- ----- -----
105
+ 10.684737 41.269035 00h42m44.34s 41d16m08.53s ... 10.37715 0.785 0.193 0.978
106
+ 10.683469 41.268585 00h42m44.03s 41d16m06.91s ... 259.028985 -- -- --
107
+ 10.685657 41.269550 00h42m44.56s 41d16m10.38s ... 43.199247 -- -- --
108
+ ... ... ... ... ... ... ... ... ...
109
+ 10.656898 41.294655 00h42m37.66s 41d17m40.76s ... 321.14224 1.237 -- --
110
+ 10.647116 41.286366 00h42m35.31s 41d17m10.92s ... 301.969315 -- -- --
111
+ Length = 500 rows
112
+
114
113
115
114
Performing a box search
116
115
-----------------------
@@ -122,29 +121,26 @@ for cone search queries, above - so it may be set using the appropriate
122
121
`~astropy.units.Quantity ` object or a string parsable by `~astropy.coordinates.Angle `.
123
122
124
123
.. code-block :: python
124
+ .. doctest-remote-data ::
125
125
126
126
>>> from astroquery.irsa import Irsa
127
127
>>> import astropy.units as u
128
128
>>> table = Irsa.query_region(" 00h42m44.330s +41d16m07.50s" ,
129
129
... catalog= ' fp_psc' , spatial= ' Box' ,
130
130
... width= 5 * u.arcsec)
131
-
132
- WARNING : Coordinate string is being interpreted as an ICRS
133
- coordinate. [astroquery.irsa.core]
134
-
135
131
>>> print (table)
136
-
137
- ra dec clon clat err_maj ... j_h h_k j_k id
138
- ------ - ------ - ------------ ------------ ------ - ... ---- - ---- - ---- - -- -
139
- 10.685 41.269 00h42m44 .34s 41d16m08 .53s 0.08 ... 0.785 0.193 0.978 0
132
+ ra dec clon clat ... ext_key j_h h_k j_k
133
+ deg deg ...
134
+ ---------- ---------- ------------ ------------ ... ------- ----- ----- -- ---
135
+ 10.684737 41.269035 00h42m44.34s 41d16m08.53s ... -- 0.785 0.193 0.978
140
136
141
137
Note that in this case we directly passed ICRS coordinates as a string to the
142
138
:meth: `~astroquery.irsa.IrsaClass.query_region `.
143
139
140
+
144
141
Queries over a polygon
145
142
----------------------
146
143
147
-
148
144
Polygon queries can be performed by setting ``spatial='Polygon' ``. The search
149
145
center is optional in this case. One additional parameter that must be set for
150
146
these queries is ``polygon ``. This is a list of coordinate pairs that define a
@@ -157,6 +153,7 @@ tuples, each tuple containing the ra and dec values in degrees. Each of these
157
153
options is illustrated below:
158
154
159
155
.. code-block :: python
156
+ .. doctest-remote-data ::
160
157
161
158
>>> from astroquery.irsa import Irsa
162
159
>>> from astropy import coordinates
@@ -166,56 +163,68 @@ options is illustrated below:
166
163
... coordinates.SkyCoord(ra = 10.0 , dec = 10.0 , unit = (u.deg, u.deg), frame = ' icrs' )
167
164
... ])
168
165
>>> print (table)
169
-
170
- ra dec clon clat err_maj ... j_h h_k j_k id
171
- ------ - ------ - ------------ ------------ ------ - ... ---- - ---- - ---- - -- -
172
- 10.016 10.099 00h40m03 .77s 10d05m57 .22s 0.1 ... 0.602 0.154 0.756 0
173
- 10.031 10.063 00h40m07 .44s 10d03m47 .10s 0.19 ... 0.809 0.291 1.1 1
174
- 10.037 10.060 00h40m08 .83s 10d03m37 .00s 0.11 ... 0.468 0.372 0.84 2
175
- 10.060 10.085 00h40m14 .39s 10d05m07 .60s 0.23 ... 0.697 0.273 0.97 3
176
- 10.016 10.038 00h40m03 .80s 10d02m17 .02s 0.09 ... 0.552 0.313 0.865 4
177
- 10.011 10.094 00h40m02 .68s 10d05m38 .05s 0.23 ... 0.378 0.602 0.98 5
178
- 10.006 10.018 00h40m01 .33s 10d01m06 .24s 0.16 ... 0.662 0.566 1.228 6
166
+ ra dec clon clat ... ext_key j_h h_k j_k
167
+ deg deg ...
168
+ ---------- ---------- ------------ ------------ ... ------- ----- ----- -- ---
169
+ 10.015839 10.038061 00h40m03.80s 10d02m17.02s ... -- 0.552 0.313 0.865
170
+ 10.015696 10.099228 00h40m03.77s 10d05m57.22s ... -- 0.602 0.154 0.756
171
+ 10.011170 10.093903 00h40m02.68s 10d05m38.05s ... -- 0.378 0.602 0.98
172
+ 10.031016 10.063082 00h40m07.44s 10d03m47.10s ... -- 0.809 0.291 1.1
173
+ 10.036776 10.060278 00h40m08.83s 10d03m37.00s ... -- 0.468 0.372 0.84
174
+ 10.059964 10.085445 00h40m14.39s 10d05m07.60s ... -- 0.697 0.273 0.97
175
+ 10.005549 10.018401 00h40m01.33s 10d01m06.24s ... -- 0.662 0.566 1.228
179
176
180
177
Another way to specify the polygon is directly as a list of tuples - each tuple
181
178
is an ra, dec pair expressed in degrees:
182
179
183
180
.. code-block :: python
181
+ .. doctest-remote-data ::
184
182
185
183
>>> from astroquery.irsa import Irsa
186
184
>>> table = Irsa.query_region(" m31" , catalog = " fp_psc" , spatial = " Polygon" ,
187
185
... polygon = [(10.1 , 10.1 ), (10.0 , 10.1 ), (10.0 , 10.0 )])
188
186
>>> print (table)
187
+ ra dec clon clat ... ext_key j_h h_k j_k
188
+ deg deg ...
189
+ ---------- ---------- ------------ ------------ ... ------- ----- ----- -----
190
+ 10.015839 10.038061 00h40m03.80s 10d02m17.02s ... -- 0.552 0.313 0.865
191
+ 10.015696 10.099228 00h40m03.77s 10d05m57.22s ... -- 0.602 0.154 0.756
192
+ 10.011170 10.093903 00h40m02.68s 10d05m38.05s ... -- 0.378 0.602 0.98
193
+ 10.031016 10.063082 00h40m07.44s 10d03m47.10s ... -- 0.809 0.291 1.1
194
+ 10.036776 10.060278 00h40m08.83s 10d03m37.00s ... -- 0.468 0.372 0.84
195
+ 10.059964 10.085445 00h40m14.39s 10d05m07.60s ... -- 0.697 0.273 0.97
196
+ 10.005549 10.018401 00h40m01.33s 10d01m06.24s ... -- 0.662 0.566 1.228
189
197
190
- ra dec clon clat err_maj ... j_h h_k j_k id
191
- ------ - ------ - ------------ ------------ ------ - ... ---- - ---- - ---- - -- -
192
- 10.016 10.099 00h40m03 .77s 10d05m57 .22s 0.1 ... 0.602 0.154 0.756 0
193
- 10.031 10.063 00h40m07 .44s 10d03m47 .10s 0.19 ... 0.809 0.291 1.1 1
194
- 10.037 10.060 00h40m08 .83s 10d03m37 .00s 0.11 ... 0.468 0.372 0.84 2
195
- 10.060 10.085 00h40m14 .39s 10d05m07 .60s 0.23 ... 0.697 0.273 0.97 3
196
- 10.016 10.038 00h40m03 .80s 10d02m17 .02s 0.09 ... 0.552 0.313 0.865 4
197
- 10.011 10.094 00h40m02 .68s 10d05m38 .05s 0.23 ... 0.378 0.602 0.98 5
198
- 10.006 10.018 00h40m01 .33s 10d01m06 .24s 0.16 ... 0.662 0.566 1.228 6
199
198
200
199
Selecting Columns
201
200
--------------------
202
201
203
- The IRSA service allows to query either a subset of the default columns for a given table, or additional columns that are not present by default. This can be done by listing all the required columns separated by a comma (,) in a string with the ``selcols `` argument.
202
+ The IRSA service allows to query either a subset of the default columns for
203
+ a given table, or additional columns that are not present by default. This
204
+ can be done by listing all the required columns separated by a comma (,) in
205
+ a string with the ``selcols `` argument.
206
+
207
+
208
+ An example where the AllWISE Source Catalog needs to be queried around the
209
+ star HIP 12 with just the ra, dec and w1mpro columns would be:
204
210
205
- An example where the AllWISE Source Catalog needs to be queried around the star HIP 12 with just the ra, dec and w1mpro columns would be:
206
211
207
212
.. code-block :: python
213
+ .. doctest-remote-data ::
208
214
209
215
>>> from astroquery.irsa import Irsa
210
216
>>> table = Irsa.query_region(" HIP 12" , catalog = " allwise_p3as_psd" , spatial = " Cone" , selcols = " ra,dec,w1mpro" )
211
217
>>> print (table)
218
+ ra dec clon clat w1mpro dist angle
219
+ deg deg mag arcsec deg
220
+ ----------- ----------- ------------ ------------- ------- -------- ----------
221
+ 0.0407905 -35.9602605 00h00m09.79s -35d57m36.94s 4.837 0.350806 245.442148
212
222
213
- ra dec clon clat w1mpro dist angle id
214
- deg deg mag arcsec deg
215
- ------ - ------ - ------------ ------------ - ------ -------- ---------- -- -
216
- 0.041 - 35.960 00h00m09 .79s - 35d57m36 .94s 4.837 0.350806 245.442148 0
223
+ A list of available columns for each catalog can be found at
224
+ https://irsa.ipac.caltech.edu/holdings/catalogs.html. The "Long Form" button
225
+ at the top of the column names table must be clicked to access a full list
226
+ of all available columns.
217
227
218
- A list of available columns for each catalog can be found at https://irsa.ipac.caltech.edu/holdings/catalogs.html. The "Long Form" button at the top of the column names table must be clicked to access a full list of all available columns.
219
228
220
229
Changing the precision of ascii output
221
230
--------------------------------------
@@ -227,17 +236,18 @@ is written in ``ascii.ipac`` or ``ascii.csv`` formats. The ``.format`` attribute
227
236
individual columns may be set to increase the precision.
228
237
229
238
.. code-block :: python
239
+ .. doctest-remote-data ::
230
240
231
241
>>> from astroquery.irsa import Irsa
232
242
>>> table = Irsa.query_region(" HIP 12" , catalog = " allwise_p3as_psd" , spatial = " Cone" , selcols = " ra,dec,w1mpro" )
233
243
>>> table[' ra' ].format = ' {:10.6f } '
234
244
>>> table[' dec' ].format = ' {:10.6f } '
235
245
>>> print (table)
246
+ ra dec clon clat w1mpro dist angle
247
+ deg deg mag arcsec deg
248
+ ---------- ---------- ------------ ------------- ------- -------- ----------
249
+ 0.040791 -35.960260 00h00m09.79s -35d57m36.94s 4.837 0.350806 245.442148
236
250
237
- ra dec clon clat w1mpro dist angle id
238
- deg deg mag arcs deg
239
- ---------- - ---------- - ------------ ------------ - ------ -------- ---------- -- -
240
- 0.0407905 - 35.9602605 00h00m09 .79s - 35d57m36 .94s 4.837 0.350806 245.442148 0
241
251
242
252
Other Configurations
243
253
--------------------
@@ -249,7 +259,7 @@ change the setting only for the ongoing python session, you could also do:
249
259
.. code-block :: python
250
260
251
261
>> > from astroquery.irsa import Irsa
252
- >> > Irsa.ROW_LIMIT = 1000 # value of new row limit here.
262
+ >> > Irsa.ROW_LIMIT = 1000 # 1000 is the new value for row limit here.
253
263
254
264
255
265
Reference/API
0 commit comments