Skip to content

Commit 50eda76

Browse files
authored
Merge pull request #763 from imbasimba/master
Esasky minor documentation change
2 parents d8ab59d + 48d47b8 commit 50eda76

File tree

3 files changed

+19
-18
lines changed

3 files changed

+19
-18
lines changed

README.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ List of Modules
8282

8383
* `Simbad <http://astroquery.readthedocs.io/en/latest/simbad/simbad.html>`_: Basic data, cross-identifications, bibliography and measurements for astronomical objects outside the solar system.
8484
* `Vizier <http://astroquery.readthedocs.io/en/latest/vizier/vizier.html>`_: Set of 11,000+ published, multiwavelength catalogues hosted by the CDS.
85+
* `ESASky <http://astroquery.readthedocs.io/en/latest/esasky/esasky.html>`_: ESASky is a science driven discovery portal providing easy visualizations and full access to the entire sky as observed with ESA Space astronomy missions.
8586
* `IRSA Image Server program interface (IBE) Query Tool<http://astroquery.readthedocs.io/en/latest/ibe/ibe.html>`_: provides access to the 2MASS, WISE, and PTF image archives.
8687
* `IRSA dust <http://astroquery.readthedocs.io/en/latest/irsa/irsa_dust.html>`_: Galactic dust reddening and extinction maps from IRAS 100 um data.
8788
* `NED <http://astroquery.readthedocs.io/en/latest/ned/ned.html>`_: NASA/IPAC Extragalactic Database. Multiwavelength data from both surveys and publications.

astroquery/esasky/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def query_region_catalogs(self, position, radius, catalogs=__ALL_STRING,
278278
return commons.TableList(query_result)
279279

280280
def get_maps(self, query_table_list, missions=__ALL_STRING,
281-
download_directory=__MAPS_STRING, cache=True):
281+
download_dir=__MAPS_STRING, cache=True):
282282
"""
283283
This method takes the dictionary of missions and metadata as returned by
284284
query_region_maps and downloads all maps to the selected folder.
@@ -296,7 +296,7 @@ def get_maps(self, query_table_list, missions=__ALL_STRING,
296296
Can be either a specific mission or a list of missions (all mission
297297
names are found in list_missions()) or 'all' to search in all
298298
missions. Defaults to 'all'.
299-
download_directory : string, optional
299+
download_dir : string, optional
300300
The folder where all downloaded maps should be stored.
301301
Defaults to a folder called 'Maps' in the current working directory.
302302
cache : bool, optional
@@ -339,11 +339,11 @@ def get_maps(self, query_table_list, missions=__ALL_STRING,
339339
self._get_maps_for_mission(
340340
sanitized_query_table_list[query_mission],
341341
query_mission,
342-
download_directory,
342+
download_dir,
343343
cache))
344344
break
345345
if (len(sanitized_query_table_list) > 0):
346-
log.info("Maps available at %s" %os.path.abspath(download_directory))
346+
log.info("Maps available at %s" %os.path.abspath(download_dir))
347347
else:
348348
print("No maps found")
349349
return maps

docs/esasky/esasky.rst

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ If you know the names of all the available catalogs you can use
2525
2626
>>> catalog_list = ESASky.list_catalogs()
2727
>>> print(catalog_list)
28-
['INTEGRAL', 'XMM-EPIC', 'XMM-OM', 'XMM-SLEW', 'Tycho-2',
29-
'Gaia DR1 TGAS', 'Hipparcos-2', 'HSC', 'Planck-PGCC2', 'Planck-PCCS2E',
30-
'Planck-PCCS2-HFI', 'Planck-PCCS2-LFI', 'Planck-PSZ']
28+
['INTEGRAL', 'XMM-EPIC', 'XMM-OM', 'XMM-SLEW', 'Tycho-2',
29+
'Gaia DR1 TGAS', 'Hipparcos-2', 'HSC', 'Planck-PGCC2', 'Planck-PCCS2E',
30+
'Planck-PCCS2-HFI', 'Planck-PCCS2-LFI', 'Planck-PSZ']
3131
3232
Get the available maps mission names
3333
------------------------------------
@@ -39,8 +39,8 @@ If you know the names of all the available maps missions you can use
3939
4040
>>> maps_list = ESASky.list_maps()
4141
>>> print(maps_list)
42-
['INTEGRAL', 'XMM-EPIC', 'SUZAKU', 'XMM-OM-OPTICAL', 'XMM-OM-UV',
43-
'HST', 'Herschel', 'ISO']
42+
['INTEGRAL', 'XMM-EPIC', 'SUZAKU', 'XMM-OM-OPTICAL', 'XMM-OM-UV',
43+
'HST', 'Herschel', 'ISO']
4444
4545
Query an object
4646
---------------
@@ -209,36 +209,36 @@ dictionary where the used filter is the key and the HDUList is the value.
209209
210210
>>> print(images)
211211
{
212-
'HERSCHEL': [{'70': [HDUList], ' 160': [HDUList]}, {'70': [HDUList], ' 160': [HDUList]}, ...],
213-
'XMM-EPIC' : [HDUList], HDUList], HDUList], HDUList], ...]
214-
...
215-
}
212+
'HERSCHEL': [{'70': [HDUList], ' 160': [HDUList]}, {'70': [HDUList], ' 160': [HDUList]}, ...],
213+
'XMM-EPIC' : [HDUList], HDUList], HDUList], HDUList], ...]
214+
...
215+
}
216216
217217
Note that the fits files also are stored to disk. By default they are saved to
218-
the working directory but the location can be chosen by the download_directory
218+
the working directory but the location can be chosen by the download_dir
219219
parameter:
220220

221221
.. code-block:: python
222222
223-
>>> images = ESASky.get_images("m51", radius="20 arcmin", missions=['Herschel', 'XMM-EPIC'], download_directory="/home/user/esasky")
223+
>>> images = ESASky.get_images("m51", radius="20 arcmin", missions=['Herschel', 'XMM-EPIC'], download_dir="/home/user/esasky")
224224
225225
Get maps
226226
--------
227227

228228
You can also fetch images using :meth:`astroquery.esasky.ESASkyClass.get_maps`.
229229
It works exactly as :meth:`astroquery.esasky.ESASkyClass.get_images` except that
230-
it takes a `~astropy.utils.TableList` instead of position, radius and missions.
230+
it takes a `~astroquery.utils.TableList` instead of position, radius and missions.
231231

232232
.. code-block:: python
233233
234234
>>> table_list = ESASky.query_region_maps("m51", radius="20 arcmin", missions=['Herschel', 'XMM-EPIC'])
235-
>>> images = ESASky.get_maps(table_list, download_directory="/home/user/esasky")
235+
>>> images = ESASky.get_maps(table_list, download_dir="/home/user/esasky")
236236
237237
This example is equivalent to:
238238

239239
.. code-block:: python
240240
241-
>>> images = ESASky.get_images("m51", radius="20 arcmin", missions=['Herschel', 'XMM-EPIC'], download_directory="/home/user/esasky")
241+
>>> images = ESASky.get_images("m51", radius="20 arcmin", missions=['Herschel', 'XMM-EPIC'], download_dir="/home/user/esasky")
242242
243243
244244
Reference/API

0 commit comments

Comments
 (0)