@@ -24,13 +24,12 @@ If you know the names of all the available catalogs you can use :meth:`~astroque
24
24
25
25
>>> from astroquery.esasky import ESASky
26
26
>>> catalog_list = ESASky.list_catalogs()
27
- >>> print (catalog_list) # doctest: +IGNORE_OUTPUT
28
- ['LAMOST', 'AllWise', 'AKARI-IRC-SC', 'TwoMASS', 'INTEGRAL',
29
- 'CHANDRA-SC2', 'XMM-EPIC-STACK', 'XMM-EPIC', 'XMM-OM', 'XMM-SLEW',
30
- 'Tycho-2', 'Gaia-eDR3', 'Hipparcos-2', 'HSC', 'Herschel-HPPSC-070',
31
- 'Herschel-HPPSC-100', 'Herschel-HPPSC-160', 'Herschel-SPSC-250',
32
- 'Herschel-SPSC-350', 'Herschel-SPSC-500','Planck-PGCC',
33
- 'Planck-PCCS2E-HFI', 'Planck-PCCS2-HFI', 'Planck-PCCS2-LFI', 'Planck-PSZ2']
27
+ >>> print (catalog_list)
28
+ ['LAMOST_LRS', 'LAMOST_MRS', 'AllWise', 'Spitzer', 'AKARI-IRC-SC', 'TwoMASS', 'INTEGRAL', 'CHANDRA-SC2',
29
+ 'XMM-EPIC-STACK', 'XMM-EPIC', 'XMM-OM', 'XMM-SLEW', 'Tycho-2', 'Gaia-DR3', 'Hipparcos-2', 'HSC',
30
+ 'Herschel-HPPSC-070', 'Herschel-HPPSC-100', 'Herschel-HPPSC-160', 'Herschel-SPSC-250', 'Herschel-SPSC-350',
31
+ 'Herschel-SPSC-500', 'Planck-PGCC', 'Planck-PCCS2E-HFI', 'Planck-PCCS2-HFI', 'Planck-PCCS2-LFI', 'Planck-PSZ2',
32
+ 'Icecube', 'Fermi_4FGL-DR2', 'Fermi_3FHL', 'Fermi_4LAC-DR2', '2WHSP', '2RXS', 'OU_Blazars']
34
33
35
34
Get the available maps mission names
36
35
------------------------------------
@@ -40,10 +39,9 @@ If you know the names of all the available maps missions you can use :meth:`~ast
40
39
.. doctest-remote-data ::
41
40
42
41
>>> maps_list = ESASky.list_maps()
43
- >>> print (maps_list) # doctest: +IGNORE_OUTPUT
44
- ['INTEGRAL', 'XMM', 'Chandra', 'SUZAKU', 'XMM-OM-OPTICAL',
45
- 'XMM-OM-UV', 'HST-UV', 'HST-OPTICAL', 'HST-IR', 'ISO-IR',
46
- 'Herschel', 'AKARI', 'Spitzer', 'ALMA']
42
+ >>> print (maps_list)
43
+ ['INTEGRAL', 'XMM', 'Chandra', 'SUZAKU', 'XMM-OM-OPTICAL', 'XMM-OM-UV', 'HST-UV', 'HST-OPTICAL', 'HST-IR',
44
+ 'ISO-IR', 'Herschel', 'AKARI', 'JWST-MID-IR', 'JWST-NEAR-IR', 'Spitzer', 'ALMA']
47
45
48
46
Get the available spectra mission names
49
47
---------------------------------------
@@ -53,9 +51,9 @@ If you know the names of all the available spectra you can use :meth:`~astroquer
53
51
.. doctest-remote-data ::
54
52
55
53
>>> spectra_list = ESASky.list_spectra()
56
- >>> print (spectra_list) # doctest: +IGNORE_OUTPUT
57
- ['XMM-NEWTON', 'Chandra', 'IUE', 'HST-UV', 'HST-OPTICAL',
58
- 'HST-IR ', 'ISO-IR ', 'Herschel ', 'LAMOST ']
54
+ >>> print (spectra_list)
55
+ ['XMM-NEWTON', 'Chandra', 'IUE', 'HST-UV', 'HST-OPTICAL', 'JWST-MID-IR', 'JWST-NEAR-IR', 'HST-IR', 'ISO-IR',
56
+ 'Herschel ', 'LAMOST_LRS ', 'LAMOST_MRS ', 'CHEOPS ']
59
57
60
58
Get the available SSO mission names
61
59
-----------------------------------
@@ -67,7 +65,7 @@ If you know the names of all the available missions with SSO cross match data, y
67
65
68
66
>>> sso_list = ESASky.list_sso()
69
67
>>> print (sso_list)
70
- ['Herschel', 'HST', 'XMM']
68
+ ['Herschel', 'HST', 'XMM', 'XMM-OM' ]
71
69
72
70
73
71
Query an object
@@ -87,38 +85,38 @@ For instance to query an object around M51 in the Hubble catalog:
87
85
.. doctest-remote-data ::
88
86
89
87
>>> from astroquery.esasky import ESASky
90
- >>> result = ESASky.query_object_catalogs(position = " M51" , missions = " HSC" )
88
+ >>> result = ESASky.query_object_catalogs(position = " M51" , catalogs = " HSC" )
91
89
92
90
Note that the catalog may also be specified as a list.
93
91
So the above query may also be written as:
94
92
95
93
.. doctest-remote-data ::
96
94
97
- >>> result = ESASky.query_object_catalogs(position = " M51" , missions = [" HSC" , " XMM-OM" ])
95
+ >>> result = ESASky.query_object_catalogs(position = " M51" , catalogs = [" HSC" , " XMM-OM" ])
98
96
99
97
To search in all available catalogs you can write ``"all" `` instead of a catalog name. The same thing will happen if you
100
98
don't write any catalog name.
101
99
102
100
.. doctest-remote-data ::
103
101
104
- >>> result = ESASky.query_object_catalogs(position = " M51" , missions = " all" )
102
+ >>> result = ESASky.query_object_catalogs(position = " M51" , catalogs = " all" )
105
103
>>> result = ESASky.query_object_catalogs(position = " M51" )
106
104
107
105
To see the result:
108
106
109
107
.. doctest-remote-data ::
110
108
111
109
>>> print (result)
112
- TableList with 9 tables:
113
- '0:ALLWISE' with 13 column(s) and 1 row(s)
114
- '1:TWOMASS' with 9 column(s) and 3 row(s)
115
- '2:CHANDRA-SC2' with 41 column(s) and 9 row(s)
116
- '3:XMM-EPIC-STACK' with 13 column(s) and 1 row(s)
117
- '4:XMM-EPIC' with 14 column(s) and 11 row(s)
118
- '5:XMM-OM' with 11 column(s) and 5 row(s)
119
- '6:HSC' with 9 column(s) and 230 row(s)
120
- '7:HERSCHEL-HPPSC-070' with 15 column(s) and 1 row(s)
121
- '8:HERSCHEL-HPPSC-100' with 15 column(s) and 1 row(s)
110
+ TableList with 9 tables:
111
+ '0:ALLWISE' with 25 column(s) and 1 row(s)
112
+ '1:TWOMASS' with 14 column(s) and 3 row(s)
113
+ '2:CHANDRA-SC2' with 41 column(s) and 9 row(s)
114
+ '3:XMM-EPIC-STACK' with 347 column(s) and 1 row(s)
115
+ '4:XMM-EPIC' with 223 column(s) and 12 row(s)
116
+ '5:XMM-OM' with 122 column(s) and 5 row(s)
117
+ '6:HSC' with 27 column(s) and 230 row(s)
118
+ '7:HERSCHEL-HPPSC-070' with 21 column(s) and 1 row(s)
119
+ '8:HERSCHEL-HPPSC-100' with 21 column(s) and 1 row(s)
122
120
123
121
All the results are returned as a `~astroquery.utils.TableList ` object. This is a container for `~astropy.table.Table `
124
122
objects. It is basically an extension to `~collections.OrderedDict ` for storing a `~astropy.table.Table ` against its
@@ -129,7 +127,7 @@ To access an individual table from the `~astroquery.utils.TableList` object
129
127
.. doctest-remote-data ::
130
128
131
129
>>> interesting_table = result[' ALLWISE' ]
132
- >>> print (interesting_table)
130
+ >>> print (interesting_table) # doctest: +IGNORE_OUTPUT
133
131
name ra dec ... w3mpro_error w4mpro w4mpro_error
134
132
deg deg ... mag mag mag
135
133
------------------- ----------- ---------- ... ------------ ------ ------------
@@ -158,6 +156,7 @@ The parameters are interchangeable in the same way as in :meth:`~astroquery.esas
158
156
159
157
Query a region
160
158
--------------
159
+
161
160
The region queries work in a similar way as query_object, except that you must choose a radius as well. There are three
162
161
query region methods in this module :meth: `astroquery.esasky.ESASkyClass.query_region_catalogs `,
163
162
:meth: `astroquery.esasky.ESASkyClass.query_region_maps `, and :meth: `astroquery.esasky.ESASkyClass.query_region_spectra `.
@@ -172,52 +171,43 @@ value for the radius of the region. For instance to query region around M51 in t
172
171
173
172
>>> from astroquery.esasky import ESASky
174
173
>>> import astropy.units as u
175
- >>> result = ESASky.query_region_catalogs(position = " M51" , radius = 10 * u.arcmin, catalogs = " HSC" )
176
-
177
- Note that the catalog may also be specified as a list. So the above query may also be written as:
178
-
179
- .. doctest-remote-data ::
180
-
181
174
>>> result = ESASky.query_region_catalogs(position = " M51" , radius = 10 * u.arcmin, catalogs = [" HSC" , " XMM-OM" ])
182
175
183
176
To search in all available catalogs you can write ``"all" `` instead of a catalog name. The same thing will happen if you
184
177
don't write any catalog name.
178
+ In the same manner, the radius can be specified with either a string or any `~astropy.units.Quantity `.
185
179
186
180
.. doctest-remote-data ::
187
181
188
182
>>> result = ESASky.query_region_catalogs(position = " M51" , radius = 10 * u.arcmin, catalogs = " all" )
189
- >>> result = ESASky.query_region_catalogs(position = " M51" , radius = 10 * u.arcmin)
190
-
191
- In the same manner, the radius can be specified with either a string or any `~astropy.units.Quantity `
192
-
193
- .. doctest-remote-data ::
194
-
195
183
>>> result = ESASky.query_region_catalogs(position = " M51" , radius = " 10 arcmin" )
196
184
197
185
To see the result:
198
186
199
187
.. doctest-remote-data ::
200
188
201
189
>>> print (result)
202
- TableList with 18 tables:
203
- '0:LAMOST' with 21 column(s) and 41 row(s)
204
- '1:ALLWISE' with 13 column(s) and 1762 row(s)
205
- '2:AKARI-IRC-SC' with 13 column(s) and 1 row(s)
206
- '3:TWOMASS' with 9 column(s) and 188 row(s)
207
- '4:CHANDRA-SC2' with 41 column(s) and 430 row(s)
208
- '5:XMM-EPIC-STACK' with 13 column(s) and 214 row(s)
209
- '6:XMM-EPIC' with 14 column(s) and 823 row(s)
210
- '7:XMM-OM' with 11 column(s) and 4849 row(s)
211
- '8:XMM-SLEW' with 9 column(s) and 2 row(s)
212
- '9:GAIA-EDR3' with 20 column(s) and 932 row(s)
213
- '10:HSC' with 9 column(s) and 10000 row(s)
214
- '11:HERSCHEL-HPPSC-070' with 15 column(s) and 93 row(s)
215
- '12:HERSCHEL-HPPSC-100' with 15 column(s) and 122 row(s)
216
- '13:HERSCHEL-HPPSC-160' with 15 column(s) and 93 row(s)
217
- '14:HERSCHEL-SPSC-250' with 16 column(s) and 59 row(s)
218
- '15:HERSCHEL-SPSC-350' with 16 column(s) and 24 row(s)
219
- '16:HERSCHEL-SPSC-500' with 16 column(s) and 7 row(s)
220
- '17:PLANCK-PCCS2-HFI' with 8 column(s) and 8 row(s)
190
+ TableList with 20 tables:
191
+ '0:LAMOST_LRS' with 43 column(s) and 37 row(s)
192
+ '1:ALLWISE' with 25 column(s) and 1762 row(s)
193
+ '2:SPITZER' with 146 column(s) and 1082 row(s)
194
+ '3:AKARI-IRC-SC' with 29 column(s) and 1 row(s)
195
+ '4:TWOMASS' with 14 column(s) and 188 row(s)
196
+ '5:CHANDRA-SC2' with 41 column(s) and 430 row(s)
197
+ '6:XMM-EPIC-STACK' with 347 column(s) and 225 row(s)
198
+ '7:XMM-EPIC' with 223 column(s) and 941 row(s)
199
+ '8:XMM-OM' with 122 column(s) and 4849 row(s)
200
+ '9:XMM-SLEW' with 106 column(s) and 2 row(s)
201
+ '10:GAIA-DR3' with 153 column(s) and 932 row(s)
202
+ '11:HSC' with 27 column(s) and 10000 row(s)
203
+ '12:HERSCHEL-HPPSC-070' with 21 column(s) and 93 row(s)
204
+ '13:HERSCHEL-HPPSC-100' with 21 column(s) and 122 row(s)
205
+ '14:HERSCHEL-HPPSC-160' with 21 column(s) and 93 row(s)
206
+ '15:HERSCHEL-SPSC-250' with 36 column(s) and 59 row(s)
207
+ '16:HERSCHEL-SPSC-350' with 36 column(s) and 24 row(s)
208
+ '17:HERSCHEL-SPSC-500' with 36 column(s) and 7 row(s)
209
+ '18:PLANCK-PCCS2-HFI' with 9 column(s) and 8 row(s)
210
+ '19:2RXS' with 306 column(s) and 2 row(s)
221
211
222
212
You can use, :meth: `~astroquery.esasky.ESASkyClass.query_region_maps ` and
223
213
:meth: `~astroquery.esasky.ESASkyClass.query_region_maps ` with the same parameters. To execute the same command as above
@@ -241,8 +231,11 @@ If you already know the observation ID's or source names of interest, you can ge
241
231
.. doctest-remote-data ::
242
232
243
233
>>> maps = ESASky.query_ids_maps(observation_ids = [" lbsk03vbq" , " ieag90010" ], missions = " HST-UV" )
234
+ INFO: Retrieving tables... [astroquery.utils.tap.core]
235
+ INFO: Parsing tables... [astroquery.utils.tap.core]
236
+ INFO: Done. [astroquery.utils.tap.core]
244
237
>>> catalogs = ESASky.query_ids_catalogs(source_ids = [" 2CXO J090341.1-322609" , " 2CXO J090353.8-322642" ,
245
- "44899", "45057"], catalogs=["CHANDRA-SC2", "Hipparcos-2"])
238
+ ... " 44899" , " 45057" ], catalogs= [" CHANDRA-SC2" , " Hipparcos-2" ])
246
239
>>> spectra = ESASky.query_ids_spectra(observation_ids = " 0001730501" )
247
240
248
241
If you already know which missions you are interested in, it is recommended to explicitly mention them in the mission
@@ -264,7 +257,7 @@ HDUList is the value.
264
257
.. doctest-remote-data ::
265
258
266
259
>>> from astroquery.esasky import ESASky
267
- >>> images = ESASky.get_images(position = " m51" , radius = " 20 arcmin" , missions = [' Herschel' , ' ISO-IR' ]) # doctest: +IGNORE_OUTPUT
260
+ >>> images = ESASky.get_images(position = " m51" , radius = " 20 arcmin" , missions = [' Herschel' , ' ISO-IR' ]) # doctest: +IGNORE_WARNINGS + IGNORE_OUTPUT
268
261
Starting download of HERSCHEL data. (25 files)
269
262
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]
270
263
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
@@ -281,16 +274,11 @@ parameter observation_id instead of target and position.
281
274
282
275
.. doctest-remote-data ::
283
276
284
- >>> from astroquery.esasky import ESASky
285
- >>> images = ESASky.get_images(position = " m51" , radius = " 20 arcmin" , missions = [' Herschel' , ' ISO-IR' ])
277
+ >>> images = ESASky.get_images(observation_ids = [" 100001010" , " 01500403" ], missions = [" SUZAKU" , " ISO-IR" ]) # doctest: +IGNORE_WARNINGS +IGNORE_OUTPUT
286
278
287
279
Note that the fits files also are stored to disk. By default they are saved to the working directory but the location
288
- can be chosen by the download_dir parameter:
280
+ can be chosen by the download_dir parameter.
289
281
290
- .. doctest-remote-data ::
291
-
292
- >>> images = ESASky.get_images(observation_ids = " 100001010" , missions = " SUZAKU" )
293
- >>> images = ESASky.get_images(observation_ids = [" 100001010" , " 01500403" ], missions = [" SUZAKU" , " ISO-IR" ])
294
282
295
283
Get maps
296
284
--------
@@ -300,17 +288,18 @@ You can also fetch images using :meth:`astroquery.esasky.ESASkyClass.get_maps`.
300
288
position, radius and missions.
301
289
302
290
291
+ .. Skip testing examples with with hard-wired download dir values
303
292
.. doctest-remote-data ::
304
293
305
294
>>> table_list = ESASky.query_region_maps(position = " m51" , radius = " 20 arcmin" , missions = [' Herschel' , ' ISO-IR' ])
306
- >>> images = ESASky.get_maps(query_table_list = table_list, download_dir = " /home/user/esasky" )
295
+ >>> images = ESASky.get_maps(query_table_list = table_list, download_dir = " /home/user/esasky" ) # doctest: +SKIP
307
296
308
297
This example is equivalent to:
309
298
310
299
.. doctest-remote-data ::
311
300
312
301
>>> images = ESASky.get_images(position = " m51" , radius = " 20 arcmin" , missions = [' Herschel' , ' ISO-IR' ],
313
- ... download_dir= " /home/user/esasky" )
302
+ ... download_dir= " /home/user/esasky" ) # doctest: +SKIP
314
303
315
304
316
305
Get spectra
@@ -323,19 +312,20 @@ There are also two methods to download spectra: :meth:`astroquery.esasky.ESASkyC
323
312
The methods returns a `dict ` to separate the different missions. All mission except Herschel returns a list of
324
313
`~astropy.io.fits.HDUList `. Herschel returns a three-level dictionary.
325
314
315
+ .. TODO: Skipping for now as it keeps timinig out. Needs fixing
326
316
.. doctest-remote-data ::
327
317
328
318
>>> from astroquery.esasky import ESASky
329
- >>> spectra = ESASky.get_spectra(position = " m51" , radius = " 20 arcmin" , missions = [' Herschel' , ' XMM-NEWTON' ])
330
- >>> spectra = ESASky.get_spectra(observation_ids = [" 02101201" , " z1ax0102t" ], missions = [" ISO-IR" , " HST-UV" ])
319
+ >>> spectra = ESASky.get_spectra(position = " m51" , radius = " 20 arcmin" , missions = [' Herschel' , ' XMM-NEWTON' ]) # doctest: +SKIP
320
+ >>> spectra = ESASky.get_spectra(observation_ids = [" 02101201" , " z1ax0102t" ], missions = [" ISO-IR" , " HST-UV" ]) # doctest: +IGNORE_OUTPUT
331
321
332
322
or
333
323
334
324
.. doctest-remote-data ::
335
325
336
326
>>> table_list = ESASky.query_region_spectra(position = " m51" , radius = " 20 arcmin" ,
337
327
... missions= [' Herschel' , ' XMM-NEWTON' ])
338
- >>> spectra = ESASky.get_spectra_from_table(query_table_list = table_list, download_dir = " /home/user/esasky " )
328
+ >>> spectra = ESASky.get_spectra_from_table(query_table_list = table_list)
339
329
dict: {
340
330
'HERSCHEL': {'1342211195': {'red' : {'HPSTBRRS' : HDUList}, 'blue' : {'HPSTBRBS': HDUList},
341
331
'1342180796': {'WBS' : {'WBS-H_LSB_5a' : HDUList}, 'HRS' : {'HRS-H_LSB_5a': HDUList},
@@ -356,6 +346,15 @@ Here is another example for Herschel, since it is a bit special:
356
346
>>> spectra = ESASky.get_spectra_from_table(query_table_list = [(' HERSCHEL' , herschel_result)], download_dir = ' Spectra_new' )
357
347
>>> spectra[' HERSCHEL' ][' 1342211195' ][' red' ].keys()
358
348
>>> spectra[' HERSCHEL' ][' 1342211195' ][' red' ][' HPSTBRRS' ].info()
349
+ observation_id target_name instrument observing_mode_name band duration
350
+ seconds
351
+ -------------- ------------ ---------- ------------------------ ------------------- ---------
352
+ 1342180479 M51 HIFI HifiMappingModeDBSRaster 555.45-571.56 GHz 8014.085
353
+ 1342211195 m51 strip2-1 PACS PacsLineSpec 62.96-190.85 micron 1254.0
354
+ 1342211188 m51 PACS PacsLineSpec 52.15-159.67 micron 5597.0
355
+ 1342180478 M51 HIFI HifiMappingModeOTF 562.54-578.65 GHz 4012.741
356
+ ...
357
+
359
358
360
359
Solar System Object Crossmatch
361
360
------------------------------
0 commit comments