12
12
from astropy .table import Table , Column
13
13
from astropy .io import ascii
14
14
from astropy .time import Time
15
- from astropy .utils .exceptions import AstropyDeprecationWarning
16
15
17
16
# 3. local imports - use relative imports
18
17
# commonly required local imports shown below as example
30
29
class HorizonsClass (BaseQuery ):
31
30
"""
32
31
A class for querying the
33
- `JPL Horizons <https://ssd.jpl.nasa.gov/horizons.cgi >`_ service.
32
+ `JPL Horizons <https://ssd.jpl.nasa.gov/horizons/ >`_ service.
34
33
"""
35
34
36
35
TIMEOUT = conf .timeout
@@ -48,7 +47,7 @@ def __init__(self, id=None, location=None, epochs=None,
48
47
orbital element or vector queries. Uses the same codes as JPL
49
48
Horizons. If no location is provided, Earth's center is used for
50
49
ephemerides queries and the Sun's center for elements and vectors
51
- queries. Arbitrary topocentic coordinates for ephemerides queries
50
+ queries. Arbitrary topocentric coordinates for ephemerides queries
52
51
can be provided in the format of a dictionary. The dictionary has to
53
52
be of the form {``'lon'``: longitude in deg (East positive, West
54
53
negative), ``'lat'``: latitude in deg (North positive, South
@@ -66,13 +65,12 @@ def __init__(self, id=None, location=None, epochs=None,
66
65
time is used.
67
66
id_type : str, optional
68
67
Controls Horizons's object selection for ``id``
69
- [HORIZONSDOC_SELECTION]_ . Options: ``'majorbody'`` (DEPRECATED,
70
- use ``''``), ``'designation'`` (small body designation), ``'name'``
71
- (asteroid or comet name), ``'asteroid_name'``, ``'comet_name'``,
72
- ``'id'`` (Horizons ID number), ``'smallbody'`` (asteroid and comet
73
- search), or ``''`` (empty string; first search search planets,
74
- natural satellites, spacecraft, and special cases, then small
75
- bodies).
68
+ [HORIZONSDOC_SELECTION]_ . Options: ``'designation'`` (small body
69
+ designation), ``'name'`` (asteroid or comet name),
70
+ ``'asteroid_name'``, ``'comet_name'``, ``'smallbody'`` (asteroid
71
+ and comet search), or ``None`` (first search search planets,
72
+ natural satellites, spacecraft, and special cases, and if no
73
+ matches, then search small bodies).
76
74
77
75
References
78
76
----------
@@ -110,19 +108,9 @@ def __init__(self, id=None, location=None, epochs=None,
110
108
self .epochs = epochs
111
109
112
110
# check for id_type
113
- if id_type is None :
114
- warnings .warn ('id_type was not specified, defaulting to a '
115
- '"smallbody" search. This behavior is deprecated and will be '
116
- 'changed to "" (empty string / Horizons default) in the future.' ,
117
- AstropyDeprecationWarning )
118
- id_type = 'smallbody'
119
- elif id_type == 'majorbody' :
120
- warnings .warn ('id_type "majorbody" is deprecated and will be '
121
- 'removed. For the equivalent search behavior, use "" (empty '
122
- 'string).' , AstropyDeprecationWarning )
123
- id_type = ''
124
- if id_type not in ['' , 'smallbody' , 'designation' , 'name' ,
125
- 'asteroid_name' , 'comet_name' , 'id' ]:
111
+
112
+ if id_type not in [None , 'smallbody' , 'designation' , 'name' ,
113
+ 'asteroid_name' , 'comet_name' ]:
126
114
raise ValueError ('id_type ({:s}) not allowed' .format (id_type ))
127
115
self .id_type = id_type
128
116
0 commit comments