@@ -83,22 +83,22 @@ For instance to query an object around M51 in the Hubble catalog:
83
83
.. code-block :: python
84
84
85
85
>> > from astroquery.esasky import ESASky
86
- >> > result = ESASky.query_object_catalogs(" M51" , " HSC" )
86
+ >> > result = ESASky.query_object_catalogs(position = " M51" , missions = " HSC" )
87
87
88
88
Note that the catalog may also be specified as a list.
89
89
So the above query may also be written as:
90
90
91
91
.. code-block :: python
92
92
93
- >> > result = ESASky.query_object_catalogs(" M51" , [" HSC" , " XMM-OM" ])
93
+ >> > result = ESASky.query_object_catalogs(position = " M51" , missions = [" HSC" , " XMM-OM" ])
94
94
95
95
To search in all available catalogs you can write ``"all" `` instead of a catalog
96
96
name. The same thing will happen if you don't write any catalog name.
97
97
98
98
.. code-block :: python
99
99
100
- >> > result = ESASky.query_object_catalogs(" M51" , " all" )
101
- >> > result = ESASky.query_object_catalogs(" M51" )
100
+ >> > result = ESASky.query_object_catalogs(position = " M51" , missions = " all" )
101
+ >> > result = ESASky.query_object_catalogs(position = " M51" )
102
102
103
103
To see the result:
104
104
@@ -148,8 +148,8 @@ object or coordinate. To execute the same command as above you write this:
148
148
149
149
.. code-block :: python
150
150
151
- >> > result = ESASky.query_object_maps(" M51" , " all" )
152
- >> > result = ESASky.query_object_spectra(" M51" , " all" )
151
+ >> > result = ESASky.query_object_maps(position = " M51" , missions = " all" )
152
+ >> > result = ESASky.query_object_spectra(position = " M51" , missions = " all" )
153
153
154
154
The parameters are interchangeable in the same way as in :meth: `~astroquery.esasky.ESASkyClass.query_object_catalogs `.
155
155
@@ -173,29 +173,29 @@ For instance to query region around M51 in the HSC catalog:
173
173
174
174
>> > from astroquery.esasky import ESASky
175
175
>> > import astropy.units as u
176
- >> > result = ESASky.query_region_catalogs(" M51" , 10 * u.arcmin, " HSC" )
176
+ >> > result = ESASky.query_region_catalogs(position = " M51" , radius = 10 * u.arcmin, catalogs = " HSC" )
177
177
178
178
Note that the catalog may also be specified as a list.
179
179
So the above query may also be written as:
180
180
181
181
.. code-block :: python
182
182
183
- >> > result = ESASky.query_region_catalogs(" M51" , 10 * u.arcmin, [" HSC" , " XMM-OM" ])
183
+ >> > result = ESASky.query_region_catalogs(position = " M51" , radius = 10 * u.arcmin, catalogs = [" HSC" , " XMM-OM" ])
184
184
185
185
To search in all available catalogs you can write ``"all" `` instead of a catalog
186
186
name. The same thing will happen if you don't write any catalog name.
187
187
188
188
.. code-block :: python
189
189
190
- >> > result = ESASky.query_region_catalogs(" M51" , 10 * u.arcmin, " all" )
191
- >> > result = ESASky.query_region_catalogs(" M51" , 10 * u.arcmin)
190
+ >> > result = ESASky.query_region_catalogs(position = " M51" , radius = 10 * u.arcmin, catalogs = " all" )
191
+ >> > result = ESASky.query_region_catalogs(position = " M51" , radius = 10 * u.arcmin)
192
192
193
193
In the same manner, the radius can be specified with either
194
194
a string or any `~astropy.units.Quantity `
195
195
196
196
.. code-block :: python
197
197
198
- >> > result = ESASky.query_region_catalogs(" M51" , " 10 arcmin" )
198
+ >> > result = ESASky.query_region_catalogs(position = " M51" , radius = " 10 arcmin" )
199
199
200
200
To see the result:
201
201
@@ -228,14 +228,14 @@ To execute the same command as above you write this:
228
228
229
229
.. code-block :: python
230
230
231
- >> > result = ESASky.query_region_maps(" M51" , 10 * u.arcmin, " all" )
232
- >> > result = ESASky.query_region_spectra(" M51" , 10 * u.arcmin, " all" )
231
+ >> > result = ESASky.query_region_maps(position = " M51" , radius = 10 * u.arcmin, missions = " all" )
232
+ >> > result = ESASky.query_region_spectra(position = " M51" , radius = 10 * u.arcmin, missions = " all" )
233
233
234
234
The parameters are interchangeable in the same way as in
235
235
:meth: `~astroquery.esasky.ESASkyClass.query_region_catalogs `.
236
236
237
237
Get the metadata of specific observations or sources
238
- --------------
238
+ ----------------------------------------------------
239
239
If you already know the observation ID's or source names of interest,
240
240
you can get their related metadata directly with
241
241
:meth: `~astroquery.esasky.ESASkyClass.query_ids_maps `,
@@ -271,7 +271,7 @@ dictionary where the used filter is the key and the HDUList is the value.
271
271
.. code-block :: python
272
272
273
273
>> > from astroquery.esasky import ESASky
274
- >> > images = ESASky.get_images(" m51" , radius = " 20 arcmin" ,
274
+ >> > images = ESASky.get_images(position = " m51" , radius = " 20 arcmin" ,
275
275
... missions = [' Herschel' , ' ISO-IR' ])
276
276
Starting download of HERSCHEL data. (25 files)
277
277
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]
@@ -291,7 +291,7 @@ To do that you just have to use the parameter observation_id instead of target a
291
291
.. code-block :: python
292
292
293
293
>> > from astroquery.esasky import ESASky
294
- >> > images = ESASky.get_images(" m51" , radius = " 20 arcmin" ,
294
+ >> > images = ESASky.get_images(position = " m51" , radius = " 20 arcmin" ,
295
295
... missions = [' Herschel' , ' ISO-IR' ])
296
296
297
297
Note that the fits files also are stored to disk. By default they are saved to
@@ -312,15 +312,15 @@ it takes a `~astroquery.utils.TableList` instead of position, radius and mission
312
312
313
313
.. code-block :: python
314
314
315
- >> > table_list = ESASky.query_region_maps(" m51" , radius = " 20 arcmin" ,
315
+ >> > table_list = ESASky.query_region_maps(position = " m51" , radius = " 20 arcmin" ,
316
316
... missions = [' Herschel' , ' ISO-IR' ])
317
- >> > images = ESASky.get_maps(table_list, download_dir = " /home/user/esasky" )
317
+ >> > images = ESASky.get_maps(query_table_list = table_list, download_dir = " /home/user/esasky" )
318
318
319
319
This example is equivalent to:
320
320
321
321
.. code-block :: python
322
322
323
- >> > images = ESASky.get_images(" m51" , radius = " 20 arcmin" ,
323
+ >> > images = ESASky.get_images(position = " m51" , radius = " 20 arcmin" ,
324
324
... missions = [' Herschel' , ' ISO-IR' ],
325
325
... download_dir = " /home/user/esasky" )
326
326
@@ -342,7 +342,7 @@ three-level dictionary.
342
342
.. code-block :: python
343
343
344
344
>> > from astroquery.esasky import ESASky
345
- >> > spectra = ESASky.get_spectra(" m51" , radius = " 20 arcmin" ,
345
+ >> > spectra = ESASky.get_spectra(position = " m51" , radius = " 20 arcmin" ,
346
346
... missions = [' Herschel' , ' XMM-NEWTON' ])
347
347
>> > spectra = ESASky.get_spectra(observation_ids = [" 02101201" , " z1ax0102t" ],
348
348
... missions = [" ISO-IR" , " HST-UV" ])
351
351
352
352
.. code-block :: python
353
353
354
- >> > table_list = ESASky.query_region_spectra(" m51" , radius = " 20 arcmin" ,
354
+ >> > table_list = ESASky.query_region_spectra(position = " m51" , radius = " 20 arcmin" ,
355
355
... missions = [' Herschel' , ' XMM-NEWTON' ])
356
- >> > spectra = ESASky.get_spectra_from_table(table_list, download_dir = " /home/user/esasky" )
356
+ >> > spectra = ESASky.get_spectra_from_table(query_table_list = table_list, download_dir = " /home/user/esasky" )
357
357
358
358
The response is structured in a dictionary like this:
359
359
@@ -376,7 +376,7 @@ Here is another example for Herschel, since it is a bit special:
376
376
>> > result = ESASky.query_region_spectra(position = ' M51' , radius = ' 1arcmin' , missions = [' HERSCHEL' ])
377
377
>> > herschel_result = result[' HERSCHEL' ]
378
378
>> > herschel_result[' observation_id' , ' target_name' , ' instrument' , ' observing_mode_name' , ' band' , ' duration' ].pprint()
379
- >> > spectra = ESASky.get_spectra_from_table([(' HERSCHEL' , herschel_result)], download_dir = ' Spectra_new' )
379
+ >> > spectra = ESASky.get_spectra_from_table(query_table_list = [(' HERSCHEL' , herschel_result)], download_dir = ' Spectra_new' )
380
380
>> > spectra[' HERSCHEL' ][' 1342211195' ][' red' ].keys()
381
381
>> > spectra[' HERSCHEL' ][' 1342211195' ][' red' ][' HPSTBRRS' ].info()
382
382
0 commit comments