@@ -21,8 +21,8 @@ class NEOCCClass(BaseQuery):
2121 """
2222 Class to init ESA NEOCC Python interface library
2323 """
24- @ staticmethod
25- def query_list (list_name ):
24+
25+ def query_list (self , list_name ):
2626 """Get requested list data from ESA NEOCC.
2727
2828 Different lists that can be requested are:
@@ -57,50 +57,6 @@ def query_list(list_name):
5757 neocc_lst : `~astropy.table.Table`
5858 Astropy Table which contains the data of the requested list.
5959
60- Examples
61- --------
62- **NEA list** The output of this list is a `~astropy.table.Table` which contains
63- the list of all NEAs currently considered in the NEOCC system.
64-
65- >>> from astroquery.esa.neocc import neocc
66- >>> list_data = neocc.query_list(list_name='nea_list') # doctest: +REMOTE_DATA
67- >>> print(list_data) # doctest: +IGNORE_OUTPUT +REMOTE_DATA
68- NEA
69- ---------------
70- 433 Eros
71- 719 Albert
72- 887 Alinda
73- 1036 Ganymed
74- 1221 Amor
75- 1566 Icarus
76- ...
77- 2023RD
78- 2023RE
79- 2023RF
80- 6344P-L
81- Length = 32558 rows
82-
83- **Close approaches (upcoming):** The output of this list is a `~astropy.table.Table` which
84- contains object with upcoming close approaches.
85-
86- >>> from astroquery.esa.neocc import neocc
87- >>> list_data = neocc.query_list(list_name='close_approaches_upcoming') # doctest: +REMOTE_DATA
88- >>> print(list_data) # doctest: +IGNORE_OUTPUT +REMOTE_DATA
89- Object Name Date ... Rel. vel in km/s CAI index
90- ----------- ----------------------- ... ---------------- ---------
91- 2021JA5 2023-09-07 00:00:00.000 ... 11.0 3.496
92- 2023QC5 2023-09-08 00:00:00.000 ... 7.6 2.662
93- 2020GE 2023-09-08 00:00:00.000 ... 1.4 3.308
94- 2020RS1 2023-09-10 00:00:00.000 ... 9.1 4.071
95- 2023QE8 2023-09-10 00:00:00.000 ... 14.5 1.039
96- ... ... ... ... ...
97- 2012SX49 2024-08-29 00:00:00.000 ... 4.3 2.665
98- 2016RJ20 2024-08-30 00:00:00.000 ... 14.8 2.118
99- 2021JT 2024-09-02 00:00:00.000 ... 8.3 4.216
100- 2021RB16 2024-09-02 00:00:00.000 ... 8.5 3.685
101- 2007RX8 2024-09-02 00:00:00.000 ... 7.0 2.322
102- Length = 176 rows
103-
10460 Note
10561 ----
10662 If the contents request fails the following message will be printed:
@@ -129,8 +85,7 @@ def query_list(list_name):
12985
13086 return neocc_list
13187
132- @staticmethod
133- def query_object (name , tab , * ,
88+ def query_object (self , name , tab , * ,
13489 orbital_elements = None , orbit_epoch = None ,
13590 observatory = None , start = None , stop = None , step = None , step_unit = None ):
13691 """Get requested object data from ESA NEOCC.
@@ -170,182 +125,6 @@ def query_object(name, tab, *,
170125 neocc_obj : list of `~astropy.table.Table`
171126 One or more tables containing the requested object data.
172127 the tab selected.
173-
174- Examples
175- --------
176- **Impacts**: This example shows several ways to build a table query for the
177- impacts table. Note that this table only requires the name of the object
178- as input and returns only a single table.
179-
180- The information can be obtained introducing directly the name of
181- the object, but it can be also added from the output of a
182- *query_list* search:
183-
184- >>> from astroquery.esa.neocc import neocc
185- >>> ast_impacts = neocc.query_object(name='1979XB', tab='impacts') # doctest: +REMOTE_DATA
186-
187- or
188-
189- >>> nea_list = neocc.query_list(list_name='nea_list') # doctest: +REMOTE_DATA
190- >>> print(nea_list["NEA"][3163]) # doctest: +REMOTE_DATA
191- 1979XB
192- >>> ast_impacts = neocc.query_object(name=nea_list["NEA"][3163], tab='impacts') # doctest: +REMOTE_DATA
193-
194- or
195-
196- >>> risk_list = neocc.query_list(list_name='risk_list') # doctest: +REMOTE_DATA
197- >>> print(risk_list['Object Name'][1]) # doctest: +REMOTE_DATA
198- 1979XB
199- >>> ast_impacts = neocc.query_object(name=risk_list['Object Name'][1], tab='impacts') # doctest: +REMOTE_DATA
200-
201- This query returns a list containing a single table:
202-
203- >>> print(ast_impacts[0]) # doctest: +IGNORE_OUTPUT +REMOTE_DATA
204- date MJD sigma sigimp ... Exp. Energy in MT PS TS
205- ----------------------- --------- ------ ------ ... ----------------- ----- ---
206- 2056-12-12 21:38:52.800 72344.902 0.255 0.0 ... 0.013 -2.86 0
207- 2065-12-16 11:06:43.200 75635.463 -1.11 0.0 ... 3.3e-05 -5.42 0
208- 2101-12-14 04:53:45.600 88781.204 -0.384 0.0 ... 8.6e-05 -5.32 0
209- 2113-12-14 18:04:19.200 93164.753 -0.706 0.0 ... 0.00879 -3.35 0
210-
211-
212- Note
213- ----
214- Most of the tables returned by this tye of query contain additional information
215- in the 'meta' property, including information about the table columns.
216-
217- >>> print(ast_impacts[0].meta.keys()) # doctest: +IGNORE_OUTPUT +REMOTE_DATA
218- odict_keys(['Column Info', 'observation_accepted', 'observation_rejected',
219- 'arc_start', 'arc_end', 'info', 'computation'])
220-
221-
222- **Physical Properties:** This example shows how to obtain the physical properties table.
223-
224- >>> from astroquery.esa.neocc import neocc
225- >>> properties = neocc.query_object(name='433', tab='physical_properties') # doctest: +REMOTE_DATA
226-
227- Again, the output is a list containing a single table.
228-
229- >>> print(properties[0]) # doctest: +IGNORE_OUTPUT +REMOTE_DATA
230- Property ...
231- ----------------------- ...
232- Absolute Magnitude (H) ...
233- Absolute Magnitude (H) ...
234- Albedo ...
235- Amplitude ...
236- Color Index Information ...
237- Color Index Information ...
238- Color Index Information ...
239- Color Index Information ...
240- Diameter ...
241- Quality ...
242- Rotation Direction ...
243- Rotation Period ...
244- Sightings ...
245- Sightings ...
246- Slope Parameter (G) ...
247- Spinvector B ...
248- Spinvector L ...
249- Taxonomy ...
250- Taxonomy (all) ...
251-
252-
253- **Observations:** In this example we query for Observations tables, a query that
254- returns a list containing 3-5 `astropy.table.Table`s depending if there are
255- "Roving observer" or satellite observations.
256-
257- >>> ast_observations = neocc.query_object(name='99942', tab='observations') # doctest: +REMOTE_DATA
258- >>> for tab in ast_observations: # doctest: +REMOTE_DATA
259- ... print(tab.meta["Title"])
260- Observation metadata
261- Optical Observations
262- Satellite Observations
263- Radar Observations
264- >>> sat_obs = ast_observations[2] # doctest: +REMOTE_DATA
265- >>> print(sat_obs) # doctest: +IGNORE_OUTPUT +REMOTE_DATA
266- Design. K T N ... X Y Z Obs Code
267- ------- --- --- --- ... ---------- ----------------- ------------------ --------
268- 99942 S s -- ... -5634.1734 -2466.2657 -3038.3924 C51
269- 99942 S s -- ... -5654.1816 -2501.9465 -2971.1902 C51
270- 99942 S s -- ... -5645.7831 -2512.1036 -2978.6411 C51
271- 99942 S s -- ... -5617.3465 -2486.4031 -3053.2209 C51
272- 99942 S s -- ... -5620.3829 -2542.3521 -3001.1135 C51
273- ... ... ... ... ... ... ... ... ...
274- 99942 S s -- ... -4105.3228 5345.915299999999 1235.1318 C51
275- 99942 S s -- ... -4117.8192 5343.1834 1205.2107 C51
276- 99942 S s -- ... -4137.4411 5329.7318 1197.3972 C51
277- 99942 S s -- ... -4144.5939 5319.084499999999 1219.4675 C51
278- Length = 1357 rows
279-
280- **Close Approaches**: This example queris for close approaches, another query
281- which results in a single data table.
282-
283- >>> close_appr = neocc.query_object(name='99942', tab='close_approaches') # doctest: +REMOTE_DATA
284- >>> print(close_appr[0]) # doctest: +IGNORE_OUTPUT +REMOTE_DATA
285- BODY CALENDAR-TIME MJD-TIME ... STRETCH WIDTH PROBABILITY
286- ----- ----------------------- --------------- ... --------- --------- -----------
287- EARTH 1957-04-01T03:19:44.544 35929.138710654 ... 2.871e-05 5.533e-09 1.0
288- EARTH 1964-10-24T21:44:40.127 38692.906017295 ... 1.72e-05 5.033e-09 1.0
289- EARTH 1965-02-11T12:15:30.527 38802.510774301 ... 4.732e-06 1.272e-09 1.0
290- EARTH 1972-12-24T11:51:41.472 41675.494228687 ... 1.584e-05 4.627e-09 1.0
291- EARTH 1980-12-18T01:51:14.400 44591.077250448 ... 1.136e-05 5.436e-09 1.0
292- ... ... ... ... ... ... ...
293- EARTH 2087-04-07T09:10:54.912 83417.382583343 ... 0.01214 3.978e-08 1.0
294- EARTH 2102-09-11T03:12:44.640 89052.133849042 ... 0.08822 1.191e-06 0.751
295- EARTH 2109-03-22T13:19:55.200 91436.555501683 ... 0.3509 1.066e-06 0.189
296- EARTH 2109-06-08T14:21:12.384 91514.598061046 ... 0.1121 1.149e-06 0.577
297- EARTH 2116-04-07T12:48:42.912 94009.53382919 ... 0.7074 9.723e-08 0.0943
298- [18 rows x 10 columns]
299-
300- **Orbit Properties:** In order to access the orbital properties
301- information, it is necessary to provide two additional inputs to
302- *query_object* method: `orbital_elements` and `orbit_epoch`.
303-
304- This query returns a list of three tables, the orbital properties, and the covariance
305- and corotation matrices.
306-
307- >>> ast_orbit_prop = neocc.query_object(name='99942', tab='orbit_properties', orbital_elements='keplerian',
308- ... orbit_epoch='present') # doctest: +REMOTE_DATA
309- >>> for tab in ast_orbit_prop: # doctest: +REMOTE_DATA
310- ... print(tab.meta["Title"])
311- Orbital Elements
312- COV
313- COR
314- >>> print(ast_orbit_prop[0][:5]) # doctest: +IGNORE_OUTPUT +REMOTE_DATA
315- Section Property Value
316- -------- -------- -----------------------
317- ANODE ANODE -8.6707715058413322E-04
318- APHELION APHELION 1.0993687643243035E+00
319- DNODE DNODE -1.9894296321957006E-01
320- HEADER format OEF2.0
321- HEADER rectype ML
322-
323-
324- **Ephemerides:** In order to access ephemerides information, it
325- is necessary to provide five additional inputs to *query_object*
326- method: `observatory`, `start`, `stop`, `step` and `step_unit`.
327-
328- >>> ast_ephemerides = neocc.query_object(name='99942', tab='ephemerides', observatory='500',
329- ... start='2019-05-08 01:30', stop='2019-05-23 01:30',
330- ... step='1', step_unit='days') # doctest: +REMOTE_DATA
331- >>> ast_ephemerides = ast_ephemerides[0] # doctest: +REMOTE_DATA
332- >>> print(ast_ephemerides.meta.keys()) # doctest: +REMOTE_DATA
333- odict_keys(['Ephemerides generation for', 'Observatory', 'Initial Date',
334- 'Final Date', 'Time step', 'Column Info'])
335- >>> print(ast_ephemerides) # doctest: +IGNORE_OUTPUT +REMOTE_DATA
336- Date MJD (UTC) RA (h m s) ... Err1 (") Err2 (") AngAx (deg)
337- ----------------------- ---------- ------------ ... -------- -------- -----------
338- 2019-05-08T01:30:00.000 58611.0625 6 43 40.510 ... 0.001 0.0 115.8
339- 2019-05-09T01:30:00.000 58612.0625 6 47 20.055 ... 0.001 0.0 117.3
340- 2019-05-10T01:30:00.000 58613.0625 6 50 59.059 ... 0.001 0.0 119.0
341- 2019-05-11T01:30:00.000 58614.0625 6 54 37.518 ... 0.001 0.0 120.8
342- 2019-05-12T01:30:00.000 58615.0625 6 58 15.428 ... 0.001 0.0 122.8
343- ... ... ... ... ... ... ...
344- 2019-05-19T01:30:00.000 58622.0625 7 23 25.375 ... 0.001 0.0 143.8
345- 2019-05-20T01:30:00.000 58623.0625 7 26 58.899 ... 0.001 0.0 147.6
346- 2019-05-21T01:30:00.000 58624.0625 7 30 31.891 ... 0.001 0.0 151.5
347- 2019-05-22T01:30:00.000 58625.0625 7 34 4.357 ... 0.001 0.001 155.2
348- 2019-05-23T01:30:00.000 58626.0625 7 37 36.303 ... 0.001 0.001 158.7
349128 """
350129
351130 # Define a list with all possible tabs to be requested
0 commit comments