Skip to content

Commit e1bd98a

Browse files
committed
TST: making sure non remote tests run pass
1 parent 39aa4f4 commit e1bd98a

File tree

1 file changed

+20
-44
lines changed

1 file changed

+20
-44
lines changed

docs/esasky/esasky.rst

Lines changed: 20 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ Get the available catalog names
2020

2121
If you know the names of all the available catalogs you can use :meth:`~astroquery.esasky.ESASkyClass.list_catalogs`:
2222

23-
.. code-block:: python
2423
.. doctest-remote-data::
2524

2625
>>> from astroquery.esasky import ESASky
@@ -38,7 +37,6 @@ Get the available maps mission names
3837

3938
If you know the names of all the available maps missions you can use :meth:`~astroquery.esasky.ESASkyClass.list_maps`:
4039

41-
.. code-block:: python
4240
.. doctest-remote-data::
4341

4442
>>> maps_list = ESASky.list_maps()
@@ -52,7 +50,6 @@ Get the available spectra mission names
5250

5351
If you know the names of all the available spectra you can use :meth:`~astroquery.esasky.ESASkyClass.list_spectra`:
5452

55-
.. code-block:: python
5653
.. doctest-remote-data::
5754

5855
>>> spectra_list = ESASky.list_spectra()
@@ -66,7 +63,7 @@ Get the available SSO mission names
6663
If you know the names of all the available missions with SSO cross match data, you can use
6764
:meth:`~astroquery.esasky.ESASkyClass.list_sso`:
6865

69-
.. code-block:: python
66+
.. doctest-remote-data::
7067

7168
>>> sso_list = ESASky.list_sso()
7269
>>> print(sso_list)
@@ -87,7 +84,6 @@ row_limit parameter. You can set the parameter to -1, which will result in the m
8784

8885
For instance to query an object around M51 in the Hubble catalog:
8986

90-
.. code-block:: python
9187
.. doctest-remote-data::
9288

9389
>>> from astroquery.esasky import ESASky
@@ -96,22 +92,20 @@ For instance to query an object around M51 in the Hubble catalog:
9692
Note that the catalog may also be specified as a list.
9793
So the above query may also be written as:
9894

99-
.. code-block:: python
95+
.. doctest-remote-data::
10096

101-
>>> result = ESASky.query_object_catalogs(position="M51", missions=["HSC", "XMM-OM"]) # doctest: +REMOTE_DATA
97+
>>> result = ESASky.query_object_catalogs(position="M51", missions=["HSC", "XMM-OM"])
10298

10399
To search in all available catalogs you can write ``"all"`` instead of a catalog name. The same thing will happen if you
104100
don't write any catalog name.
105101

106-
.. code-block:: python
107102
.. doctest-remote-data::
108103

109104
>>> result = ESASky.query_object_catalogs(position="M51", missions="all")
110105
>>> result = ESASky.query_object_catalogs(position="M51")
111106

112107
To see the result:
113108

114-
.. code-block:: python
115109
.. doctest-remote-data::
116110

117111
>>> print(result)
@@ -132,7 +126,6 @@ name.
132126

133127
To access an individual table from the `~astroquery.utils.TableList` object
134128

135-
.. code-block:: python
136129
.. doctest-remote-data::
137130

138131
>>> interesting_table = result['ALLWISE']
@@ -145,7 +138,6 @@ To access an individual table from the `~astroquery.utils.TableList` object
145138
To do some common processing to all the tables in the returned `~astroquery.utils.TableList` object, you can just use a
146139
for loop:
147140

148-
.. code-block:: python
149141
.. doctest-remote-data::
150142

151143
>>> for table in result:
@@ -157,7 +149,6 @@ As mentioned earlier, :meth:`astroquery.esasky.ESASkyClass.query_object_maps` an
157149
:meth:`astroquery.esasky.ESASkyClass.query_object_spectra` works extremely similar. It will return all maps or spectra
158150
that contain the chosen object or coordinate. To execute the same command as above you write this:
159151

160-
.. code-block:: python
161152
.. doctest-remote-data::
162153

163154
>>> result = ESASky.query_object_maps(position="M51", missions="all")
@@ -177,7 +168,6 @@ sources (currently 100 000).
177168
To query a region either the coordinates or the object name around which to query should be specified along with the
178169
value for the radius of the region. For instance to query region around M51 in the HSC catalog:
179170

180-
.. code-block:: python
181171
.. doctest-remote-data::
182172

183173
>>> from astroquery.esasky import ESASky
@@ -186,29 +176,27 @@ value for the radius of the region. For instance to query region around M51 in t
186176

187177
Note that the catalog may also be specified as a list. So the above query may also be written as:
188178

189-
.. code-block:: python
179+
.. doctest-remote-data::
190180

191-
>>> result = ESASky.query_region_catalogs(position="M51", radius=10 * u.arcmin, catalogs=["HSC", "XMM-OM"]) # doctest: +REMOTE_DATA
181+
>>> result = ESASky.query_region_catalogs(position="M51", radius=10 * u.arcmin, catalogs=["HSC", "XMM-OM"])
192182

193183
To search in all available catalogs you can write ``"all"`` instead of a catalog name. The same thing will happen if you
194184
don't write any catalog name.
195185

196-
.. code-block:: python
197186
.. doctest-remote-data::
198187

199188
>>> result = ESASky.query_region_catalogs(position="M51", radius=10 * u.arcmin, catalogs="all")
200189
>>> result = ESASky.query_region_catalogs(position="M51", radius=10 * u.arcmin)
201190

202191
In the same manner, the radius can be specified with either a string or any `~astropy.units.Quantity`
203192

204-
.. code-block:: python
205193
.. doctest-remote-data::
206194

207195
>>> result = ESASky.query_region_catalogs(position="M51", radius="10 arcmin")
208196

209197
To see the result:
210198

211-
.. code-block:: python
199+
.. doctest-remote-data::
212200

213201
>>> print(result)
214202
TableList with 18 tables:
@@ -235,20 +223,21 @@ You can use, :meth:`~astroquery.esasky.ESASkyClass.query_region_maps` and
235223
:meth:`~astroquery.esasky.ESASkyClass.query_region_maps` with the same parameters. To execute the same command as above
236224
you write this:
237225

238-
.. code-block:: python
226+
.. doctest-remote-data::
239227

240228
>>> result = ESASky.query_region_maps(position="M51", radius=10 * u.arcmin, missions="all")
241229
>>> result = ESASky.query_region_spectra(position="M51", radius=10 * u.arcmin, missions="all")
242230

243231
The parameters are interchangeable in the same way as in :meth:`~astroquery.esasky.ESASkyClass.query_region_catalogs`.
244232

233+
245234
Get the metadata of specific observations or sources
246235
----------------------------------------------------
236+
247237
If you already know the observation ID's or source names of interest, you can get their related metadata directly with
248238
:meth:`~astroquery.esasky.ESASkyClass.query_ids_maps`, or :meth:`~astroquery.esasky.ESASkyClass.query_ids_catalogs`, or
249239
:meth:`~astroquery.esasky.ESASkyClass.query_ids_spectra`
250240

251-
.. code-block:: python
252241
.. doctest-remote-data::
253242

254243
>>> maps = ESASky.query_ids_maps(observation_ids=["lbsk03vbq", "ieag90010"], missions="HST-UV")
@@ -272,7 +261,6 @@ The method returns a `dict` to separate the different missions. All mission exce
272261
`~astropy.io.fits.HDUList`. For Herschel each item in the list is a dictionary where the used filter is the key and the
273262
HDUList is the value.
274263

275-
.. code-block:: python
276264
.. doctest-remote-data::
277265

278266
>>> from astroquery.esasky import ESASky
@@ -291,17 +279,15 @@ HDUList is the value.
291279
As mentioned above, you can also download a images from a list of observation ID's. To do that you just have to use the
292280
parameter observation_id instead of target and position.
293281

294-
.. code-block:: python
295282
.. doctest-remote-data::
296-
.. doctest-skip::
297283

298284
>>> from astroquery.esasky import ESASky
299285
>>> images = ESASky.get_images(position="m51", radius="20 arcmin", missions=['Herschel', 'ISO-IR'])
300286

301287
Note that the fits files also are stored to disk. By default they are saved to the working directory but the location
302288
can be chosen by the download_dir parameter:
303289

304-
.. code-block:: python
290+
.. doctest-remote-data::
305291

306292
>>> images = ESASky.get_images(observation_ids="100001010", missions="SUZAKU")
307293
>>> images = ESASky.get_images(observation_ids=["100001010", "01500403"], missions=["SUZAKU", "ISO-IR"])
@@ -313,33 +299,30 @@ You can also fetch images using :meth:`astroquery.esasky.ESASkyClass.get_maps`.
313299
:meth:`astroquery.esasky.ESASkyClass.get_images` except that it takes a `~astroquery.utils.TableList` instead of
314300
position, radius and missions.
315301

316-
.. code-block:: python
302+
317303
.. doctest-remote-data::
318-
.. doctest-skip::
319304

320305
>>> table_list = ESASky.query_region_maps(position="m51", radius="20 arcmin", missions=['Herschel', 'ISO-IR'])
321306
>>> images = ESASky.get_maps(query_table_list=table_list, download_dir="/home/user/esasky")
322307

323308
This example is equivalent to:
324309

325-
.. code-block:: python
326310
.. doctest-remote-data::
327-
.. doctest-skip::
328311

329312
>>> images = ESASky.get_images(position="m51", radius="20 arcmin", missions=['Herschel', 'ISO-IR'],
330313
... download_dir="/home/user/esasky")
331314

332315

333316
Get spectra
334317
-----------
318+
335319
There are also two methods to download spectra: :meth:`astroquery.esasky.ESASkyClass.get_spectra` and
336320
:meth:`astroquery.esasky.ESASkyClass.get_spectra_from_table`. These two methods use the same parameters as
337321
:meth:`astroquery.esasky.ESASkyClass.get_maps` and :meth:`astroquery.esasky.ESASkyClass.get_images` respectively.
338322

339323
The methods returns a `dict` to separate the different missions. All mission except Herschel returns a list of
340324
`~astropy.io.fits.HDUList`. Herschel returns a three-level dictionary.
341325

342-
.. code-block:: python
343326
.. doctest-remote-data::
344327

345328
>>> from astroquery.esasky import ESASky
@@ -348,18 +331,11 @@ The methods returns a `dict` to separate the different missions. All mission exc
348331

349332
or
350333

351-
.. code-block:: python
352334
.. doctest-remote-data::
353-
.. doctest-skip::
354335

355336
>>> table_list = ESASky.query_region_spectra(position="m51", radius="20 arcmin",
356337
... missions=['Herschel', 'XMM-NEWTON'])
357338
>>> spectra = ESASky.get_spectra_from_table(query_table_list=table_list, download_dir="/home/user/esasky")
358-
359-
The return value is structured in a dictionary like this:
360-
361-
.. code-block:: python
362-
363339
dict: {
364340
'HERSCHEL': {'1342211195': {'red' : {'HPSTBRRS' : HDUList}, 'blue' : {'HPSTBRBS': HDUList},
365341
'1342180796': {'WBS' : {'WBS-H_LSB_5a' : HDUList}, 'HRS' : {'HRS-H_LSB_5a': HDUList},
@@ -371,7 +347,6 @@ The return value is structured in a dictionary like this:
371347

372348
Here is another example for Herschel, since it is a bit special:
373349

374-
.. code-block:: python
375350
.. doctest-remote-data::
376351

377352
>>> from astroquery.esasky import ESASky
@@ -384,22 +359,23 @@ Here is another example for Herschel, since it is a bit special:
384359

385360
Solar System Object Crossmatch
386361
------------------------------
362+
387363
ESASky has a solar system object crossmatch feature which performs a crossmatch on the SSO orbits against the entire
388364
mission archives to find observations in which the SSO fell within the imaging instrument's field of view during the
389365
time the images were being taken. `Read more about the ESASky SSO feature
390366
<https://www.cosmos.esa.int/web/esdc/esasky-interface#SSO>`__ You can access the results of this crossmatch by using
391367
:meth:`astroquery.esasky.ESASkyClass.query_sso` which works like the other query methods, but it takes an SSO name as
392368
input instead of a position.
393369

394-
.. code-block:: python
370+
.. doctest-remote-data::
395371

396372
>>> from astroquery.esasky import ESASky
397373
>>> result = ESASky.query_sso(sso_name="Pallas", missions=["XMM", "HST"])
398374

399375
In some cases an SSO name is ambiguous, in which case you may need to use a more precise SSO name or specify the SSO
400376
type of the desired object. For example:
401377

402-
.. code-block:: python
378+
.. doctest-remote-data::
403379

404380
>>> from astroquery.esasky import ESASky
405381
>>> ESASky.query_sso(sso_name="503")
@@ -416,15 +392,15 @@ type of the desired object. For example:
416392

417393
In this case, you can specify the sso_type
418394

419-
.. code-block:: python
395+
.. doctest-remote-data::
420396

421397
>>> from astroquery.esasky import ESASky
422398
>>> ESASky.query_sso(sso_name="503", sso_type="SATELLITE")
423399

424400

425401
You can see the available missions with:
426402

427-
.. code-block:: python
403+
.. doctest-remote-data::
428404

429405
>>> from astroquery.esasky import ESASky
430406
>>> ESASky.list_sso()
@@ -437,7 +413,7 @@ This function works very similar to :meth:`astroquery.esasky.ESASkyClass.get_ima
437413
:meth:`astroquery.esasky.ESASkyClass.get_maps`, as it structures the return values in the same way, and most parameters
438414
are the same. You can for example, download a table list just like in get_maps by doing something like this:
439415

440-
.. code-block:: python
416+
.. doctest-remote-data::
441417

442418
>>> from astroquery.esasky import ESASky
443419
>>> table_list_from_query_maps=ESASky.query_sso(sso_name="ganymede", missions="XMM")
@@ -446,7 +422,7 @@ are the same. You can for example, download a table list just like in get_maps b
446422

447423
Or download everything on an SSO by something like this:
448424

449-
.. code-block:: python
425+
.. doctest-remote-data::
450426

451427
>>> from astroquery.esasky import ESASky
452428
>>> images=ESASky.get_images_sso(sso_name="ganymede")
@@ -456,7 +432,7 @@ This module also offers access to IMCCE's SsODNet resolver, which allows you to
456432
objects with a given name. Here you can see all matches and there aliases and types. You can use this method to help you
457433
specify which SSO you are after. Use :meth:`astroquery.esasky.ESASkyClass.find_sso` like this:
458434

459-
.. code-block:: python
435+
.. doctest-remote-data::
460436

461437
>>> from astroquery.esasky import ESASky
462438
>>> list_of_matches=ESASky.find_sso(sso_name="Io")

0 commit comments

Comments
 (0)