1
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2

3 1
"""
4
JPLHorizons
5
-----------
6

7
:author: Michael Mommert (mommermiscience@gmail.com)
8
"""
9

10 1
from astropy import config as _config
11

12

13 1
class Conf(_config.ConfigNamespace):
14
    """
15
    Configuration parameters for `astroquery.jplhorizons`.
16
    """
17

18
    # server settings
19 1
    horizons_server = _config.ConfigItem(
20
        'https://ssd.jpl.nasa.gov/horizons_batch.cgi',
21
        'JPL Horizons')
22

23
    # implement later: sbdb_server = 'http://ssd-api.jpl.nasa.gov/sbdb.api'
24

25 1
    timeout = _config.ConfigItem(
26
        30,
27
        'Time limit for connecting to JPL servers.')
28

29
    # JPL Horizons settings
30

31
    # quantities queried in ephemerides query (see
32
    # http://ssd.jpl.nasa.gov/?horizons_doc#table_quantities)
33
    # default: all quantities
34 1
    eph_quantities = ('1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,'
35
                      '21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,'
36
                      '38,39,40,41,42,43')
37

38
    # provide column names and units for each queried quantity for different
39
    # query modes
40 1
    eph_columns = {'targetname': ('targetname', '---'),
41
                   'Date__(UT)__HR:MN': ('datetime_str', '---'),
42
                   'Date__(UT)__HR:MN:SS': ('datetime_str', '---'),
43
                   'Date__(UT)__HR:MN:SC.fff': ('datetime_str', '---'),
44
                   'Date_________JDUT': ('datetime_jd', 'd'),
45
                   'H': ('H', 'mag'),
46
                   'G': ('G', '---'),
47
                   'M1': ('M1', 'mag'),
48
                   'M2': ('M2', 'mag'),
49
                   'k1': ('k1', '---'),
50
                   'k2': ('k2', '---'),
51
                   'phasecoeff': ('phasecoeff', 'mag/deg'),
52
                   'solar_presence': ('solar_presence', '---'),
53
                   'flags': ('flags', '---'),
54
                   'R.A._(ICRF)': ('RA', 'deg'),
55
                   'DEC_(ICRF)': ('DEC', 'deg'),
56
                   'R.A.___(ICRF)': ('RA', 'deg'),
57
                   'DEC____(ICRF)': ('DEC', 'deg'),
58
                   'R.A._(ICRF/J2000.0)': ('RA', 'deg'),
59
                   'DEC_(ICRF/J2000.0)': ('DEC', 'deg'),
60
                   'R.A._(FK4/B1950.0)': ('RA', 'deg'),
61
                   'DEC_(FK4/B1950.0)': ('DEC', 'deg'),
62
                   'R.A._(FK4/B1950)': ('RA', 'deg'),
63
                   'DEC_(FK4/B1950)': ('DEC', 'deg'),
64
                   'R.A._(a-app)': ('RA_app', 'deg'),
65
                   'R.A.__(a-app)': ('RA_app', 'deg'),
66
                   'DEC_(a-app)': ('DEC_app', 'deg'),
67
                   'DEC___(a-app)': ('DEC_app', 'deg'),
68
                   'R.A._(r-app)': ('RA_app', 'deg'),
69
                   'DEC_(r-app)': ('DEC_app', 'deg'),
70
                   'dRA*cosD': ('RA_rate', 'arcsec/hour'),
71
                   'd(DEC)/dt': ('DEC_rate', 'arcsec/hour'),
72
                   'Azi_(a-app)': ('AZ', 'deg'),
73
                   'Elev_(a-app)': ('EL', 'deg'),
74
                   'Azi_(r-appr)': ('AZ', 'deg'),
75
                   'Elev_(r-appr)': ('EL', 'deg'),
76
                   'dAZ*cosE': ('AZ_rate', 'arcsec/minute'),
77
                   'd(ELV)/dt': ('EL_rate', 'arcsec/minute'),
78
                   'X_(sat-prim)': ('sat_X', 'arcsec'),
79
                   'Y_(sat-prim)': ('sat_Y', 'arcsec'),
80
                   'SatPANG': ('sat_PANG', 'deg'),
81
                   'L_Ap_Sid_Time': ('siderealtime', '---'),
82
                   'a-mass': ('airmass', '---'),
83
                   'mag_ex': ('magextinct', 'mag'),
84
                   'APmag': ('V', 'mag'),
85
                   'T-mag': ('Tmag', 'mag'),
86
                   'N-mag': ('Nmag', 'mag'),
87
                   'S-brt': ('surfbright',
88
                             'mag/arcsec**2'),
89
                   'Illu%': ('illumination', 'percent'),
90
                   'Def_illu': ('illum_defect', 'arcsec'),
91
                   'ang-sep': ('sat_sep', 'arcsec'),
92
                   'v': ('sat_vis', '---'),
93
                   'vis.': ('sat_vis', '---'),
94
                   'Ang-diam': ('ang_width', 'arcsec'),
95
                   'ObsSub-LON': ('PDObsLon', 'deg'),
96
                   'ObsSub-LAT': ('PDObsLat', 'deg'),
97
                   'SunSub-LON': ('PDSunLon', 'deg'),
98
                   'SunSub-LAT': ('PDSunLat', 'deg'),
99
                   'Ob-lon': ('PDObsLon', 'deg'),  # deprecated
100
                   'Ob-lat': ('PDObsLat', 'deg'),  # deprecated
101
                   'Sl-lon': ('PDSunLon', 'deg'),  # deprecated
102
                   'Sl-lat': ('PDSunLat', 'deg'),  # deprecated
103
                   'Obsrv-lon': ('PDObsLon', 'deg'),  # deprecated
104
                   'Obsrv-lat': ('PDObsLat', 'deg'),  # deprecated
105
                   'Solar-lon': ('PDSunLon', 'deg'),  # deprecated
106
                   'Solar-lat': ('PDSunLat', 'deg'),  # deprecated
107
                   'SN.ang': ('SubSol_ang', 'deg'),
108
                   'SN.dist': ('SubSol_dist', 'arcsec'),
109
                   'NP.ang': ('NPole_ang', 'deg'),
110
                   'NP.dist': ('NPole_dist', 'arcsec'),
111
                   'hEcl-Lon': ('EclLon', 'deg'),
112
                   'hEcl-Lat': ('EclLat', 'deg'),
113
                   'r': ('r', 'au'),
114
                   'rdot': ('r_rate', 'km/second'),
115
                   'delta': ('delta', 'au'),
116
                   'deldot': ('delta_rate', 'km/second'),
117
                   '1-way_LT': ('lighttime', 'minute'),
118
                   '1-way_down_LT': ('lighttime', 'minute'),
119
                   'VmagSn': ('vel_sun', 'km/s'),
120
                   'VmagOb': ('vel_obs', 'km/s'),
121
                   'S-O-T': ('elong', 'deg'),
122
                   '/r': ('elongFlag', '---'),
123
                   'S-T-O': ('alpha', 'deg'),
124
                   'T-O-M': ('lunar_elong', 'deg'),
125
                   'T-O-I': ('IB_elong', 'deg'),
126
                   'MN_Illu%': ('lunar_illum', 'percent'),
127
                   'IB_Illu%': ('IB_illum', 'percent'),
128
                   'O-P-T': ('sat_alpha', 'deg'),
129
                   'PlAng': ('OrbPlaneAng', 'deg'),
130
                   'PsAng': ('sunTargetPA', 'deg'),
131
                   'PsAMV': ('velocityPA', 'deg'),
132
                   'Cnst': ('constellation', '---'),
133
                   'TDB-UT': ('TDB-UT', 'second'),
134
                   'ObsEcLon': ('ObsEclLon', 'deg'),
135
                   'ObsEcLat': ('ObsEclLat', 'deg'),
136
                   'r-ObsEcLon': ('ObsEclLon', 'deg'),
137
                   'r-ObsEcLat': ('ObsEclLat', 'deg'),
138
                   'N.Pole-RA': ('NPole_RA', 'deg'),
139
                   'N.Pole-DC': ('NPole_DEC', 'deg'),
140
                   'GlxLon': ('GlxLon', 'deg'),
141
                   'GlxLat': ('GlxLat', 'deg'),
142
                   'L_Ap_SOL_Time': ('solartime', '---'),
143
                   '399_ins_LT': ('earth_lighttime', 'minute'),
144
                   'RA_3sigma': ('RA_3sigma', 'arcsec'),
145
                   'DEC_3sigma': ('DEC_3sigma', 'arcsec'),
146
                   'SMAA_3sig': ('SMAA_3sigma', 'arcsec'),
147
                   'SMIA_3sig': ('SMIA_3sigma', 'arcsec'),
148
                   'Theta': ('Theta_3sigma', 'deg'),
149
                   'Area_3sig': ('Area_3sigma', 'arcsec^2'),
150
                   'POS_3sigma': ('RSS_3sigma', 'arcsec'),
151
                   'RNG_3sigma': ('r_3sigma', 'km'),
152
                   'RNGRT_3sig': ('r_rate_3sigma', 'km/s'),
153
                   'DOP_S_3sig': ('SBand_3sigma', 'Hz'),
154
                   'DOP_X_3sig': ('XBand_3sigma', 'Hz'),
155
                   'RT_delay_3sig': ('DoppDelay_3sigma', 'second'),
156
                   'Tru_Anom': ('true_anom', 'deg'),
157
                   'r-L_Ap_Hour_Ang': ('hour_angle', '---'),
158
                   'L_Ap_Hour_Ang': ('hour_angle', '---'),
159
                   'phi': ('alpha_true', 'deg'),
160
                   'PAB-LON': ('PABLon', 'deg'),
161
                   'PAB-LAT': ('PABLat', 'deg')
162
                   }
163

164 1
    elem_columns = {'targetname': ('targetname', '---'),
165
                    'JDTDB': ('datetime_jd', 'd'),
166
                    'Calendar Date (TDB)': ('datetime_str',
167
                                            '---'),
168
                    'H': ('H', 'mag'),
169
                    'G': ('G', '---'),
170
                    'M1': ('M1', 'mag'),
171
                    'M2': ('M2', 'mag'),
172
                    'k1': ('k1', '---'),
173
                    'k2': ('k2', '---'),
174
                    'phasecoeff': ('phasecoeff',
175
                                   'mag/deg'),
176
                    'EC': ('e', '---'),
177
                    'QR': ('q', 'AU'),
178
                    'IN': ('incl', 'deg'),
179
                    'OM': ('Omega', 'deg'),
180
                    'W': ('w', 'deg'),
181
                    'Tp': ('Tp_jd', 'd'),
182
                    'N': ('n', 'deg/day'),
183
                    'MA': ('M', 'deg'),
184
                    'TA': ('nu', 'deg'),
185
                    'A': ('a', 'AU'),
186
                    'AD': ('Q', 'AU'),
187
                    'PR': ('P', 'd')}
188

189 1
    vec_columns = {'targetname': ('targetname', '---'),
190
                   'JDTDB': ('datetime_jd', 'd'),
191
                   'Calendar Date (TDB)': ('datetime_str',
192
                                           '---'),
193
                   'delta-T': ('delta_T', 's'),
194
                   'H': ('H', 'mag'),
195
                   'G': ('G', '---'),
196
                   'M1': ('M1', 'mag'),
197
                   'M2': ('M2', 'mag'),
198
                   'k1': ('k1', '---'),
199
                   'k2': ('k2', '---'),
200
                   'phasecoeff': ('phasecoeff',
201
                                  'mag/deg'),
202
                   'X': ('x', 'AU'),
203
                   'Y': ('y', 'AU'),
204
                   'Z': ('z', 'AU'),
205
                   'VX': ('vx', 'AU/d'),
206
                   'VY': ('vy', 'AU/d'),
207
                   'VZ': ('vz', 'AU/d'),
208
                   'LT': ('lighttime', 'd'),
209
                   'RG': ('range', 'AU'),
210
                   'RR': ('range_rate',
211
                          'AU/d')}
212

213

214 1
conf = Conf()
215

216 1
from .core import Horizons, HorizonsClass
217

218 1
__all__ = ['Horizons', 'HorizonsClass',
219
           'Conf', 'conf',
220
           ]

Read our documentation on viewing source code .

Loading