@@ -15,6 +15,7 @@ def test_ephemerides_query(self):
15
15
# check values of Ceres for a given epoch
16
16
# orbital uncertainty of Ceres is basically zero
17
17
res = jplhorizons .Horizons (id = 'Ceres' , location = '500' ,
18
+ id_type = 'smallbody' ,
18
19
epochs = 2451544.5 ).ephemerides ()[0 ]
19
20
20
21
assert res ['targetname' ] == "1 Ceres (A801 AA)"
@@ -152,7 +153,7 @@ def test_ephemerides_query_five(self):
152
153
153
154
def test_ephemerides_query_six (self ):
154
155
# tests optional constrains for ephemerides queries
155
- obj = jplhorizons .Horizons (id = '3552' ,
156
+ obj = jplhorizons .Horizons (id = '3552' , id_type = 'smallbody' ,
156
157
location = 'I33' ,
157
158
epochs = {'start' : '2018-05-01' ,
158
159
'stop' : '2018-08-01' ,
@@ -169,13 +170,14 @@ def test_ephemerides_query_six(self):
169
170
170
171
def test_ephemerides_query_raw (self ):
171
172
res = (jplhorizons .Horizons (id = 'Ceres' , location = '500' ,
172
- epochs = 2451544.5 ).
173
+ id_type = 'smallbody' , epochs = 2451544.5 ).
173
174
ephemerides (get_raw_response = True ))
174
175
175
176
assert len (res ) >= 15400
176
177
177
178
def test_elements_query (self ):
178
179
res = jplhorizons .Horizons (id = 'Ceres' , location = '500@10' ,
180
+ id_type = 'smallbody' ,
179
181
epochs = [2451544.5 ,
180
182
2451545.5 ]).elements ()[0 ]
181
183
@@ -204,6 +206,7 @@ def test_elements_query(self):
204
206
205
207
def test_elements_query_two (self ):
206
208
obj = jplhorizons .Horizons (id = 'Ceres' , location = '500@10' ,
209
+ id_type = 'smallbody' ,
207
210
epochs = [2451544.5 ,
208
211
2451545.5 ])
209
212
@@ -219,6 +222,7 @@ def test_elements_query_two(self):
219
222
220
223
def test_elements_query_raw (self ):
221
224
res = jplhorizons .Horizons (id = 'Ceres' , location = '500@10' ,
225
+ id_type = 'smallbody' ,
222
226
epochs = 2451544.5 ).elements (
223
227
get_raw_response = True )
224
228
@@ -228,6 +232,7 @@ def test_vectors_query(self):
228
232
# check values of Ceres for a given epoch
229
233
# orbital uncertainty of Ceres is basically zero
230
234
res = jplhorizons .Horizons (id = 'Ceres' , location = '500@10' ,
235
+ id_type = 'smallbody' ,
231
236
epochs = 2451544.5 ).vectors ()[0 ]
232
237
233
238
assert res ['targetname' ] == "1 Ceres (A801 AA)"
@@ -251,6 +256,7 @@ def test_vectors_query(self):
251
256
252
257
def test_vectors_query_raw (self ):
253
258
res = jplhorizons .Horizons (id = 'Ceres' , location = '500@10' ,
259
+ id_type = 'smallbody' ,
254
260
epochs = 2451544.5 ).vectors (
255
261
get_raw_response = True )
256
262
@@ -259,20 +265,20 @@ def test_vectors_query_raw(self):
259
265
def test_unknownobject (self ):
260
266
try :
261
267
jplhorizons .Horizons (id = 'spamspamspameggsspam' , location = '500' ,
262
- epochs = 2451544.5 ).ephemerides ()
268
+ id_type = '' , epochs = 2451544.5 ).ephemerides ()
263
269
except ValueError :
264
270
pass
265
271
266
272
def test_multipleobjects (self ):
267
273
try :
268
- jplhorizons .Horizons (id = '73P' , location = '500' ,
274
+ jplhorizons .Horizons (id = '73P' , location = '500' , id_type = 'smallbody' ,
269
275
epochs = 2451544.5 ).ephemerides ()
270
276
except ValueError :
271
277
pass
272
278
273
279
def test_uri (self ):
274
280
target = jplhorizons .Horizons (id = '3552' , location = '500' ,
275
- epochs = 2451544.5 )
281
+ id_type = 'smallbody' , epochs = 2451544.5 )
276
282
assert target .uri is None
277
283
278
284
target .ephemerides ()
@@ -299,10 +305,12 @@ def test__userdefinedlocation_ephemerides_query(self):
299
305
300
306
am_res = jplhorizons .Horizons (id = 'Ceres' ,
301
307
location = '688' ,
308
+ id_type = 'smallbody' ,
302
309
epochs = 2451544.5 ).ephemerides ()[0 ]
303
310
304
311
user_res = jplhorizons .Horizons (id = 'Ceres' ,
305
312
location = anderson_mesa ,
313
+ id_type = 'smallbody' ,
306
314
epochs = 2451544.5 ).ephemerides ()[0 ]
307
315
308
316
assert_quantity_allclose ([am_res ['RA' ], am_res ['DEC' ]],
@@ -321,7 +329,8 @@ def test_majorbody(self):
321
329
quantities = ('1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,'
322
330
'21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,'
323
331
'38,39,40,41,42,43' )
324
- target = jplhorizons .Horizons (id = '301' , location = '688' , epochs = epochs )
332
+ target = jplhorizons .Horizons (id = '301' , location = '688' , epochs = epochs ,
333
+ id_type = '' )
325
334
eph = target .ephemerides (quantities = quantities )
326
335
assert len (eph ) == 2
327
336
@@ -342,6 +351,7 @@ def test_airmass(self):
342
351
343
352
# verify data['a-mass'].filled(99) works:
344
353
target = jplhorizons .Horizons ('Ceres' , location = 'I41' ,
354
+ id_type = 'smallbody' ,
345
355
epochs = [2458300.5 ])
346
356
eph = target .ephemerides (quantities = '1,8' )
347
357
assert len (eph ) == 1
@@ -352,7 +362,8 @@ def test_airmass(self):
352
362
353
363
def test_vectors_aberrations (self ):
354
364
"""Check functionality of `aberrations` options"""
355
- obj = jplhorizons .Horizons (id = '1' , epochs = 2458500 , location = '500@0' )
365
+ obj = jplhorizons .Horizons (id = '1' , epochs = 2458500 , location = '500@0' ,
366
+ id_type = 'smallbody' )
356
367
357
368
vec = obj .vectors (aberrations = 'geometric' )
358
369
assert_quantity_allclose (vec ['x' ][0 ], - 2.086487005013347 )
@@ -364,7 +375,8 @@ def test_vectors_aberrations(self):
364
375
assert_quantity_allclose (vec ['x' ][0 ], - 2.086576286974797 )
365
376
366
377
def test_vectors_delta_T (self ):
367
- obj = jplhorizons .Horizons (id = '1' , epochs = 2458500 , location = '500@0' )
378
+ obj = jplhorizons .Horizons (id = '1' , epochs = 2458500 , location = '500@0' ,
379
+ id_type = 'smallbody' )
368
380
369
381
vec = obj .vectors (delta_T = False )
370
382
assert 'delta_T' not in vec .columns
@@ -373,7 +385,8 @@ def test_vectors_delta_T(self):
373
385
assert_quantity_allclose (vec ['delta_T' ][0 ], 69.184373 )
374
386
375
387
def test_ephemerides_extraprecision (self ):
376
- obj = jplhorizons .Horizons (id = '1' , epochs = 2458500 , location = 'G37' )
388
+ obj = jplhorizons .Horizons (id = '1' , epochs = 2458500 , location = 'G37' ,
389
+ id_type = 'smallbody' )
377
390
378
391
vec_simple = obj .ephemerides (extra_precision = False )
379
392
vec_highprec = obj .ephemerides (extra_precision = True )
0 commit comments