HorizonsClass¶
- class astroquery.jplhorizons.HorizonsClass(id=None, location=None, epochs=None, id_type=None)[source]¶
Bases:
astroquery.query.BaseQuery
A class for querying the JPL Horizons service.
Instantiate JPL query.
- Parameters
- idstr, required
Name, number, or designation of the object to be queried.
- locationstr or dict, optional
Observer’s location for ephemerides queries or center body name for orbital element or vector queries. Uses the same codes as JPL Horizons. If no location is provided, Earth’s center is used for ephemerides queries and the Sun’s center for elements and vectors queries. Arbitrary topocentric coordinates for ephemerides queries can be provided in the format of a dictionary. The dictionary has to be of the form {
'lon'
: longitude in deg (East positive, West negative),'lat'
: latitude in deg (North positive, South negative),'elevation'
: elevation in km above the reference ellipsoid, ['body'
: Horizons body ID of the central body; optional; if this value is not provided it is assumed that this location is on Earth]}.- epochsscalar, list-like, or dictionary, optional
Either a list of epochs in JD or MJD format or a dictionary defining a range of times and dates; the range dictionary has to be of the form {
'start'
: ‘YYYY-MM-DD [HH:MM:SS]’,'stop'
: ‘YYYY-MM-DD [HH:MM:SS]’,'step'
: ‘n[y|d|m|s]’}. Epoch timescales depend on the type of query performed: UTC for ephemerides queries, TDB for element and vector queries. If no epochs are provided, the current time is used.- id_typestr, optional
Controls Horizons’s object selection for
id
[HORIZONSDOC_SELECTION] . Options:'designation'
(small body designation),'name'
(asteroid or comet name),'asteroid_name'
,'comet_name'
,'smallbody'
(asteroid and comet search), orNone
(first search search planets, natural satellites, spacecraft, and special cases, and if no matches, then search small bodies).
References
- HORIZONSDOC_SELECTION
https://ssd.jpl.nasa.gov/horizons/manual.html#select (retrieved 2021 Sep 23).
Examples
>>> from astroquery.jplhorizons import Horizons >>> eros = Horizons(id='433', location='568', ... epochs={'start':'2017-01-01', ... 'stop':'2017-02-01', ... 'step':'1d'}) >>> print(eros) JPLHorizons instance "433"; location=568, epochs={'start': '2017-01-01', 'step': '1d', 'stop': '2017-02-01'}, id_type=None
Attributes Summary
Methods Summary
elements
(*args, **kwargs)Queries the service and returns a table object.
elements_async
([get_query_payload, ...])Query JPL Horizons for osculating orbital elements.
ephemerides
(*args, **kwargs)Queries the service and returns a table object.
ephemerides_async
([airmass_lessthan, ...])Query JPL Horizons for ephemerides.
vectors
(*args, **kwargs)Queries the service and returns a table object.
vectors_async
([get_query_payload, ...])Query JPL Horizons for state vectors.
Attributes Documentation
- TIMEOUT = 30¶
Methods Documentation
- elements(*args, **kwargs)¶
Queries the service and returns a table object.
Query JPL Horizons for osculating orbital elements.
The
location
parameter inHorizonsClass
refers in this case to the center body relative to which the elements are provided.The following table lists the values queried, their definitions, data types, units, and original Horizons designations (where available). For more information on the definitions of these quantities, please refer to the Horizons User Manual.
Column Name
Definition
targetname
official number, name, designation (string)
H
absolute magnitude in V band (float, mag)
G
photometric slope parameter (float)
M1
comet total abs mag (float, mag,
M1
)M2
comet nuclear abs mag (float, mag,
M2
)k1
total mag scaling factor (float,
k1
)k2
nuclear mag scaling factor (float,
k2
)phasecoeff
comet phase coeff (float, mag/deg,
PHCOFF
)datetime_str
epoch Date (str,
Calendar Date (TDB)
)datetime_jd
epoch Julian Date (float,
JDTDB
)e
eccentricity (float,
EC
)q
periapsis distance (float, au,
QR
)a
semi-major axis (float, au,
A
)incl
inclination (float, deg,
IN
)Omega
longitude of Asc. Node (float, deg,
OM
)w
argument of the perifocus (float, deg,
W
)Tp_jd
time of periapsis (float, Julian Date,
Tp
)n
mean motion (float, deg/d,
N
)M
mean anomaly (float, deg,
MA
)nu
true anomaly (float, deg,
TA
)period
orbital period (float, (Earth) d,
PR
)Q
apoapsis distance (float, au,
AD
)- Parameters
- refsystemstring
Element reference system for geometric and astrometric quantities:
'ICRF'
or'B1950'
; default:'ICRF'
- refplanestring
Reference plane for all output quantities:
'ecliptic'
(ecliptic and mean equinox of reference epoch),'earth'
(Earth mean equator and equinox of reference epoch), or'body'
(body mean equator and node of date); default:'ecliptic'
- tp_typestring
Representation for time-of-perihelion passage:
'absolute'
or'relative'
(to epoch); default:'absolute'
- closest_apparitionboolean, optional
Only applies to comets. This option will choose the closest apparition available in time to the selected epoch; default: False. Do not use this option for non-cometary objects.
- no_fragmentsboolean, optional
Only applies to comets. Reject all comet fragments from selection; default: False. Do not use this option for non-cometary objects.
- get_query_payloadboolean, optional
When set to
True
the method returns the HTTP request parameters as a dict, default: False- get_raw_response: boolean, optional
Return raw data as obtained by JPL Horizons without parsing the data into a table, default: False
- Returns
- tableA
Table
object.
- tableA
Examples
>>> from astroquery.jplhorizons import Horizons >>> obj = Horizons(id='433', location='500@10', ... epochs=2458133.33546) >>> el = obj.elements() >>> print(el) targetname datetime_jd ... Q P --- d ... AU d ------------------ ------------- ... ------------- ------------ 433 Eros (1898 DQ) 2458133.33546 ... 1.78244263804 642.93873484
- elements_async(get_query_payload=False, refsystem='ICRF', refplane='ecliptic', tp_type='absolute', closest_apparition=False, no_fragments=False, get_raw_response=False, cache=True)[source]¶
Query JPL Horizons for osculating orbital elements.
The
location
parameter inHorizonsClass
refers in this case to the center body relative to which the elements are provided.The following table lists the values queried, their definitions, data types, units, and original Horizons designations (where available). For more information on the definitions of these quantities, please refer to the Horizons User Manual.
Column Name
Definition
targetname
official number, name, designation (string)
H
absolute magnitude in V band (float, mag)
G
photometric slope parameter (float)
M1
comet total abs mag (float, mag,
M1
)M2
comet nuclear abs mag (float, mag,
M2
)k1
total mag scaling factor (float,
k1
)k2
nuclear mag scaling factor (float,
k2
)phasecoeff
comet phase coeff (float, mag/deg,
PHCOFF
)datetime_str
epoch Date (str,
Calendar Date (TDB)
)datetime_jd
epoch Julian Date (float,
JDTDB
)e
eccentricity (float,
EC
)q
periapsis distance (float, au,
QR
)a
semi-major axis (float, au,
A
)incl
inclination (float, deg,
IN
)Omega
longitude of Asc. Node (float, deg,
OM
)w
argument of the perifocus (float, deg,
W
)Tp_jd
time of periapsis (float, Julian Date,
Tp
)n
mean motion (float, deg/d,
N
)M
mean anomaly (float, deg,
MA
)nu
true anomaly (float, deg,
TA
)period
orbital period (float, (Earth) d,
PR
)Q
apoapsis distance (float, au,
AD
)- Parameters
- refsystemstring
Element reference system for geometric and astrometric quantities:
'ICRF'
or'B1950'
; default:'ICRF'
- refplanestring
Reference plane for all output quantities:
'ecliptic'
(ecliptic and mean equinox of reference epoch),'earth'
(Earth mean equator and equinox of reference epoch), or'body'
(body mean equator and node of date); default:'ecliptic'
- tp_typestring
Representation for time-of-perihelion passage:
'absolute'
or'relative'
(to epoch); default:'absolute'
- closest_apparitionboolean, optional
Only applies to comets. This option will choose the closest apparition available in time to the selected epoch; default: False. Do not use this option for non-cometary objects.
- no_fragmentsboolean, optional
Only applies to comets. Reject all comet fragments from selection; default: False. Do not use this option for non-cometary objects.
- get_query_payloadboolean, optional
When set to
True
the method returns the HTTP request parameters as a dict, default: False- get_raw_response: boolean, optional
Return raw data as obtained by JPL Horizons without parsing the data into a table, default: False
- Returns
- response
requests.Response
The response of the HTTP request.
- response
Examples
>>> from astroquery.jplhorizons import Horizons >>> obj = Horizons(id='433', location='500@10', ... epochs=2458133.33546) >>> el = obj.elements() >>> print(el) targetname datetime_jd ... Q P --- d ... AU d ------------------ ------------- ... ------------- ------------ 433 Eros (1898 DQ) 2458133.33546 ... 1.78244263804 642.93873484
- ephemerides(*args, **kwargs)¶
Queries the service and returns a table object.
Query JPL Horizons for ephemerides.
The
location
parameter inHorizonsClass
refers in this case to the location of the observer.The following tables list the values queried, their definitions, data types, units, and original Horizons designations (where available). For more information on the definitions of these quantities, please refer to the Horizons User Manual.
Column Name
Definition
targetname
official number, name, designation (string)
H
absolute magnitude in V band (float, mag)
G
photometric slope parameter (float)
M1
comet total abs mag (float, mag,
M1
)M2
comet nuclear abs mag (float, mag,
M2
)k1
total mag scaling factor (float,
k1
)k2
nuclear mag scaling factor (float,
k2
)phasecoeff
comet phase coeff (float, mag/deg,
PHCOFF
)datetime
epoch (str,
Date__(UT)__HR:MN:SC.fff
)datetime_jd
epoch Julian Date (float,
Date_________JDUT
)solar_presence
information on Sun’s presence (str)
flags
information on Moon, target status (str)
RA
target RA (float, deg,
DEC_(XXX)
)DEC
target DEC (float, deg,
DEC_(XXX)
)RA_app
target apparent RA (float, deg,
R.A._(a-app)
)DEC_app
target apparent DEC (float, deg,
DEC_(a-app)
)RA_rate
target rate RA (float, arcsec/hr,
RA*cosD
)DEC_rate
target RA (float, arcsec/hr,
d(DEC)/dt
)AZ
Azimuth (float, deg, EoN,
Azi_(a-app)
)EL
Elevation (float, deg,
Elev_(a-app)
)AZ_rate
Azimuth rate (float, arcsec/minute,
dAZ*cosE
)EL_rate
Elevation rate (float, arcsec/minute,
d(ELV)/dt
)sat_X
satellite X position (arcsec,
X_(sat-prim)
)sat_Y
satellite Y position (arcsec,
Y_(sat-prim)
)sat_PANG
satellite position angle (deg,
SatPANG
)siderealtime
local apparent sidereal time (str,
L_Ap_Sid_Time
)airmass
target optical airmass (float,
a-mass
)magextinct
V-mag extinction (float, mag,
mag_ex
)V
V magnitude (float, mag,
APmag
)Tmag
comet Total magnitude (float, mag,
T-mag
)Nmag
comet Nucleaus magnitude (float, mag,
N-mag
)surfbright
surf brightness (float, mag/arcsec^2,
S-brt
)illumination
frac of illumination (float, percent,
Illu%
)illum_defect
Defect of illumination (float, arcsec,
Dec_illu
)sat_sep
Target-primary angular separation (float, arcsec,
ang-sep
)sat_vis
Target-primary visibility (str,
v
)ang_width
Angular width of target (float, arcsec,
Ang-diam
)PDObsLon
Apparent planetodetic longitude (float, deg,
ObsSub-LON
)PDObsLat
Apparent planetodetic latitude (float, deg,
ObsSub-LAT
)PDSunLon
Subsolar planetodetic longitude (float, deg,
SunSub-LON
)PDSunLat
Subsolar planetodetic latitude (float, deg,
SunSub-LAT
)SubSol_ang
Target sub-solar point position angle (float, deg,
SN.ang
)SubSol_dist
Target sub-solar point position angle distance (float, arcsec,
SN.dist
)NPole_ang
Target’s North Pole position angle (float, deg,
NP.ang
)NPole_dist
Target’s North Pole position angle distance (float, arcsec,
NP.dist
)EclLon
heliocentr ecl long (float, deg,
hEcl-Lon
)EclLat
heliocentr ecl lat (float, deg,
hEcl-Lat
)ObsEclLon
obscentr ecl long (float, deg,
ObsEcLon
)ObsEclLat
obscentr ecl lat (float, deg,
ObsEcLat
)r
heliocentric distance (float, au,
r
)r_rate
heliocentric radial rate (float, km/s,
rdot
)delta
distance from observer (float, au,
delta
)delta_rate
obs-centric rad rate (float, km/s,
deldot
)lighttime
one-way light time (float, min,
1-way_LT
)vel_sun
Target center velocity wrt Sun (float, km/s,
VmagSn
)vel_obs
Target center velocity wrt Observer (float, km/s,
VmagOb
)elong
solar elongation (float, deg,
S-O-T
)elongFlag
app. position relative to Sun (str,
/r
)alpha
solar phase angle (float, deg,
S-T-O
)lunar_elong
Apparent lunar elongation angle wrt target (float, deg,
T-O-M
)lunar_illum
Lunar illumination percentage (float, percent,
MN_Illu%
)IB_elong
Apparent interfering body elongation angle wrt target (float, deg,
T-O-I
)IB_illum
Interfering body illumination percentage (float, percent,
IB_Illu%
)sat_alpha
Observer-Primary-Target angle (float, deg,
O-P-T
)OrbPlaneAng
orbital plane angle (float, deg,
PlAng
)sunTargetPA
-Sun vector PA (float, deg, EoN,
PsAng
)velocityPA
-velocity vector PA (float, deg, EoN,
PsAMV
)constellation
constellation ID containing target (str,
Cnst
)TDB-UT
difference between TDB and UT (float, seconds,
TDB-UT
)NPole_RA
Target’s North Pole RA (float, deg,
N.Pole-RA
)NPole_DEC
Target’s North Pole DEC (float, deg,
N.Pole-DC
)GlxLon
galactic longitude (float, deg,
GlxLon
)GlxLat
galactic latitude (float, deg,
GlxLat
)solartime
local apparent solar time (string,
L_Ap_SOL_Time
)earth_lighttime
observer lighttime from center of Earth (float, minutes,
399_ins_LT
RA_3sigma
3 sigma positional uncertainty in RA (float, arcsec,
RA_3sigma
)DEC_3sigma
3 sigma positional uncertainty in DEC (float, arcsec,
DEC_3sigma
)SMAA_3sigma
3sig pos unc error ellipse semi-major axis (float, arcsec,
SMAA_3sig
)SMIA_3sigma
3sig pos unc error ellipse semi-minor axis (float, arcsec,
SMIA_3sig
)Theta_3sigma
pos unc error ellipse position angle (float, deg,
Theta
)Area_3sigma
3sig pos unc error ellipse are (float, arcsec^2,
Area_3sig
)RSS_3sigma
3sig pos unc error ellipse root-sum-square (float, arcsec,
POS_3sigma
)r_3sigma
3sig range uncertainty (float, km,
RNG_3sigma
)r_rate_3sigma
3sig range rate uncertainty (float, km/second,
RNGRT_3sigma
)SBand_3sigma
3sig Doppler radar uncertainties at S-band (float, Hertz,
DOP_S_3sig
)XBand_3sigma
3sig Doppler radar uncertainties at X-band (float, Hertz,
DOP_X_3sig
)DoppDelay_3sigma
3sig Doppler radar round-trip delay unc (float, second,
RT_delay_3sig
)true_anom
True Anomaly (float, deg,
Tru_Anom
)hour_angle
local apparent hour angle (string, sexagesimal angular hours,
L_Ap_Hour_Ang
)alpha_true
true phase angle (float, deg,
phi
)PABLon
phase angle bisector longitude (float, deg,
PAB-LON
)PABLat
phase angle bisector latitude (float, deg,
PAB-LAT
)- Parameters
- airmass_lessthanfloat, optional
Defines a maximum airmass for the query, default: 99
- solar_elongationtuple, optional
Permissible solar elongation range: (minimum, maximum); default: (0,180)
- max_hour_anglefloat, optional
Defines a maximum hour angle for the query, default: 0
- rate_cutofffloat, optional
Angular range rate upper limit cutoff in arcsec/h; default: disabled
- skip_daylightboolean, optional
Crop daylight epochs in query, default: False
- refractionboolean
If
True
, coordinates account for a standard atmosphere refraction model; ifFalse
, coordinates do not account for refraction (airless model); default:False
- refsystemstring
Coordinate reference system:
'ICRF'
or'B1950'
; default:'ICRF'
- closest_apparitionboolean, optional
Only applies to comets. This option will choose the closest apparition available in time to the selected epoch; default: False. Do not use this option for non-cometary objects.
- no_fragmentsboolean, optional
Only applies to comets. Reject all comet fragments from selection; default: False. Do not use this option for non-cometary objects.
- quantitiesinteger or string, optional
Single integer or comma-separated list in the form of a string corresponding to all the quantities to be queried from JPL Horizons using the coding according to the JPL Horizons User Manual Definition of Observer Table Quantities; default: all quantities
- get_query_payloadboolean, optional
When set to
True
the method returns the HTTP request parameters as a dict, default: False- get_raw_responseboolean, optional
Return raw data as obtained by JPL Horizons without parsing the data into a table, default: False
- extra_precisionboolean, optional
Enables extra precision in RA and DEC values; default: False
- Returns
- tableA
Table
object.
- tableA
Examples
>>> from astroquery.jplhorizons import Horizons >>> obj = Horizons(id='Ceres', location='568', ... epochs={'start':'2010-01-01', ... 'stop':'2010-03-01', ... 'step':'10d'}) >>> eph = obj.ephemerides() >>> print(eph) targetname datetime_str datetime_jd ... PABLon PABLat --- --- d ... deg deg ----------------- ----------------- ----------- ... -------- ------ 1 Ceres (A801 AA) 2010-Jan-01 00:00 2455197.5 ... 238.2494 4.5532 1 Ceres (A801 AA) 2010-Jan-11 00:00 2455207.5 ... 241.3339 4.2832 1 Ceres (A801 AA) 2010-Jan-21 00:00 2455217.5 ... 244.3394 4.0089 1 Ceres (A801 AA) 2010-Jan-31 00:00 2455227.5 ... 247.2518 3.7289 1 Ceres (A801 AA) 2010-Feb-10 00:00 2455237.5 ... 250.0576 3.4415 1 Ceres (A801 AA) 2010-Feb-20 00:00 2455247.5 ... 252.7383 3.1451
- ephemerides_async(airmass_lessthan=99, solar_elongation=(0, 180), max_hour_angle=0, rate_cutoff=None, skip_daylight=False, refraction=False, refsystem='ICRF', closest_apparition=False, no_fragments=False, quantities='1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43', get_query_payload=False, get_raw_response=False, cache=True, extra_precision=False)[source]¶
Query JPL Horizons for ephemerides.
The
location
parameter inHorizonsClass
refers in this case to the location of the observer.The following tables list the values queried, their definitions, data types, units, and original Horizons designations (where available). For more information on the definitions of these quantities, please refer to the Horizons User Manual.
Column Name
Definition
targetname
official number, name, designation (string)
H
absolute magnitude in V band (float, mag)
G
photometric slope parameter (float)
M1
comet total abs mag (float, mag,
M1
)M2
comet nuclear abs mag (float, mag,
M2
)k1
total mag scaling factor (float,
k1
)k2
nuclear mag scaling factor (float,
k2
)phasecoeff
comet phase coeff (float, mag/deg,
PHCOFF
)datetime
epoch (str,
Date__(UT)__HR:MN:SC.fff
)datetime_jd
epoch Julian Date (float,
Date_________JDUT
)solar_presence
information on Sun’s presence (str)
flags
information on Moon, target status (str)
RA
target RA (float, deg,
DEC_(XXX)
)DEC
target DEC (float, deg,
DEC_(XXX)
)RA_app
target apparent RA (float, deg,
R.A._(a-app)
)DEC_app
target apparent DEC (float, deg,
DEC_(a-app)
)RA_rate
target rate RA (float, arcsec/hr,
RA*cosD
)DEC_rate
target RA (float, arcsec/hr,
d(DEC)/dt
)AZ
Azimuth (float, deg, EoN,
Azi_(a-app)
)EL
Elevation (float, deg,
Elev_(a-app)
)AZ_rate
Azimuth rate (float, arcsec/minute,
dAZ*cosE
)EL_rate
Elevation rate (float, arcsec/minute,
d(ELV)/dt
)sat_X
satellite X position (arcsec,
X_(sat-prim)
)sat_Y
satellite Y position (arcsec,
Y_(sat-prim)
)sat_PANG
satellite position angle (deg,
SatPANG
)siderealtime
local apparent sidereal time (str,
L_Ap_Sid_Time
)airmass
target optical airmass (float,
a-mass
)magextinct
V-mag extinction (float, mag,
mag_ex
)V
V magnitude (float, mag,
APmag
)Tmag
comet Total magnitude (float, mag,
T-mag
)Nmag
comet Nucleaus magnitude (float, mag,
N-mag
)surfbright
surf brightness (float, mag/arcsec^2,
S-brt
)illumination
frac of illumination (float, percent,
Illu%
)illum_defect
Defect of illumination (float, arcsec,
Dec_illu
)sat_sep
Target-primary angular separation (float, arcsec,
ang-sep
)sat_vis
Target-primary visibility (str,
v
)ang_width
Angular width of target (float, arcsec,
Ang-diam
)PDObsLon
Apparent planetodetic longitude (float, deg,
ObsSub-LON
)PDObsLat
Apparent planetodetic latitude (float, deg,
ObsSub-LAT
)PDSunLon
Subsolar planetodetic longitude (float, deg,
SunSub-LON
)PDSunLat
Subsolar planetodetic latitude (float, deg,
SunSub-LAT
)SubSol_ang
Target sub-solar point position angle (float, deg,
SN.ang
)SubSol_dist
Target sub-solar point position angle distance (float, arcsec,
SN.dist
)NPole_ang
Target’s North Pole position angle (float, deg,
NP.ang
)NPole_dist
Target’s North Pole position angle distance (float, arcsec,
NP.dist
)EclLon
heliocentr ecl long (float, deg,
hEcl-Lon
)EclLat
heliocentr ecl lat (float, deg,
hEcl-Lat
)ObsEclLon
obscentr ecl long (float, deg,
ObsEcLon
)ObsEclLat
obscentr ecl lat (float, deg,
ObsEcLat
)r
heliocentric distance (float, au,
r
)r_rate
heliocentric radial rate (float, km/s,
rdot
)delta
distance from observer (float, au,
delta
)delta_rate
obs-centric rad rate (float, km/s,
deldot
)lighttime
one-way light time (float, min,
1-way_LT
)vel_sun
Target center velocity wrt Sun (float, km/s,
VmagSn
)vel_obs
Target center velocity wrt Observer (float, km/s,
VmagOb
)elong
solar elongation (float, deg,
S-O-T
)elongFlag
app. position relative to Sun (str,
/r
)alpha
solar phase angle (float, deg,
S-T-O
)lunar_elong
Apparent lunar elongation angle wrt target (float, deg,
T-O-M
)lunar_illum
Lunar illumination percentage (float, percent,
MN_Illu%
)IB_elong
Apparent interfering body elongation angle wrt target (float, deg,
T-O-I
)IB_illum
Interfering body illumination percentage (float, percent,
IB_Illu%
)sat_alpha
Observer-Primary-Target angle (float, deg,
O-P-T
)OrbPlaneAng
orbital plane angle (float, deg,
PlAng
)sunTargetPA
-Sun vector PA (float, deg, EoN,
PsAng
)velocityPA
-velocity vector PA (float, deg, EoN,
PsAMV
)constellation
constellation ID containing target (str,
Cnst
)TDB-UT
difference between TDB and UT (float, seconds,
TDB-UT
)NPole_RA
Target’s North Pole RA (float, deg,
N.Pole-RA
)NPole_DEC
Target’s North Pole DEC (float, deg,
N.Pole-DC
)GlxLon
galactic longitude (float, deg,
GlxLon
)GlxLat
galactic latitude (float, deg,
GlxLat
)solartime
local apparent solar time (string,
L_Ap_SOL_Time
)earth_lighttime
observer lighttime from center of Earth (float, minutes,
399_ins_LT
RA_3sigma
3 sigma positional uncertainty in RA (float, arcsec,
RA_3sigma
)DEC_3sigma
3 sigma positional uncertainty in DEC (float, arcsec,
DEC_3sigma
)SMAA_3sigma
3sig pos unc error ellipse semi-major axis (float, arcsec,
SMAA_3sig
)SMIA_3sigma
3sig pos unc error ellipse semi-minor axis (float, arcsec,
SMIA_3sig
)Theta_3sigma
pos unc error ellipse position angle (float, deg,
Theta
)Area_3sigma
3sig pos unc error ellipse are (float, arcsec^2,
Area_3sig
)RSS_3sigma
3sig pos unc error ellipse root-sum-square (float, arcsec,
POS_3sigma
)r_3sigma
3sig range uncertainty (float, km,
RNG_3sigma
)r_rate_3sigma
3sig range rate uncertainty (float, km/second,
RNGRT_3sigma
)SBand_3sigma
3sig Doppler radar uncertainties at S-band (float, Hertz,
DOP_S_3sig
)XBand_3sigma
3sig Doppler radar uncertainties at X-band (float, Hertz,
DOP_X_3sig
)DoppDelay_3sigma
3sig Doppler radar round-trip delay unc (float, second,
RT_delay_3sig
)true_anom
True Anomaly (float, deg,
Tru_Anom
)hour_angle
local apparent hour angle (string, sexagesimal angular hours,
L_Ap_Hour_Ang
)alpha_true
true phase angle (float, deg,
phi
)PABLon
phase angle bisector longitude (float, deg,
PAB-LON
)PABLat
phase angle bisector latitude (float, deg,
PAB-LAT
)- Parameters
- airmass_lessthanfloat, optional
Defines a maximum airmass for the query, default: 99
- solar_elongationtuple, optional
Permissible solar elongation range: (minimum, maximum); default: (0,180)
- max_hour_anglefloat, optional
Defines a maximum hour angle for the query, default: 0
- rate_cutofffloat, optional
Angular range rate upper limit cutoff in arcsec/h; default: disabled
- skip_daylightboolean, optional
Crop daylight epochs in query, default: False
- refractionboolean
If
True
, coordinates account for a standard atmosphere refraction model; ifFalse
, coordinates do not account for refraction (airless model); default:False
- refsystemstring
Coordinate reference system:
'ICRF'
or'B1950'
; default:'ICRF'
- closest_apparitionboolean, optional
Only applies to comets. This option will choose the closest apparition available in time to the selected epoch; default: False. Do not use this option for non-cometary objects.
- no_fragmentsboolean, optional
Only applies to comets. Reject all comet fragments from selection; default: False. Do not use this option for non-cometary objects.
- quantitiesinteger or string, optional
Single integer or comma-separated list in the form of a string corresponding to all the quantities to be queried from JPL Horizons using the coding according to the JPL Horizons User Manual Definition of Observer Table Quantities; default: all quantities
- get_query_payloadboolean, optional
When set to
True
the method returns the HTTP request parameters as a dict, default: False- get_raw_responseboolean, optional
Return raw data as obtained by JPL Horizons without parsing the data into a table, default: False
- extra_precisionboolean, optional
Enables extra precision in RA and DEC values; default: False
- Returns
- response
requests.Response
The response of the HTTP request.
- response
Examples
>>> from astroquery.jplhorizons import Horizons >>> obj = Horizons(id='Ceres', location='568', ... epochs={'start':'2010-01-01', ... 'stop':'2010-03-01', ... 'step':'10d'}) >>> eph = obj.ephemerides() >>> print(eph) targetname datetime_str datetime_jd ... PABLon PABLat --- --- d ... deg deg ----------------- ----------------- ----------- ... -------- ------ 1 Ceres (A801 AA) 2010-Jan-01 00:00 2455197.5 ... 238.2494 4.5532 1 Ceres (A801 AA) 2010-Jan-11 00:00 2455207.5 ... 241.3339 4.2832 1 Ceres (A801 AA) 2010-Jan-21 00:00 2455217.5 ... 244.3394 4.0089 1 Ceres (A801 AA) 2010-Jan-31 00:00 2455227.5 ... 247.2518 3.7289 1 Ceres (A801 AA) 2010-Feb-10 00:00 2455237.5 ... 250.0576 3.4415 1 Ceres (A801 AA) 2010-Feb-20 00:00 2455247.5 ... 252.7383 3.1451
- vectors(*args, **kwargs)¶
Queries the service and returns a table object.
Query JPL Horizons for state vectors.
The
location
parameter inHorizonsClass
refers in this case to the center body relative to which the vectors are provided.The following table lists the values queried, their definitions, data types, units, and original Horizons designations (where available). For more information on the definitions of these quantities, please refer to the Horizons User Manual.
Column Name
Definition
targetname
official number, name, designation (string)
H
absolute magnitude in V band (float, mag)
G
photometric slope parameter (float)
M1
comet total abs mag (float, mag,
M1
)M2
comet nuclear abs mag (float, mag,
M2
)k1
total mag scaling factor (float,
k1
)k2
nuclear mag scaling factor (float,
k2
)phasecoeff
comet phase coeff (float, mag/deg,
PHCOFF
)datetime_str
epoch Date (str,
Calendar Date (TDB)
)datetime_jd
epoch Julian Date (float,
JDTDB
)delta_T
time-varying difference between TDB and UT (float,
delta-T
, optional)x
x-component of position vector (float, au,
X
)y
y-component of position vector (float, au,
Y
)z
z-component of position vector (float, au,
Z
)vx
x-component of velocity vector (float, au/d,
VX
)vy
y-component of velocity vector (float, au/d,
VY
)vz
z-component of velocity vector (float, au/d,
VZ
)lighttime
one-way lighttime (float, d,
LT
)range
range from coordinate center (float, au,
RG
)range_rate
range rate (float, au/d,
RR
)- Parameters
- closest_apparitionboolean, optional
Only applies to comets. This option will choose the closest apparition available in time to the selected epoch; default: False. Do not use this option for non-cometary objects.
- no_fragmentsboolean, optional
Only applies to comets. Reject all comet fragments from selection; default: False. Do not use this option for non-cometary objects.
- get_query_payloadboolean, optional
When set to
True
the method returns the HTTP request parameters as a dict, default: False- get_raw_response: boolean, optional
Return raw data as obtained by JPL Horizons without parsing the data into a table, default: False
- refplanestring
Reference plane for all output quantities:
'ecliptic'
(ecliptic and mean equinox of reference epoch),'earth'
(Earth mean equator and equinox of reference epoch), or'body'
(body mean equator and node of date); default:'ecliptic'
.See Horizons Reference Frames in the astroquery documentation for details.
- aberrationsstring, optional
Aberrations to be accounted for: [
'geometric'
,'astrometric'
,'apparent'
]. Default:'geometric'
- delta_Tboolean, optional
Triggers output of time-varying difference between TDB and UT time-scales. Default: False
- Returns
- tableA
Table
object.
- tableA
Examples
>>> from astroquery.jplhorizons import Horizons >>> obj = Horizons(id='2012 TC4', location='257', ... epochs={'start':'2017-10-01', ... 'stop':'2017-10-02', ... 'step':'10m'}) >>> vec = obj.vectors() >>> print(vec) targetname datetime_jd ... range range_rate --- d ... AU AU / d ---------- ------------- ... --------------- ----------------- (2012 TC4) 2458027.5 ... 0.0429332099306 -0.00408018711862 (2012 TC4) 2458027.50694 ... 0.0429048742906 -0.00408040726527 (2012 TC4) 2458027.51389 ... 0.0428765385796 -0.00408020747595 (2012 TC4) 2458027.52083 ... 0.0428482057142 -0.0040795878561 (2012 TC4) 2458027.52778 ... 0.042819878607 -0.00407854931543 (2012 TC4) 2458027.53472 ... 0.0427915601617 -0.0040770935665 ... ... ... ... ... (2012 TC4) 2458028.45833 ... 0.0392489462501 -0.00405496595173 (2012 TC4) 2458028.46528 ... 0.03922077771 -0.00405750632914 (2012 TC4) 2458028.47222 ... 0.039192592935 -0.00405964084539 (2012 TC4) 2458028.47917 ... 0.039164394759 -0.00406136516755 (2012 TC4) 2458028.48611 ... 0.0391361860433 -0.00406267574646 (2012 TC4) 2458028.49306 ... 0.0391079696711 -0.0040635698239 (2012 TC4) 2458028.5 ... 0.0390797485422 -0.00406404543822 Length = 145 rows
- vectors_async(get_query_payload=False, closest_apparition=False, no_fragments=False, get_raw_response=False, cache=True, refplane='ecliptic', aberrations='geometric', delta_T=False)[source]¶
Query JPL Horizons for state vectors.
The
location
parameter inHorizonsClass
refers in this case to the center body relative to which the vectors are provided.The following table lists the values queried, their definitions, data types, units, and original Horizons designations (where available). For more information on the definitions of these quantities, please refer to the Horizons User Manual.
Column Name
Definition
targetname
official number, name, designation (string)
H
absolute magnitude in V band (float, mag)
G
photometric slope parameter (float)
M1
comet total abs mag (float, mag,
M1
)M2
comet nuclear abs mag (float, mag,
M2
)k1
total mag scaling factor (float,
k1
)k2
nuclear mag scaling factor (float,
k2
)phasecoeff
comet phase coeff (float, mag/deg,
PHCOFF
)datetime_str
epoch Date (str,
Calendar Date (TDB)
)datetime_jd
epoch Julian Date (float,
JDTDB
)delta_T
time-varying difference between TDB and UT (float,
delta-T
, optional)x
x-component of position vector (float, au,
X
)y
y-component of position vector (float, au,
Y
)z
z-component of position vector (float, au,
Z
)vx
x-component of velocity vector (float, au/d,
VX
)vy
y-component of velocity vector (float, au/d,
VY
)vz
z-component of velocity vector (float, au/d,
VZ
)lighttime
one-way lighttime (float, d,
LT
)range
range from coordinate center (float, au,
RG
)range_rate
range rate (float, au/d,
RR
)- Parameters
- closest_apparitionboolean, optional
Only applies to comets. This option will choose the closest apparition available in time to the selected epoch; default: False. Do not use this option for non-cometary objects.
- no_fragmentsboolean, optional
Only applies to comets. Reject all comet fragments from selection; default: False. Do not use this option for non-cometary objects.
- get_query_payloadboolean, optional
When set to
True
the method returns the HTTP request parameters as a dict, default: False- get_raw_response: boolean, optional
Return raw data as obtained by JPL Horizons without parsing the data into a table, default: False
- refplanestring
Reference plane for all output quantities:
'ecliptic'
(ecliptic and mean equinox of reference epoch),'earth'
(Earth mean equator and equinox of reference epoch), or'body'
(body mean equator and node of date); default:'ecliptic'
.See Horizons Reference Frames in the astroquery documentation for details.
- aberrationsstring, optional
Aberrations to be accounted for: [
'geometric'
,'astrometric'
,'apparent'
]. Default:'geometric'
- delta_Tboolean, optional
Triggers output of time-varying difference between TDB and UT time-scales. Default: False
- Returns
- response
requests.Response
The response of the HTTP request.
- response
Examples
>>> from astroquery.jplhorizons import Horizons >>> obj = Horizons(id='2012 TC4', location='257', ... epochs={'start':'2017-10-01', ... 'stop':'2017-10-02', ... 'step':'10m'}) >>> vec = obj.vectors() >>> print(vec) targetname datetime_jd ... range range_rate --- d ... AU AU / d ---------- ------------- ... --------------- ----------------- (2012 TC4) 2458027.5 ... 0.0429332099306 -0.00408018711862 (2012 TC4) 2458027.50694 ... 0.0429048742906 -0.00408040726527 (2012 TC4) 2458027.51389 ... 0.0428765385796 -0.00408020747595 (2012 TC4) 2458027.52083 ... 0.0428482057142 -0.0040795878561 (2012 TC4) 2458027.52778 ... 0.042819878607 -0.00407854931543 (2012 TC4) 2458027.53472 ... 0.0427915601617 -0.0040770935665 ... ... ... ... ... (2012 TC4) 2458028.45833 ... 0.0392489462501 -0.00405496595173 (2012 TC4) 2458028.46528 ... 0.03922077771 -0.00405750632914 (2012 TC4) 2458028.47222 ... 0.039192592935 -0.00405964084539 (2012 TC4) 2458028.47917 ... 0.039164394759 -0.00406136516755 (2012 TC4) 2458028.48611 ... 0.0391361860433 -0.00406267574646 (2012 TC4) 2458028.49306 ... 0.0391079696711 -0.0040635698239 (2012 TC4) 2458028.5 ... 0.0390797485422 -0.00406404543822 Length = 145 rows