Skip to content

Commit 00e80b8

Browse files
committed
Updated ESASky docs
1 parent 85c4da7 commit 00e80b8

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

docs/esasky/esasky.rst

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -83,22 +83,22 @@ For instance to query an object around M51 in the Hubble catalog:
8383
.. code-block:: python
8484
8585
>>> from astroquery.esasky import ESASky
86-
>>> result = ESASky.query_object_catalogs("M51", "HSC")
86+
>>> result = ESASky.query_object_catalogs(position="M51", missions="HSC")
8787
8888
Note that the catalog may also be specified as a list.
8989
So the above query may also be written as:
9090

9191
.. code-block:: python
9292
93-
>>> result = ESASky.query_object_catalogs("M51", ["HSC", "XMM-OM"])
93+
>>> result = ESASky.query_object_catalogs(position="M51", missions=["HSC", "XMM-OM"])
9494
9595
To search in all available catalogs you can write ``"all"`` instead of a catalog
9696
name. The same thing will happen if you don't write any catalog name.
9797

9898
.. code-block:: python
9999
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")
102102
103103
To see the result:
104104

@@ -148,8 +148,8 @@ object or coordinate. To execute the same command as above you write this:
148148

149149
.. code-block:: python
150150
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")
153153
154154
The parameters are interchangeable in the same way as in :meth:`~astroquery.esasky.ESASkyClass.query_object_catalogs`.
155155

@@ -173,29 +173,29 @@ For instance to query region around M51 in the HSC catalog:
173173
174174
>>> from astroquery.esasky import ESASky
175175
>>> 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")
177177
178178
Note that the catalog may also be specified as a list.
179179
So the above query may also be written as:
180180

181181
.. code-block:: python
182182
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"])
184184
185185
To search in all available catalogs you can write ``"all"`` instead of a catalog
186186
name. The same thing will happen if you don't write any catalog name.
187187

188188
.. code-block:: python
189189
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)
192192
193193
In the same manner, the radius can be specified with either
194194
a string or any `~astropy.units.Quantity`
195195

196196
.. code-block:: python
197197
198-
>>> result = ESASky.query_region_catalogs("M51", "10 arcmin")
198+
>>> result = ESASky.query_region_catalogs(position="M51", radius="10 arcmin")
199199
200200
To see the result:
201201

@@ -228,14 +228,14 @@ To execute the same command as above you write this:
228228

229229
.. code-block:: python
230230
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")
233233
234234
The parameters are interchangeable in the same way as in
235235
:meth:`~astroquery.esasky.ESASkyClass.query_region_catalogs`.
236236

237237
Get the metadata of specific observations or sources
238-
--------------
238+
----------------------------------------------------
239239
If you already know the observation ID's or source names of interest,
240240
you can get their related metadata directly with
241241
: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.
271271
.. code-block:: python
272272
273273
>>> from astroquery.esasky import ESASky
274-
>>> images = ESASky.get_images("m51", radius="20 arcmin",
274+
>>> images = ESASky.get_images(position="m51", radius="20 arcmin",
275275
... missions=['Herschel', 'ISO-IR'])
276276
Starting download of HERSCHEL data. (25 files)
277277
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
291291
.. code-block:: python
292292
293293
>>> from astroquery.esasky import ESASky
294-
>>> images = ESASky.get_images("m51", radius="20 arcmin",
294+
>>> images = ESASky.get_images(position="m51", radius="20 arcmin",
295295
... missions=['Herschel', 'ISO-IR'])
296296
297297
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
312312

313313
.. code-block:: python
314314
315-
>>> table_list = ESASky.query_region_maps("m51", radius="20 arcmin",
315+
>>> table_list = ESASky.query_region_maps(position="m51", radius="20 arcmin",
316316
... 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")
318318
319319
This example is equivalent to:
320320

321321
.. code-block:: python
322322
323-
>>> images = ESASky.get_images("m51", radius="20 arcmin",
323+
>>> images = ESASky.get_images(position="m51", radius="20 arcmin",
324324
... missions=['Herschel', 'ISO-IR'],
325325
... download_dir="/home/user/esasky")
326326
@@ -342,7 +342,7 @@ three-level dictionary.
342342
.. code-block:: python
343343
344344
>>> from astroquery.esasky import ESASky
345-
>>> spectra = ESASky.get_spectra("m51", radius="20 arcmin",
345+
>>> spectra = ESASky.get_spectra(position="m51", radius="20 arcmin",
346346
... missions=['Herschel', 'XMM-NEWTON'])
347347
>>> spectra = ESASky.get_spectra(observation_ids=["02101201", "z1ax0102t"],
348348
... missions=["ISO-IR", "HST-UV"])
@@ -351,9 +351,9 @@ or
351351

352352
.. code-block:: python
353353
354-
>>> table_list = ESASky.query_region_spectra("m51", radius="20 arcmin",
354+
>>> table_list = ESASky.query_region_spectra(position="m51", radius="20 arcmin",
355355
... 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")
357357
358358
The response is structured in a dictionary like this:
359359

@@ -376,7 +376,7 @@ Here is another example for Herschel, since it is a bit special:
376376
>>> result = ESASky.query_region_spectra(position='M51', radius='1arcmin', missions=['HERSCHEL'])
377377
>>> herschel_result = result['HERSCHEL']
378378
>>> 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')
380380
>>> spectra['HERSCHEL']['1342211195']['red'].keys()
381381
>>> spectra['HERSCHEL']['1342211195']['red']['HPSTBRRS'].info()
382382

0 commit comments

Comments
 (0)