Skip to content

Commit 81be498

Browse files
imbasimbabsipocz
authored andcommitted
Reduced download size of ESASky documenation examples
1 parent a118b79 commit 81be498

File tree

1 file changed

+24
-31
lines changed

1 file changed

+24
-31
lines changed

docs/esasky/esasky.rst

Lines changed: 24 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -257,15 +257,16 @@ HDUList is the value.
257257
.. doctest-remote-data::
258258

259259
>>> from astroquery.esasky import ESASky
260-
>>> images = ESASky.get_images(position="m51", radius="20 arcmin", missions=['Herschel', 'ISO-IR']) # doctest: +IGNORE_WARNINGS +IGNORE_OUTPUT
261-
Starting download of HERSCHEL data. (25 files)
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]
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
260+
>>> images = ESASky.get_images(position="V* HT Aqr", radius="15 arcmin", missions=['Herschel', 'ISO-IR']) # doctest: +IGNORE_WARNINGS
261+
262+
Starting download of HERSCHEL data. (6 files)
263+
Downloading Observation ID: 1342220557 from http://archives.esac.esa.int/hsa/whsa-tap-server/data?RETRIEVAL_TYPE=STANDALONE&observation_oid=8628906&DATA_RETRIEVAL_ORIGIN=UI [Done]
264+
Downloading Observation ID: 1342221178 from http://archives.esac.esa.int/hsa/whsa-tap-server/data?RETRIEVAL_TYPE=STANDALONE&observation_oid=8628962&DATA_RETRIEVAL_ORIGIN=UI
264265
...
265266
>>> print(images) # doctest: +IGNORE_OUTPUT
266267
{
267268
'HERSCHEL': [{'70': [HDUList], '160': HDUList}, {'70': HDUList, '160': HDUList}, ...],
268-
'ISO' : [HDUList, HDUList, HDUList, HDUList, ...]
269+
'ISO-IR' : [HDUList, HDUList, HDUList, HDUList, ...]
269270
...
270271
}
271272

@@ -274,12 +275,12 @@ parameter observation_id instead of target and position.
274275

275276
.. doctest-remote-data::
276277

277-
>>> images = ESASky.get_images(observation_ids=["100001010", "01500403"], missions=["SUZAKU", "ISO-IR"]) # doctest: +IGNORE_WARNINGS +IGNORE_OUTPUT
278+
>>> images = ESASky.get_images(observation_ids="100001010", missions="SUZAKU") # doctest: +IGNORE_WARNINGS
279+
>>> images = ESASky.get_images(observation_ids=["100001010", "01500403"], missions=["SUZAKU", "ISO-IR"])
278280

279281
Note that the fits files also are stored to disk. By default they are saved to the working directory but the location
280282
can be chosen by the download_dir parameter.
281283

282-
283284
Get maps
284285
--------
285286

@@ -291,15 +292,15 @@ position, radius and missions.
291292
.. Skip testing examples with with hard-wired download dir values
292293
.. doctest-remote-data::
293294

294-
>>> table_list = ESASky.query_region_maps(position="m51", radius="20 arcmin", missions=['Herschel', 'ISO-IR'])
295-
>>> images = ESASky.get_maps(query_table_list=table_list, download_dir="/home/user/esasky") # doctest: +SKIP
295+
>>> table_list = ESASky.query_region_maps(position="V* HT Aqr", radius="15 arcmin", missions=['Herschel', 'ISO-IR'])
296+
>>> images = ESASky.get_maps(query_table_list=table_list, download_dir="/home/user/esasky") # doctest: +SKIP
296297

297298
This example is equivalent to:
298299

299300
.. doctest-remote-data::
300301

301-
>>> images = ESASky.get_images(position="m51", radius="20 arcmin", missions=['Herschel', 'ISO-IR'],
302-
... download_dir="/home/user/esasky") # doctest: +SKIP
302+
>>> images = ESASky.get_images(position="V* HT Aqr", radius="15 arcmin", missions=['Herschel', 'ISO-IR'],
303+
download_dir="/home/user/esasky") # doctest: +SKIP
303304

304305

305306
Get spectra
@@ -316,21 +317,21 @@ The methods returns a `dict` to separate the different missions. All mission exc
316317
.. doctest-remote-data::
317318

318319
>>> from astroquery.esasky import ESASky
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
320+
>>> spectra = ESASky.get_spectra(position="Gaia DR3 4512810408088819712", radius="6.52 arcmin",
321+
missions=['Herschel', 'XMM-NEWTON'])
322+
>>> spectra = ESASky.get_spectra(observation_ids=["02101201", "z1ax0102t"], missions=["ISO-IR", "HST-UV"])
321323

322324
or
323325

324326
.. doctest-remote-data::
325327

326-
>>> table_list = ESASky.query_region_spectra(position="m51", radius="20 arcmin",
327-
... missions=['Herschel', 'XMM-NEWTON'])
328-
>>> spectra = ESASky.get_spectra_from_table(query_table_list=table_list)
328+
>>> table_list = ESASky.query_region_spectra(position="Gaia DR3 4512810408088819712", radius="6.52 arcmin",
329+
missions=['Herschel', 'XMM-NEWTON'])
330+
>>> spectra = ESASky.get_spectra_from_table(query_table_list=table_list, download_dir="/home/user/esasky")
329331
dict: {
330-
'HERSCHEL': {'1342211195': {'red' : {'HPSTBRRS' : HDUList}, 'blue' : {'HPSTBRBS': HDUList},
331-
'1342180796': {'WBS' : {'WBS-H_LSB_5a' : HDUList}, 'HRS' : {'HRS-H_LSB_5a': HDUList},
332+
'HERSCHEL': {'1342244919': {'red' : {'HPSTBRRS' : HDUList}, 'blue' : {'HPSTBRBS': HDUList},
333+
'1342243607': {'SSW+SLW' : {'SPSS' : HDUList},
332334
...},
333-
'HST-IR':[HDUList, HDUList, HDUList, HDUList, HDUList, ...],
334335
'XMM-NEWTON' : [HDUList, HDUList, HDUList, HDUList, ...]
335336
...
336337
}
@@ -340,20 +341,12 @@ Here is another example for Herschel, since it is a bit special:
340341
.. doctest-remote-data::
341342

342343
>>> from astroquery.esasky import ESASky
343-
>>> result = ESASky.query_region_spectra(position='M51', radius='1arcmin', missions=['HERSCHEL'])
344+
>>> result = ESASky.query_region_spectra(position='[SMB88] 6327', radius='1 arcmin', missions=['HERSCHEL'])
344345
>>> herschel_result = result['HERSCHEL']
345346
>>> herschel_result['observation_id', 'target_name', 'instrument', 'observing_mode_name', 'band', 'duration'].pprint()
346347
>>> spectra = ESASky.get_spectra_from_table(query_table_list=[('HERSCHEL', herschel_result)], download_dir='Spectra_new')
347-
>>> spectra['HERSCHEL']['1342211195']['red'].keys()
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-
...
348+
>>> spectra['HERSCHEL']['1342249066']['SSW+SLW'].keys()
349+
>>> spectra['HERSCHEL']['1342249066']['SSW+SLW']['SPSS'].info()
357350

358351

359352
Solar System Object Crossmatch
@@ -424,7 +417,7 @@ Or download everything on an SSO by something like this:
424417
.. doctest-remote-data::
425418

426419
>>> from astroquery.esasky import ESASky
427-
>>> images=ESASky.get_images_sso(sso_name="ganymede")
420+
>>> images=ESASky.get_images_sso(sso_name="2017 RN65")
428421

429422

430423
This module also offers access to IMCCE's SsODNet resolver, which allows you to find solar and extra solar system

0 commit comments

Comments
 (0)