Skip to content

Commit 20ced03

Browse files
tinuademargaretbsipocz
authored andcommitted
oac doc cleanup
1 parent 05baf1d commit 20ced03

File tree

1 file changed

+27
-20
lines changed

1 file changed

+27
-20
lines changed

docs/oac/oac.rst

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

53
**********************************
@@ -24,6 +22,7 @@ The default behavior returns a top-level list of all available metadata for the
2422
queried event(s).
2523

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

2827
>>> from astroquery.oac import OAC
2928
>>> metadata = OAC.query_object("GW170817")
@@ -32,21 +31,23 @@ 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

3433
.. code-block:: python
34+
.. doctest-remote-data::
3535

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

4141
The results of a query can be further refined by using the ARGUMENT option
4242

4343
.. code-block:: python
44+
.. doctest-remote-data::
4445

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

5152
The second method available is query_region which performs a cone or box
5253
search for a given set of coordinates. Coordinates can be submitted as an Astropy
@@ -57,6 +58,7 @@ a single set of coordinates.
5758
For this example, we first establish coordinates and search parameters:
5859

5960
.. code-block:: python
61+
.. doctest-remote-data::
6062

6163
>>> import astropy.coordinates as coord
6264
>>> import astropy.units as u
@@ -72,24 +74,26 @@ For this example, we first establish coordinates and search parameters:
7274
An example cone search:
7375

7476
.. code-block:: python
77+
.. doctest-remote-data::
7578

7679
>>> photometry = OAC.query_region(coordinates=test_coords,
77-
radius=test_radius,
78-
quantity="photometry",
79-
attribute=["time", "magnitude",
80-
"e_magnitude", "band",
81-
"instrument"])
80+
... radius=test_radius,
81+
... quantity="photometry",
82+
... attribute=["time", "magnitude",
83+
... "e_magnitude", "band",
84+
... "instrument"])
8285

8386
An example box search:
8487

8588
.. code-block:: python
89+
.. doctest-remote-data::
8690

8791
>>> 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"])
92+
... width=test_width, height=test_height,
93+
... quantity="photometry",
94+
... attribute=["time", "magnitude",
95+
... "e_magnitude", "band",
96+
... "instrument"])
9397

9498
As with the query_object method, searches using query_region can be refined
9599
using the QUANTITY, ATTRIBUTE, and ARGUMENT options. The complete list of
@@ -108,6 +112,7 @@ The method get_photometry is designed to quickly return the photometry for a
108112
given event or list of events.
109113

110114
.. code-block:: python
115+
.. doctest-remote-data::
111116

112117
>>> from astroquery.oac import OAC
113118
>>> photometry = OAC.get_photometry("SN2014J")
@@ -119,7 +124,7 @@ For example, to retrieve only R-band photometry:
119124

120125
.. code-block:: python
121126
122-
>>> photometry = OAC.get_photometry("SN2014J", argument="band=R")
127+
>>> photometry = OAC.get_photometry("SN2014J", argument="band=R") # doctest: +REMOTE_DATA
123128
124129
The output is an Astropy table.
125130

@@ -128,6 +133,7 @@ single object at a specified time. The time should be given in MJD, but does
128133
not have to be exact. The query will return the spectrum that is closest in time.
129134

130135
.. code-block:: python
136+
.. doctest-remote-data::
131137

132138
>>> from astroquery.oac import OAC
133139
>>> test_time = 57740
@@ -139,6 +145,7 @@ The method get_spectra is designed to return all available spectra for an event
139145
or list of events.
140146

141147
.. code-block:: python
148+
.. doctest-remote-data::
142149

143150
>>> from astroquery.oac import OAC
144151
>>> spectra = OAC.get_spectra("SN2014J")

0 commit comments

Comments
 (0)