@@ -46,10 +46,10 @@ This method also accepts a string to limit the number of responses. Let's try wi
46
46
47
47
..
48
48
We ignore output here, as occurrence is changing often
49
- .. doctest-remote-data ::
49
+ .. doctest-requires :: mocpy
50
50
51
51
>>> from astroquery.mocserver import MOCServer
52
- >>> MOCServer.list_fields(" MOC" ) # doctest: +IGNORE_OUTPUT
52
+ >>> MOCServer.list_fields(" MOC" ) # doctest: +IGNORE_OUTPUT +REMOTE_DATA
53
53
<Table length=7>
54
54
field_name occurrence example
55
55
str27 int64 str70
@@ -83,15 +83,15 @@ Let's get the datasets for which all the data is comprised in a cone (this is
83
83
what the ``enclosed `` option means for intersect). We also restrict our search to
84
84
datasets describing the sky (with ``coordinate_system=sky ``).
85
85
86
- .. doctest-remote-data ::
86
+ .. doctest-requires :: mocpy
87
87
88
88
>>> from astropy import coordinates
89
89
>>> from regions import CircleSkyRegion
90
90
>>> from astroquery.mocserver import MOCServer
91
91
>>> center = coordinates.SkyCoord(10.8 , 32.2 , unit = ' deg' )
92
92
>>> radius = coordinates.Angle(0.5 , unit = ' deg' )
93
93
>>> cone = CircleSkyRegion(center, radius)
94
- >>> MOCServer.query_region(region = cone, intersect = " enclosed" , coordinate_system = " sky" ) # doctest: +IGNORE_OUTPUT
94
+ >>> MOCServer.query_region(region = cone, intersect = " enclosed" , coordinate_system = " sky" ) # doctest: +IGNORE_OUTPUT +REMOTE_DATA
95
95
<Table length=450>
96
96
ID ...
97
97
str49 ...
@@ -131,7 +131,7 @@ The ``meta_data`` parameter of :meth:`~astroquery.mocserver.MOCServerClass.query
131
131
allows to write an algebraic expression on the metadata.
132
132
Let's add a criteria to get only images from the previous query:
133
133
134
- .. doctest-remote-data ::
134
+ .. doctest-requires :: mocpy
135
135
136
136
>>> from astropy import coordinates
137
137
>>> from regions import CircleSkyRegion
@@ -141,7 +141,7 @@ Let's add a criteria to get only images from the previous query:
141
141
>>> cone = CircleSkyRegion(center, radius)
142
142
>>> MOCServer.query_region(region = cone, intersect = " enclosed" ,
143
143
... fields= [' ID' , ' dataproduct_type' , ' moc_sky_fraction' ],
144
- ... meta_data= " dataproduct_type=image" ) # doctest: +IGNORE_OUTPUT
144
+ ... meta_data= " dataproduct_type=image" ) # doctest: +IGNORE_OUTPUT +REMOTE_DATA
145
145
<Table length=336>
146
146
ID dataproduct_type moc_sky_fraction
147
147
str49 str5 float64
@@ -178,11 +178,11 @@ Let's do a search on the whole sky by omitting the region parameter.
178
178
The next example retrieves all the ``moc_access_url `` of datasets having ``HST `` in
179
179
their identifier. These correspond to the Hubble surveys:
180
180
181
- .. doctest-remote-data ::
181
+ .. doctest-requires :: mocpy
182
182
183
183
>>> MOCServer.query_region(meta_data = " ID=*HST*" ,
184
184
... fields= [' ID' , ' moc_access_url' ],
185
- ... casesensitive= False ) # doctest: +IGNORE_OUTPUT
185
+ ... casesensitive= False ) # doctest: +IGNORE_OUTPUT +REMOTE_DATA
186
186
<Table length=45>
187
187
ID moc_access_url
188
188
str26 str51
@@ -218,10 +218,10 @@ such as `ipyaladin <https://github.com/cds-astro/ipyaladin>`_. The
218
218
It accepts the same parameters (``region `` and ``meta_data `` for example) as the other
219
219
methods. The only difference is that the output will only contain HiPS data.
220
220
221
- .. doctest-remote-data ::
221
+ .. doctest-requires :: mocpy
222
222
223
223
>>> from astroquery.mocserver import MOCServer
224
- >>> MOCServer.query_hips(coordinate_system = " mars" ) # doctest: +IGNORE_OUTPUT
224
+ >>> MOCServer.query_hips(coordinate_system = " mars" ) # doctest: +IGNORE_OUTPUT +REMOTE_DATA
225
225
<Table length=25>
226
226
ID ...
227
227
str35 ...
@@ -263,7 +263,7 @@ are ``ID``, ``obs_title``, ``obs_description``, ``nb_rows``, ``obs_regime``,
263
263
To change this default behavior, use the ``fields `` parameter.
264
264
Let's say we would like only the ``ID ``, and the ``moc_sky_fraction `` for this query:
265
265
266
- .. doctest-remote-data ::
266
+ .. doctest-requires :: mocpy
267
267
268
268
>>> from astropy import coordinates
269
269
>>> from regions import CircleSkyRegion
@@ -273,7 +273,7 @@ Let's say we would like only the ``ID``, and the ``moc_sky_fraction`` for this q
273
273
>>> cone = CircleSkyRegion(center, radius)
274
274
>>> MOCServer.query_region(region = cone,
275
275
... intersect= " enclosed" ,
276
- ... fields= [' ID' , ' moc_sky_fraction' ]) # doctest: +IGNORE_OUTPUT
276
+ ... fields= [' ID' , ' moc_sky_fraction' ]) # doctest: +IGNORE_OUTPUT +REMOTE_DATA
277
277
<Table length=450>
278
278
ID moc_sky_fraction
279
279
str49 float64
@@ -297,11 +297,11 @@ Limiting the number of returned datasets
297
297
298
298
Another parameter called ``max_rec `` specifies an upper limit for the number of data-sets to be returned:
299
299
300
- .. doctest-remote-data ::
300
+ .. doctest-requires :: mocpy
301
301
302
302
>>> from astroquery.mocserver import MOCServer
303
303
>>> from mocpy import MOC
304
- >>> MOCServer.query_region(region = MOC .from_string(" 5/22-24" ), max_rec = 3 ) # doctest: +IGNORE_OUTPUT
304
+ >>> MOCServer.query_region(region = MOC .from_string(" 5/22-24" ), max_rec = 3 ) # doctest: +IGNORE_OUTPUT +REMOTE_DATA
305
305
<Table length=3>
306
306
ID ... dataproduct_type
307
307
str24 ... str7
@@ -325,14 +325,14 @@ of the returned MOC.
325
325
As an example, we would like to obtain the union of the space coverage of all the
326
326
Hubble surveys:
327
327
328
- .. doctest-remote-data ::
328
+ .. doctest-requires :: mocpy
329
329
330
330
>>> from mocpy import MOC
331
331
>>> import matplotlib.pyplot as plt
332
332
>>> from astroquery.mocserver import MOCServer
333
333
>>> moc = MOCServer.query_region(return_moc = " smoc" ,
334
334
... max_norder= 20 ,
335
- ... meta_data= " ID=*HST*" )
335
+ ... meta_data= " ID=*HST*" ) # doctest: +REMOTE_DATA
336
336
337
337
The resulting MOC looks like:
338
338
@@ -346,14 +346,14 @@ To retrieve the MOC of a specific dataset, we can use
346
346
This example will show you how to get the space-time MOC (i.e. a `mocpy.STMOC `
347
347
object) of the ``GALEXGR6/AIS/FUV `` survey.
348
348
349
- .. doctest-remote-data ::
349
+ .. doctest-requires :: mocpy
350
350
351
351
>>> from mocpy import MOC
352
352
>>> from astroquery.mocserver import MOCServer
353
353
>>> moc_galex = MOCServer.query_region(meta_data = " ID=CDS/P/GALEXGR6/AIS/FUV" ,
354
- ... return_moc= " stmoc" , max_norder= " s7 t26" )
354
+ ... return_moc= " stmoc" , max_norder= " s7 t26" ) # doctest: +REMOTE_DATA
355
355
>>> print (f " GALEX GR6 contains data taken from { moc_galex.min_time.iso} to "
356
- ... f " { moc_galex.max_time.iso} . " )
356
+ ... f " { moc_galex.max_time.iso} . " ) # doctest: +REMOTE_DATA
357
357
GALEX GR6 contains data taken from 2010-03-31 18:02:05.602 to 2010-06-01 18:57:24.787.
358
358
359
359
.. note ::
@@ -369,21 +369,21 @@ The default value for ``coordinate_system`` is ``None``. It means that we're loo
369
369
data for the sky and all other possible frames. This parameter can take all the values
370
370
listed by `astroquery.mocserver.MOCServerClass.list_coordinate_systems `:
371
371
372
- .. doctest-remote-data ::
372
+ .. doctest-requires :: mocpy
373
373
374
374
>>> from astroquery.mocserver import MOCServer
375
- >>> MOCServer.list_coordinate_systems()
375
+ >>> MOCServer.list_coordinate_systems() # doctest: +REMOTE_DATA
376
376
['ariel', 'callisto', 'ceres', 'charon', 'dione', 'earth', 'enceladus', 'equatorial', 'europa', 'galactic', 'ganymede', 'iapetus', 'io', 'jupiter', 'mars', 'mars-pia20284', 'mars-pia24422', 'mars-stimson', 'mercury', 'mimas', 'miranda', 'moon', 'moon-pan1', 'neptune', 'oberon', 'pluto', 'rhea', 'sky', 'sun', 'tethys', 'titan', 'titania', 'triton', 'umbriel', 'venus']
377
377
378
378
Where the special value ``sky `` means any celestial frame (mainly ``equatorial `` and
379
379
``galactic ``).
380
380
381
381
The ``coordinate_system `` parameter can be used in any of the query methods like so:
382
382
383
- .. doctest-remote-data ::
383
+ .. doctest-requires :: mocpy
384
384
385
385
>>> from astroquery.mocserver import MOCServer
386
- >>> MOCServer.query_hips(coordinate_system = " ariel" )
386
+ >>> MOCServer.query_hips(coordinate_system = " ariel" ) # doctest: +REMOTE_DATA
387
387
<Table length=1>
388
388
ID obs_title ... dataproduct_type
389
389
str19 str13 ... str5
0 commit comments