Skip to content

Commit 8a7e23d

Browse files
authored
Merge pull request #1956 from tinumide/nrao-others-doc-cleanup
Nvas, Oac Documentation cleanup
2 parents 986e41b + b1361d7 commit 8a7e23d

File tree

2 files changed

+39
-55
lines changed

2 files changed

+39
-55
lines changed

docs/nvas/nvas.rst

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. doctest-skip-all
2-
31
.. _astroquery.nvas:
42

53
********************************
@@ -19,20 +17,15 @@ coordinates can also be entered directly as a string that conforms to the
1917
format specified by `astropy.coordinates`. Some other parameters you may
2018
optionally specify are the ``radius`` and the frequency band for which the image
2119
must be fetched. You can also specify the maximum allowable noise level in mJy
22-
via the ``max_rms`` keyword parameter. By default this is set to 10000 mJy
20+
via the ``max_rms`` keyword parameter. By default this is set to 10000 mJy
21+
22+
.. doctest-remote-data::
2323

24-
.. code-block:: python
25-
2624
>>> from astroquery.nvas import Nvas
2725
>>> import astropy.units as u
28-
>>> images = Nvas.get_images("3c 273", radius=2*u.arcsec, band="K", max_rms=500)
29-
26+
>>> images = Nvas.get_images("3c 273", radius=2*u.arcsec, band="K", max_rms=500) # doctest: +IGNORE_WARNINGS
3027
1 images found.
31-
Downloading http://www.vla.nvas.edu/astro/archive/pipeline/position/J122906.7+020308/22.4I0.37_TEST_1995NOV15_1_352.U55.6S.imfits
32-
|===========================================| 10M/ 10M (100.00%) 19m37s
33-
34-
>>> images
35-
28+
>>> images # doctest: +IGNORE_OUTPUT
3629
[[<astropy.io.fits.hdu.image.PrimaryHDU at 0x3376150>]]
3730

3831

@@ -47,16 +40,15 @@ the bands. Here's a list of the valid values that this parameter can take. ::
4740
Let's look at an example that uses coordinates for specifying the search
4841
centre.
4942

50-
.. code-block:: python
43+
.. doctest-remote-data::
5144

5245
>>> from astroquery.nvas import Nvas
5346
>>> import astropy.coordinates as coord
5447
>>> import astropy.units as u
5548
>>> images = Nvas.get_images(coord.SkyCoord(49.489, -0.37,
56-
... unit=(u.deg, u.deg), frame='galactic'),
57-
... band="K")
49+
... unit=(u.deg, u.deg), frame='galactic'), band="K") # doctest: +IGNORE_WARNINGS
50+
2 images found.
5851

59-
6052
You may also fetch UVfits files rather than the IMfits files which is the
6153
default. To do this simply set the ``get_uvfits`` to ``True``, in any of the query
6254
methods. You can also fetch the URLs to the downloadable images rather than the
@@ -65,20 +57,15 @@ actual images themselves. To do this use the
6557
arguments as :meth:`~astroquery.nvas.NvasClass.get_images` above except for the
6658
``verbose`` argument which isn't relevant in this case.
6759

68-
.. code-block:: python
69-
60+
.. doctest-remote-data::
61+
7062
>>> from astroquery.nvas import Nvas
7163
>>> import astropy.coordinates as coord
7264
>>> import astropy.units as u
7365
>>> image_urls = Nvas.get_image_list("05h34m31.94s 22d00m52.2s",
74-
... radius='0d0m0.6s', max_rms=500)
75-
76-
WARNING: Coordinate string is being interpreted as an ICRS
77-
coordinate. [astroquery.utils.commons]
78-
66+
... radius='0d0m0.6s', max_rms=500) # doctest: +IGNORE_WARNINGS
7967
>>> image_urls
80-
81-
['http://www.vla.nrao.edu/astro/archive/pipeline/position/J053431.5+220114/1.51I4.12_T75_1986AUG12_1_118.U3.06M.imfits',
68+
['http://www.vla.nrao.edu/astro/archive/pipeline/position/J053431.5+220114/1.51I4.12_T75_1986AUG12_1_118.U3.06M.imfits',
8269
'http://www.vla.nrao.edu/astro/archive/pipeline/position/J053431.5+220114/1.51I3.92_T75_1986AUG20_1_373.U2.85M.imfits',
8370
'http://www.vla.nrao.edu/astro/archive/pipeline/position/J053431.5+220114/4.89I1.22_T75_1986AUG12_1_84.8U2.73M.imfits',
8471
'http://www.vla.nrao.edu/astro/archive/pipeline/position/J053431.9+220052/1.44I1.26_AH0336_1989FEB03_1_197.U8.29M.imfits',

docs/oac/oac.rst

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
.. doctest-skip-all
2-
31
.. _astroquery.oac:
42

53
**********************************
@@ -16,37 +14,38 @@ at the `OAC API Github Repository <https://github.com/astrocatalogs/OACAPI>`_
1614

1715
Primary Methods
1816
===============
17+
1918
There are two primary methods for submitting API queries. The first is query_object
2019
which can be used to search the OAC based on an event name. Multiple events can
2120
be retrieved by submitting a list of event names.
2221

2322
The default behavior returns a top-level list of all available metadata for the
2423
queried event(s).
2524

26-
.. code-block:: python
25+
.. doctest-remote-data::
2726

2827
>>> from astroquery.oac import OAC
2928
>>> metadata = OAC.query_object("GW170817")
3029

3130
The query can be further refined by using the available QUANTITY and ATTRIBUTE
3231
options. For example, to retrieve the light curve for an object:
3332

34-
.. code-block:: python
33+
.. doctest-remote-data::
3534

3635
>>> photometry = OAC.query_object("GW170817", quantity="photometry",
37-
attribute=["time", "magnitude",
38-
"e_magnitude", "band",
39-
"instrument"])
36+
... attribute=["time", "magnitude",
37+
... "e_magnitude", "band",
38+
... "instrument"])
4039

4140
The results of a query can be further refined by using the ARGUMENT option
4241

43-
.. code-block:: python
42+
.. doctest-remote-data::
4443

4544
>>> photometry = OAC.query_object("GW170817", quantity="photometry",
46-
attribute=["time", "magnitude",
47-
"e_magnitude", "band",
48-
"instrument"],
49-
argument=["band=i"])
45+
... attribute=["time", "magnitude",
46+
... "e_magnitude", "band",
47+
... "instrument"],
48+
... argument=["band=i"])
5049

5150
The second method available is query_region which performs a cone or box
5251
search for a given set of coordinates. Coordinates can be submitted as an Astropy
@@ -56,7 +55,7 @@ a single set of coordinates.
5655

5756
For this example, we first establish coordinates and search parameters:
5857

59-
.. code-block:: python
58+
.. doctest-remote-data::
6059

6160
>>> import astropy.coordinates as coord
6261
>>> import astropy.units as u
@@ -71,25 +70,22 @@ For this example, we first establish coordinates and search parameters:
7170

7271
An example cone search:
7372

74-
.. code-block:: python
73+
.. doctest-remote-data::
7574

76-
>>> photometry = OAC.query_region(coordinates=test_coords,
77-
radius=test_radius,
78-
quantity="photometry",
79-
attribute=["time", "magnitude",
80-
"e_magnitude", "band",
81-
"instrument"])
75+
>>> photometry = OAC.query_region(coordinates=test_coords, radius=test_radius,
76+
... quantity="photometry",
77+
... attribute=["time", "magnitude",
78+
... "e_magnitude", "band", "instrument"])
8279

8380
An example box search:
8481

85-
.. code-block:: python
82+
.. doctest-remote-data::
8683

8784
>>> photometry = OAC.query_region(coordinates=test_coords,
88-
width=test_width, height=test_height,
89-
quantity="photometry",
90-
attribute=["time", "magnitude",
91-
"e_magnitude", "band",
92-
"instrument"])
85+
... width=test_width, height=test_height,
86+
... quantity="photometry",
87+
... attribute=["time", "magnitude",
88+
... "e_magnitude", "band", "instrument"])
9389

9490
As with the query_object method, searches using query_region can be refined
9591
using the QUANTITY, ATTRIBUTE, and ARGUMENT options. The complete list of
@@ -101,13 +97,14 @@ data_format option.
10197

10298
Tailored Methods
10399
================
100+
104101
There are three tailed search methods available to users to facilitate quick
105102
retrieval of common data products.
106103

107104
The method get_photometry is designed to quickly return the photometry for a
108105
given event or list of events.
109106

110-
.. code-block:: python
107+
.. doctest-remote-data::
111108

112109
>>> from astroquery.oac import OAC
113110
>>> photometry = OAC.get_photometry("SN2014J")
@@ -117,7 +114,7 @@ query_object. More complex queries should use the base query_object method.
117114

118115
For example, to retrieve only R-band photometry:
119116

120-
.. code-block:: python
117+
.. doctest-remote-data::
121118

122119
>>> photometry = OAC.get_photometry("SN2014J", argument="band=R")
123120

@@ -127,7 +124,7 @@ The method get_single_spectrum is designed to retrieve a single spectrum for a
127124
single object at a specified time. The time should be given in MJD, but does
128125
not have to be exact. The query will return the spectrum that is closest in time.
129126

130-
.. code-block:: python
127+
.. doctest-remote-data::
131128

132129
>>> from astroquery.oac import OAC
133130
>>> test_time = 57740
@@ -138,7 +135,7 @@ The output is an Astropy table.
138135
The method get_spectra is designed to return all available spectra for an event
139136
or list of events.
140137

141-
.. code-block:: python
138+
.. doctest-remote-data::
142139

143140
>>> from astroquery.oac import OAC
144141
>>> spectra = OAC.get_spectra("SN2014J")

0 commit comments

Comments
 (0)