@@ -55,14 +55,14 @@ def designations_async(self, object_name, *,
55
55
>>> from astroquery.astorbdb import AstInfo
56
56
>>> designations = AstInfo.designations('Beagle')
57
57
>>> print(designations)
58
- OrderedDict({'alternate_designations': ['1954 HJ', 'A908 BJ', 'A917 ST' ], 'name': 'Beagle', 'number': 656, 'primary_designation': 'Beagle' })
58
+ OrderedDict({'alternate_designations': ['1954 HJ', ... ], 'name': 'Beagle', 'number': 656, ... })
59
59
"""
60
60
61
61
self .query_type = 'designations'
62
62
63
63
response = self ._request ('GET' ,
64
- url = self .URL + object_name + '/designations' ,
65
- timeout = self .TIMEOUT , cache = cache )
64
+ url = self .URL + object_name + '/designations' ,
65
+ timeout = self .TIMEOUT , cache = cache )
66
66
67
67
if get_raw_response :
68
68
self ._return_raw = True
@@ -73,9 +73,9 @@ def designations_async(self, object_name, *,
73
73
return response
74
74
75
75
def elements_async (self , object_name , * ,
76
- get_raw_response = False ,
77
- get_uri = False ,
78
- cache = True ):
76
+ get_raw_response = False ,
77
+ get_uri = False ,
78
+ cache = True ):
79
79
"""
80
80
This method uses a REST interface to query the `Lowell Observatory
81
81
astorbDB database <https://asteroid.lowell.edu/>`_ for orbital element
@@ -101,8 +101,8 @@ def elements_async(self, object_name, *,
101
101
self .query_type = 'elements'
102
102
103
103
response = self ._request ('GET' ,
104
- url = self .URL + object_name + '/elements' ,
105
- timeout = self .TIMEOUT , cache = cache )
104
+ url = self .URL + object_name + '/elements' ,
105
+ timeout = self .TIMEOUT , cache = cache )
106
106
107
107
if get_raw_response :
108
108
self ._return_raw = True
@@ -135,14 +135,14 @@ def orbit_async(self, object_name, *,
135
135
>>> from astroquery.astorbdb import AstInfo
136
136
>>> orbit = AstInfo.orbit('Beagle')
137
137
>>> print(orbit)
138
- OrderedDict({'a1con': <Quantity 0. AU / d2>, 'a2con': <Quantity 0. AU / d2>, 'a3con': <Quantity 0. AU / d2>, ...})
138
+ OrderedDict({'a1con': <Quantity 0. AU / d2>, 'a2con': <Quantity 0. AU / d2>, ...})
139
139
"""
140
140
141
141
self .query_type = 'orbit'
142
142
143
143
response = self ._request ('GET' ,
144
- url = self .URL + object_name + '/orbit' ,
145
- timeout = self .TIMEOUT , cache = cache )
144
+ url = self .URL + object_name + '/orbit' ,
145
+ timeout = self .TIMEOUT , cache = cache )
146
146
147
147
if get_raw_response :
148
148
self ._return_raw = True
@@ -153,9 +153,9 @@ def orbit_async(self, object_name, *,
153
153
return response
154
154
155
155
def albedos_async (self , object_name , * ,
156
- get_raw_response = False ,
157
- get_uri = False ,
158
- cache = True ):
156
+ get_raw_response = False ,
157
+ get_uri = False ,
158
+ cache = True ):
159
159
"""
160
160
This method uses a REST interface to query the `Lowell Observatory
161
161
astorbDB database <https://asteroid.lowell.edu/>`_ for albedo
@@ -183,8 +183,8 @@ def albedos_async(self, object_name, *,
183
183
self .query_type = 'albedos'
184
184
185
185
response = self ._request ('GET' ,
186
- url = self .URL + object_name + '/data/albedos' ,
187
- timeout = self .TIMEOUT , cache = cache )
186
+ url = self .URL + object_name + '/data/albedos' ,
187
+ timeout = self .TIMEOUT , cache = cache )
188
188
189
189
if get_raw_response :
190
190
self ._return_raw = True
@@ -195,9 +195,9 @@ def albedos_async(self, object_name, *,
195
195
return response
196
196
197
197
def colors_async (self , object_name , * ,
198
- get_raw_response = False ,
199
- get_uri = False ,
200
- cache = True ):
198
+ get_raw_response = False ,
199
+ get_uri = False ,
200
+ cache = True ):
201
201
"""
202
202
This method uses a REST interface to query the `Lowell Observatory
203
203
astorbDB database <https://asteroid.lowell.edu/>`_ for color
@@ -217,8 +217,8 @@ def colors_async(self, object_name, *,
217
217
>>> from astroquery.astorbdb import AstInfo
218
218
>>> colors = AstInfo.colors('Beagle')
219
219
>>> print(colors)
220
- [{'citation_bibcode': '2010PDSS..125.....S', ..., 'color': 0.431, 'color_error': 0.035, ..., 'sys_color': 'J-H'},
221
- {'citation_bibcode': '2010PDSS..125.....S', ..., 'color': 0.076, 'color_error': 0.041, ..., 'sys_color': 'H-K'},
220
+ [{..., 'color': 0.431, 'color_error': 0.035, ..., 'sys_color': 'J-H'},
221
+ {..., 'color': 0.076, 'color_error': 0.041, ..., 'sys_color': 'H-K'},
222
222
...]
223
223
"""
224
224
@@ -266,8 +266,8 @@ def taxonomies_async(self, object_name, *,
266
266
self .query_type = 'taxonomies'
267
267
268
268
response = self ._request ('GET' ,
269
- url = self .URL + object_name + '/data/taxonomies' ,
270
- timeout = self .TIMEOUT , cache = cache )
269
+ url = self .URL + object_name + '/data/taxonomies' ,
270
+ timeout = self .TIMEOUT , cache = cache )
271
271
272
272
if get_raw_response :
273
273
self ._return_raw = True
@@ -300,14 +300,14 @@ def lightcurves_async(self, object_name, *,
300
300
>>> from astroquery.astorbdb import AstInfo
301
301
>>> lightcurves = AstInfo.lightcurves('Beagle')
302
302
>>> print(lightcurves)
303
- [{'ambiguous_period': False, ..., 'amp_max': <Quantity 1.2 mag>, 'amp_min': <Quantity 0.57 mag>, ..., 'period': <Quantity 7.035 h>, ...}]
303
+ [{..., 'amp_max': <Quantity 1.2 mag>, 'amp_min': <Quantity 0.57 mag>, ..., 'period': <Quantity 7.035 h>, ...}]
304
304
"""
305
305
306
306
self .query_type = 'lightcurves'
307
307
308
308
response = self ._request ('GET' ,
309
- url = self .URL + object_name + '/data/lightcurves' ,
310
- timeout = self .TIMEOUT , cache = cache )
309
+ url = self .URL + object_name + '/data/lightcurves' ,
310
+ timeout = self .TIMEOUT , cache = cache )
311
311
312
312
if get_raw_response :
313
313
self ._return_raw = True
@@ -347,8 +347,8 @@ def dynamicalfamily_async(self, object_name, *,
347
347
self .query_type = 'dynamicalfamily'
348
348
349
349
response = self ._request ('GET' ,
350
- url = self .URL + object_name + '/data/dynamical-family' ,
351
- timeout = self .TIMEOUT , cache = cache )
350
+ url = self .URL + object_name + '/data/dynamical-family' ,
351
+ timeout = self .TIMEOUT , cache = cache )
352
352
353
353
if get_raw_response :
354
354
self ._return_raw = True
@@ -387,8 +387,8 @@ def escaperoutes_async(self, object_name, *,
387
387
self .query_type = 'escaperoutes'
388
388
389
389
response = self ._request ('GET' ,
390
- url = self .URL + object_name + '/data/escape-routes' ,
391
- timeout = self .TIMEOUT , cache = cache )
390
+ url = self .URL + object_name + '/data/escape-routes' ,
391
+ timeout = self .TIMEOUT , cache = cache )
392
392
393
393
if get_raw_response :
394
394
self ._return_raw = True
@@ -399,9 +399,9 @@ def escaperoutes_async(self, object_name, *,
399
399
return response
400
400
401
401
def all_astinfo_async (self , object_name , * ,
402
- get_raw_response = False ,
403
- get_uri = False ,
404
- cache = True ):
402
+ get_raw_response = False ,
403
+ get_uri = False ,
404
+ cache = True ):
405
405
"""
406
406
This method uses REST interfaces to query the `Lowell Observatory
407
407
astorbDB database <https://asteroid.lowell.edu/>`_ for all AstInfo
@@ -421,19 +421,20 @@ def all_astinfo_async(self, object_name, *,
421
421
>>> from astroquery.astorbdb import AstInfo
422
422
>>> all_astinfo = AstInfo.all_astinfo('Beagle')
423
423
>>> print(all_astinfo)
424
+
424
425
OrderedDict({
425
- 'designations': OrderedDict({'alternate_designations': ['1954 HJ', 'A908 BJ', 'A917 ST' ], 'name': 'Beagle', ...}),
426
+ 'designations': OrderedDict({'alternate_designations': ['1954 HJ', ... ], 'name': 'Beagle', ...}),
426
427
'elements': OrderedDict({'a': <Quantity 3.15597543 AU>, 'aphelion_dist': <Quantity 3.57009832 AU>, ...}),
427
- 'orbit': OrderedDict({'a1con': <Quantity 0. AU / d2>, 'a2con': <Quantity 0. AU / d2>, 'a3con': <Quantity 0. AU / d2>, ...}),
428
- 'albedos': [{'albedo': 0.065, 'albedo_error_lower': -0.002, 'albedo_error_upper': 0.002, ..., 'survey_name': 'Usui et al. (2011)'},
429
- {'albedo': 0.0625, 'albedo_error_lower': -0.015, 'albedo_error_upper': 0.015, ..., 'survey_name': 'Infrared Astronomical Satellite (IRAS)'},
428
+ 'orbit': OrderedDict({'a1con': <Quantity 0. AU / d2>, 'a2con': <Quantity 0. AU / d2>, ...}),
429
+ 'albedos': [{'albedo': 0.065, ..., 'survey_name': 'Usui et al. (2011)'},
430
+ {'albedo': 0.0625, ..., 'survey_name': 'Infrared Astronomical Satellite (IRAS)'},
430
431
...],
431
- 'colors': [{'citation_bibcode': '2010PDSS..125.....S', ..., 'color': 0.431, 'color_error': 0.035, ..., 'sys_color': 'J-H'},
432
- {'citation_bibcode': '2010PDSS..125.....S', ..., 'color': 0.076, 'color_error': 0.041, ..., 'sys_color': 'H-K'},
432
+ 'colors': [{..., 'color': 0.431, 'color_error': 0.035, ..., 'sys_color': 'J-H'},
433
+ {..., 'color': 0.076, 'color_error': 0.041, ..., 'sys_color': 'H-K'},
433
434
...],
434
- 'taxonomies': [{'citation_bibcode': '2011PDSS..145.....H', ..., 'survey_name': 'Carvano et al. (2010)', 'taxonomy': 'C', ...},
435
- {'citation_bibcode': '2013Icar..226..723D', ..., 'survey_name': 'DeMeo et al. (2013)', 'taxonomy': 'C', ...}],
436
- 'lightcurves': [{'ambiguous_period': False, ..., 'amp_max': <Quantity 1.2 mag>, 'amp_min': <Quantity 0.57 mag>, ..., 'period': <Quantity 7.035 h>, ...}],
435
+ 'taxonomies': [{..., 'survey_name': 'Carvano et al. (2010)', 'taxonomy': 'C', ...},
436
+ {..., 'survey_name': 'DeMeo et al. (2013)', 'taxonomy': 'C', ...}],
437
+ 'lightcurves': [{..., 'amp_max': <Quantity 1.2 mag>, ..., 'period': <Quantity 7.035 h>, ...}],
437
438
'dynamicalfamily': [{'citation_bibcode': '2015PDSS..234.....N', ..., 'family': 'Themis', ...},
438
439
{'citation_bibcode': '2015PDSS..234.....N', ..., 'family': 'Beagle', ...}],
439
440
'escaperoutes': []
@@ -445,40 +446,40 @@ def all_astinfo_async(self, object_name, *,
445
446
response = {}
446
447
447
448
response ['designations' ] = self ._request ('GET' ,
448
- url = self .URL + object_name + '/designations' ,
449
- timeout = self .TIMEOUT , cache = cache )
449
+ url = self .URL + object_name + '/designations' ,
450
+ timeout = self .TIMEOUT , cache = cache )
450
451
451
452
response ['elements' ] = self ._request ('GET' ,
452
- url = self .URL + object_name + '/elements' ,
453
- timeout = self .TIMEOUT , cache = cache )
453
+ url = self .URL + object_name + '/elements' ,
454
+ timeout = self .TIMEOUT , cache = cache )
454
455
455
456
response ['orbit' ] = self ._request ('GET' ,
456
- url = self .URL + object_name + '/orbit' ,
457
- timeout = self .TIMEOUT , cache = cache )
457
+ url = self .URL + object_name + '/orbit' ,
458
+ timeout = self .TIMEOUT , cache = cache )
458
459
459
460
response ['albedos' ] = self ._request ('GET' ,
460
- url = self .URL + object_name + '/data/albedos' ,
461
- timeout = self .TIMEOUT , cache = cache )
461
+ url = self .URL + object_name + '/data/albedos' ,
462
+ timeout = self .TIMEOUT , cache = cache )
462
463
463
464
response ['colors' ] = self ._request ('GET' ,
464
- url = self .URL + object_name + '/data/colors' ,
465
- timeout = self .TIMEOUT , cache = cache )
465
+ url = self .URL + object_name + '/data/colors' ,
466
+ timeout = self .TIMEOUT , cache = cache )
466
467
467
468
response ['taxonomies' ] = self ._request ('GET' ,
468
- url = self .URL + object_name + '/data/taxonomies' ,
469
- timeout = self .TIMEOUT , cache = cache )
469
+ url = self .URL + object_name + '/data/taxonomies' ,
470
+ timeout = self .TIMEOUT , cache = cache )
470
471
471
472
response ['lightcurves' ] = self ._request ('GET' ,
472
- url = self .URL + object_name + '/data/lightcurves' ,
473
- timeout = self .TIMEOUT , cache = cache )
473
+ url = self .URL + object_name + '/data/lightcurves' ,
474
+ timeout = self .TIMEOUT , cache = cache )
474
475
475
476
response ['dynamicalfamily' ] = self ._request ('GET' ,
476
- url = self .URL + object_name + '/data/dynamical-family' ,
477
- timeout = self .TIMEOUT , cache = cache )
477
+ url = self .URL + object_name + '/data/dynamical-family' ,
478
+ timeout = self .TIMEOUT , cache = cache )
478
479
479
480
response ['escaperoutes' ] = self ._request ('GET' ,
480
- url = self .URL + object_name + '/data/escape-routes' ,
481
- timeout = self .TIMEOUT , cache = cache )
481
+ url = self .URL + object_name + '/data/escape-routes' ,
482
+ timeout = self .TIMEOUT , cache = cache )
482
483
483
484
if get_raw_response :
484
485
self ._return_raw = True
@@ -709,6 +710,7 @@ def _process_data_escaperoutes(self, src):
709
710
710
711
return src
711
712
713
+
712
714
AstInfo = AstInfoClass ()
713
715
714
716
# once your class is done, tests should be written
0 commit comments