1
- .. doctest-skip-all
2
-
3
1
.. _astroquery.oac :
4
2
5
3
**********************************
@@ -24,6 +22,7 @@ The default behavior returns a top-level list of all available metadata for the
24
22
queried event(s).
25
23
26
24
.. code-block :: python
25
+ .. doctest-remote-data ::
27
26
28
27
>>> from astroquery.oac import OAC
29
28
>>> metadata = OAC .query_object(" GW170817" )
@@ -32,21 +31,23 @@ The query can be further refined by using the available QUANTITY and ATTRIBUTE
32
31
options. For example, to retrieve the light curve for an object:
33
32
34
33
.. code-block :: python
34
+ .. doctest-remote-data ::
35
35
36
36
>>> 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" ])
40
40
41
41
The results of a query can be further refined by using the ARGUMENT option
42
42
43
43
.. code-block :: python
44
+ .. doctest-remote-data ::
44
45
45
46
>>> 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" ])
50
51
51
52
The second method available is query_region which performs a cone or box
52
53
search for a given set of coordinates. Coordinates can be submitted as an Astropy
@@ -57,6 +58,7 @@ a single set of coordinates.
57
58
For this example, we first establish coordinates and search parameters:
58
59
59
60
.. code-block :: python
61
+ .. doctest-remote-data ::
60
62
61
63
>>> import astropy.coordinates as coord
62
64
>>> import astropy.units as u
@@ -72,24 +74,26 @@ For this example, we first establish coordinates and search parameters:
72
74
An example cone search:
73
75
74
76
.. code-block :: python
77
+ .. doctest-remote-data ::
75
78
76
79
>>> 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" ])
82
85
83
86
An example box search:
84
87
85
88
.. code-block :: python
89
+ .. doctest-remote-data ::
86
90
87
91
>>> 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" ])
93
97
94
98
As with the query_object method, searches using query_region can be refined
95
99
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
108
112
given event or list of events.
109
113
110
114
.. code-block :: python
115
+ .. doctest-remote-data ::
111
116
112
117
>>> from astroquery.oac import OAC
113
118
>>> photometry = OAC .get_photometry(" SN2014J" )
@@ -119,7 +124,7 @@ For example, to retrieve only R-band photometry:
119
124
120
125
.. code-block :: python
121
126
122
- >> > photometry = OAC .get_photometry(" SN2014J" , argument = " band=R" )
127
+ >> > photometry = OAC .get_photometry(" SN2014J" , argument = " band=R" ) # doctest: +REMOTE_DATA
123
128
124
129
The output is an Astropy table.
125
130
@@ -128,6 +133,7 @@ single object at a specified time. The time should be given in MJD, but does
128
133
not have to be exact. The query will return the spectrum that is closest in time.
129
134
130
135
.. code-block :: python
136
+ .. doctest-remote-data ::
131
137
132
138
>>> from astroquery.oac import OAC
133
139
>>> test_time = 57740
@@ -139,6 +145,7 @@ The method get_spectra is designed to return all available spectra for an event
139
145
or list of events.
140
146
141
147
.. code-block :: python
148
+ .. doctest-remote-data ::
142
149
143
150
>>> from astroquery.oac import OAC
144
151
>>> spectra = OAC .get_spectra(" SN2014J" )
0 commit comments