1
- .. doctest-skip-all
2
-
3
1
.. _astroquery.esasky :
4
2
5
3
************************************
@@ -23,13 +21,16 @@ Get the available catalog names
23
21
If you know the names of all the available catalogs you can use :meth: `~astroquery.esasky.ESASkyClass.list_catalogs `:
24
22
25
23
.. code-block :: python
24
+ .. doctest-remote-data ::
26
25
27
26
>>> from astroquery.esasky import ESASky
28
27
>>> catalog_list = ESASky.list_catalogs()
29
- >> > print (catalog_list)
30
- [' LAMOST' , ' AllWise' , ' AKARI-IRC-SC' , ' TwoMASS' , ' INTEGRAL' , ' CHANDRA-SC2' , ' XMM-EPIC-STACK' , ' XMM-EPIC' , ' XMM-OM' ,
31
- ' XMM-SLEW' , ' Tycho-2' , ' Gaia-eDR3' , ' Hipparcos-2' , ' HSC' , ' Herschel-HPPSC-070' , ' Herschel-HPPSC-100' ,
32
- ' Herschel-HPPSC-160' , ' Herschel-SPSC-250' , ' Herschel-SPSC-350' , ' Herschel-SPSC-500' , ' Planck-PGCC' ,
28
+ >>> print (catalog_list) # doctest: +IGNORE_OUTPUT
29
+ ['LAMOST', 'AllWise', 'AKARI-IRC-SC', 'TwoMASS', 'INTEGRAL',
30
+ 'CHANDRA-SC2', 'XMM-EPIC-STACK', 'XMM-EPIC', 'XMM-OM', 'XMM-SLEW',
31
+ 'Tycho-2', 'Gaia-eDR3', 'Hipparcos-2', 'HSC', 'Herschel-HPPSC-070',
32
+ 'Herschel-HPPSC-100', 'Herschel-HPPSC-160', 'Herschel-SPSC-250',
33
+ 'Herschel-SPSC-350', 'Herschel-SPSC-500','Planck-PGCC',
33
34
'Planck-PCCS2E-HFI', 'Planck-PCCS2-HFI', 'Planck-PCCS2-LFI', 'Planck-PSZ2']
34
35
35
36
Get the available maps mission names
@@ -38,10 +39,12 @@ Get the available maps mission names
38
39
If you know the names of all the available maps missions you can use :meth: `~astroquery.esasky.ESASkyClass.list_maps `:
39
40
40
41
.. code-block :: python
42
+ .. doctest-remote-data ::
41
43
42
44
>>> maps_list = ESASky.list_maps()
43
- >> > print (maps_list)
44
- [' INTEGRAL' , ' XMM' , ' Chandra' , ' SUZAKU' , ' XMM-OM-OPTICAL' , ' XMM-OM-UV' , ' HST-UV' , ' HST-OPTICAL' , ' HST-IR' , ' ISO-IR' ,
45
+ >>> print (maps_list) # doctest: +IGNORE_OUTPUT
46
+ ['INTEGRAL', 'XMM', 'Chandra', 'SUZAKU', 'XMM-OM-OPTICAL',
47
+ 'XMM-OM-UV', 'HST-UV', 'HST-OPTICAL', 'HST-IR', 'ISO-IR',
45
48
'Herschel', 'AKARI', 'Spitzer', 'ALMA']
46
49
47
50
Get the available spectra mission names
@@ -50,10 +53,12 @@ Get the available spectra mission names
50
53
If you know the names of all the available spectra you can use :meth: `~astroquery.esasky.ESASkyClass.list_spectra `:
51
54
52
55
.. code-block :: python
56
+ .. doctest-remote-data ::
53
57
54
58
>>> spectra_list = ESASky.list_spectra()
55
- >> > print (spectra_list)
56
- [' XMM-NEWTON' , ' Chandra' , ' IUE' , ' HST-UV' , ' HST-OPTICAL' , ' HST-IR' , ' ISO-IR' , ' Herschel' , ' LAMOST' ]
59
+ >>> print (spectra_list) # doctest: +IGNORE_OUTPUT
60
+ ['XMM-NEWTON', 'Chandra', 'IUE', 'HST-UV', 'HST-OPTICAL',
61
+ 'HST-IR', 'ISO-IR', 'Herschel', 'LAMOST']
57
62
58
63
Get the available SSO mission names
59
64
-----------------------------------
@@ -67,6 +72,7 @@ If you know the names of all the available missions with SSO cross match data, y
67
72
>> > print (sso_list)
68
73
[' Herschel' , ' HST' , ' XMM' ]
69
74
75
+
70
76
Query an object
71
77
---------------
72
78
@@ -82,6 +88,7 @@ row_limit parameter. You can set the parameter to -1, which will result in the m
82
88
For instance to query an object around M51 in the Hubble catalog:
83
89
84
90
.. code-block :: python
91
+ .. doctest-remote-data ::
85
92
86
93
>>> from astroquery.esasky import ESASky
87
94
>>> result = ESASky.query_object_catalogs(position = " M51" , missions = " HSC" )
@@ -91,19 +98,21 @@ So the above query may also be written as:
91
98
92
99
.. code-block :: python
93
100
94
- >> > result = ESASky.query_object_catalogs(position = " M51" , missions = [" HSC" , " XMM-OM" ])
101
+ >> > result = ESASky.query_object_catalogs(position = " M51" , missions = [" HSC" , " XMM-OM" ]) # doctest: +REMOTE_DATA
95
102
96
103
To search in all available catalogs you can write ``"all" `` instead of a catalog name. The same thing will happen if you
97
104
don't write any catalog name.
98
105
99
106
.. code-block :: python
107
+ .. doctest-remote-data ::
100
108
101
109
>>> result = ESASky.query_object_catalogs(position = " M51" , missions = " all" )
102
110
>>> result = ESASky.query_object_catalogs(position = " M51" )
103
111
104
112
To see the result:
105
113
106
114
.. code-block :: python
115
+ .. doctest-remote-data ::
107
116
108
117
>>> print (result)
109
118
TableList with 9 tables:
@@ -124,6 +133,7 @@ name.
124
133
To access an individual table from the `~astroquery.utils.TableList ` object
125
134
126
135
.. code-block :: python
136
+ .. doctest-remote-data ::
127
137
128
138
>>> interesting_table = result[' ALLWISE' ]
129
139
>>> print (interesting_table)
@@ -136,6 +146,7 @@ To do some common processing to all the tables in the returned `~astroquery.util
136
146
for loop:
137
147
138
148
.. code-block :: python
149
+ .. doctest-remote-data ::
139
150
140
151
>>> for table in result:
141
152
... colnames = table.colnames
@@ -147,6 +158,7 @@ As mentioned earlier, :meth:`astroquery.esasky.ESASkyClass.query_object_maps` an
147
158
that contain the chosen object or coordinate. To execute the same command as above you write this:
148
159
149
160
.. code-block :: python
161
+ .. doctest-remote-data ::
150
162
151
163
>>> result = ESASky.query_object_maps(position = " M51" , missions = " all" )
152
164
>>> result = ESASky.query_object_spectra(position = " M51" , missions = " all" )
@@ -166,6 +178,7 @@ To query a region either the coordinates or the object name around which to quer
166
178
value for the radius of the region. For instance to query region around M51 in the HSC catalog:
167
179
168
180
.. code-block :: python
181
+ .. doctest-remote-data ::
169
182
170
183
>>> from astroquery.esasky import ESASky
171
184
>>> import astropy.units as u
@@ -175,19 +188,21 @@ Note that the catalog may also be specified as a list. So the above query may al
175
188
176
189
.. code-block :: python
177
190
178
- >> > result = ESASky.query_region_catalogs(position = " M51" , radius = 10 * u.arcmin, catalogs = [" HSC" , " XMM-OM" ])
191
+ >> > result = ESASky.query_region_catalogs(position = " M51" , radius = 10 * u.arcmin, catalogs = [" HSC" , " XMM-OM" ]) # doctest: +REMOTE_DATA
179
192
180
193
To search in all available catalogs you can write ``"all" `` instead of a catalog name. The same thing will happen if you
181
194
don't write any catalog name.
182
195
183
196
.. code-block :: python
197
+ .. doctest-remote-data ::
184
198
185
199
>>> result = ESASky.query_region_catalogs(position = " M51" , radius = 10 * u.arcmin, catalogs = " all" )
186
200
>>> result = ESASky.query_region_catalogs(position = " M51" , radius = 10 * u.arcmin)
187
201
188
202
In the same manner, the radius can be specified with either a string or any `~astropy.units.Quantity `
189
203
190
204
.. code-block :: python
205
+ .. doctest-remote-data ::
191
206
192
207
>>> result = ESASky.query_region_catalogs(position = " M51" , radius = " 10 arcmin" )
193
208
@@ -234,6 +249,7 @@ If you already know the observation ID's or source names of interest, you can ge
234
249
:meth: `~astroquery.esasky.ESASkyClass.query_ids_spectra `
235
250
236
251
.. code-block :: python
252
+ .. doctest-remote-data ::
237
253
238
254
>>> maps = ESASky.query_ids_maps(observation_ids = [" lbsk03vbq" , " ieag90010" ], missions = " HST-UV" )
239
255
>>> catalogs = ESASky.query_ids_catalogs(source_ids = [" 2CXO J090341.1-322609" , " 2CXO J090353.8-322642" ,
@@ -257,15 +273,15 @@ The method returns a `dict` to separate the different missions. All mission exce
257
273
HDUList is the value.
258
274
259
275
.. code-block :: python
276
+ .. doctest-remote-data ::
260
277
261
278
>>> from astroquery.esasky import ESASky
262
- >> > images = ESASky.get_images(position = " m51" , radius = " 20 arcmin" , missions = [' Herschel' , ' ISO-IR' ])
279
+ >>> images = ESASky.get_images(position = " m51" , radius = " 20 arcmin" , missions = [' Herschel' , ' ISO-IR' ]) # doctest: +IGNORE_OUTPUT
263
280
Starting download of HERSCHEL data. (25 files)
264
281
Downloading Observation ID: 1342188589 from http://archives.esac.esa.int/hsa/whsa-tap-server/data?RETRIEVAL_TYPE=STANDALONE&observation_oid=8618001&DATA_RETRIEVAL_ORIGIN=UI [Done]
265
282
Downloading Observation ID: 1342188328 from http://archives.esac.esa.int/hsa/whsa-tap-server/data?RETRIEVAL_TYPE=STANDALONE&observation_oid=8637833&DATA_RETRIEVAL_ORIGIN=UI
266
283
...
267
-
268
- >> > print (images)
284
+ >>> print (images) # doctest: +IGNORE_OUTPUT
269
285
{
270
286
'HERSCHEL': [{'70': [HDUList], '160': HDUList}, {'70': HDUList, '160': HDUList}, ...],
271
287
'ISO' : [HDUList, HDUList, HDUList, HDUList, ...]
@@ -276,6 +292,8 @@ As mentioned above, you can also download a images from a list of observation ID
276
292
parameter observation_id instead of target and position.
277
293
278
294
.. code-block :: python
295
+ .. doctest-remote-data ::
296
+ .. doctest-skip ::
279
297
280
298
>>> from astroquery.esasky import ESASky
281
299
>>> images = ESASky.get_images(position = " m51" , radius = " 20 arcmin" , missions = [' Herschel' , ' ISO-IR' ])
@@ -296,13 +314,17 @@ You can also fetch images using :meth:`astroquery.esasky.ESASkyClass.get_maps`.
296
314
position, radius and missions.
297
315
298
316
.. code-block :: python
317
+ .. doctest-remote-data ::
318
+ .. doctest-skip ::
299
319
300
320
>>> table_list = ESASky.query_region_maps(position = " m51" , radius = " 20 arcmin" , missions = [' Herschel' , ' ISO-IR' ])
301
321
>>> images = ESASky.get_maps(query_table_list = table_list, download_dir = " /home/user/esasky" )
302
322
303
323
This example is equivalent to:
304
324
305
325
.. code-block :: python
326
+ .. doctest-remote-data ::
327
+ .. doctest-skip ::
306
328
307
329
>>> images = ESASky.get_images(position = " m51" , radius = " 20 arcmin" , missions = [' Herschel' , ' ISO-IR' ],
308
330
... download_dir= " /home/user/esasky" )
@@ -318,6 +340,7 @@ The methods returns a `dict` to separate the different missions. All mission exc
318
340
`~astropy.io.fits.HDUList `. Herschel returns a three-level dictionary.
319
341
320
342
.. code-block :: python
343
+ .. doctest-remote-data ::
321
344
322
345
>>> from astroquery.esasky import ESASky
323
346
>>> spectra = ESASky.get_spectra(position = " m51" , radius = " 20 arcmin" , missions = [' Herschel' , ' XMM-NEWTON' ])
@@ -326,6 +349,8 @@ The methods returns a `dict` to separate the different missions. All mission exc
326
349
or
327
350
328
351
.. code-block :: python
352
+ .. doctest-remote-data ::
353
+ .. doctest-skip ::
329
354
330
355
>>> table_list = ESASky.query_region_spectra(position = " m51" , radius = " 20 arcmin" ,
331
356
... missions= [' Herschel' , ' XMM-NEWTON' ])
@@ -347,6 +372,7 @@ The return value is structured in a dictionary like this:
347
372
Here is another example for Herschel, since it is a bit special:
348
373
349
374
.. code- block:: python
375
+ .. doctest- remote- data::
350
376
351
377
>> > from astroquery.esasky import ESASky
352
378
>> > result = ESASky.query_region_spectra(position = ' M51' , radius = ' 1arcmin' , missions = [' HERSCHEL' ])
0 commit comments