Planet
Return to Analysis Utilities
This page documents the planet function of Python module analysisUtils.
This function returns the position (J2000 or apparent) and angular size of any Solar System body for the specified date from the specified observatory (or geocentric). By default, it contacts the JPL Horizons telnet server to get apparent angular size, position and rate of any Solar System body. If the date and time is not specified, and no measurement set is provided, then today's date is assumed at 0:00 UT. If the time is not specified, 0:00 UT is assumed. If the observatory is not specified, ALMA is assumed. In case an internet connection is not available, there is an option to instead query the casa ephemerides (useJPL=False). However, the reported values will be less accurate due to the need to interpolate from a coarser grid. Also, using the casa ephemerides presently (casa <= 3.4) returns the apparent position but this will be changed to J2000 in casa 4.0.
Usage
au.planet(solarSystemBody="", date="", observatory='ALMA', verbose=False, help=False, mjd=None, beam="", useJPL=True, standard='Butler-JPL-Horizons 2010', apparent=False, vis=)
body: string name of Solar system body date: one possible format of the date string is: '2011-10-31 11:59:59' or simply '2011-10-31' for 0:00 UT. A list of allowed formats for date is at: http://ssd.jpl.nasa.gov/?horizons_doc#time An alternative is to use the vis option, which will read the start time of an ms mjd: floating point MJD (alternative to specifying a date string) useJPL: if False, first try the casa ephemerides. Note that the casa tables are quantized to one day. If the casa tables fail for any reason, it will automatically revert to using JPL's server. It may require a few seconds to reach the JPL server. beam: If a beam size is included (in arcsec), the expected FWHM will be computed using scipy.signal.convolve() of a Gaussian with a uniform disk. apparent: False = the return values are J2000 as seen from the specified location apparent: True = the return values are Apparent as seen from the specified location observatory: Observatories can be specified by JPL ID string, or by the following names:
vis: the name of an ms from which to grab the start time as the date
'VLA' | (which will be converted to = '-5') |
'ALMA' | (which will be converted to = '-7') |
'GBT' | (which will be converted to = '-9') |
'MAUNAKEA' | (which will be converted to = '-80') |
'OVRO' | (which will be converted to = '-81') |
'geocentric' | (which will be converted to = '500') |
The return values are apparent values as seen from the specified observatory:
The dictionary returned is:
data['directionRadians'] data['angularDiameter'] (in arc seconds) data['rateRadiansPerSecond'] (only present if useJPL=True) data['rangeRateKms'] (only present if useJPL=True) data['rangeAU'] (only present if useJPL=True)
Examples
CASA <3>: au.planet('Titan','2012-04-01','EVLA')
Using observatory: VLA = -5
Contacting JPL Horizons for Titan
Assuming 0 hours UT
MJD= 56018.00000, MJDseconds = 4839955200.0
LST day = 62742, LST = 5.4757 hours (at longitude=-107.618334)
Julian day = 2456018.500000, MJD = 56018.000000, MJD seconds = 4839955200.000000
Confirmed Observatory name = VLA
Confirmed Target ID = 606 = Titan
Range rate = -12.386017 km/sec
J2000 Position: 13:44:49.19, -007:52:27.645, rate: -11.9723, 3.3884 arcsec/hr
Angular diameter = 0.811703 arcsec
Out[3]:
{'angularDiameter': 0.81170299999999995,
'directionRadians': [3.5989557494879238, -0.13743326065058692],
'rangeAU': 8.7480170957841707,
'rangeRateKms': -12.3860165,
'rateRadiansPerSecond': [-1.6123152317632495e-08, 4.5631673694531841e-09]}
CASA <4>: au.planet('Moon','2012-04-01 12:55')
Contacting JPL Horizons for Moon
MJD= 56018.53819, MJDseconds = 4840001700.0
LST day = 62742, LST = 21.0853 hours (at longitude=-67.754929)
Julian day = 2456019.038194, MJD = 56018.538194, MJD seconds = 4840001700.000000
Confirmed Observatory name = ALMA
Confirmed Target ID = 301 = Moon
Range rate = -0.156855 km/sec
J2000 Position: 08:14:33.97, +015:40:16.537, rate: 2648.9190, -473.5570 arcsec/hr
Angular diameter = 1831.355000 arcsec
Out[4]:
{'angularDiameter': 1831.355,
'directionRadians': [2.1579522305263157, 0.27351509191740353],
'rangeAU': 0.0026161249308700001,
'rangeRateKms': -0.15685499999999999,
'rateRadiansPerSecond': [3.5673115870860856e-06, -6.3774142329219044e-07]}
CASA <2>: au.planet('Ceres',useJPL=False)
No date/time specified, assuming today=2012-05-08 at UT 0:00
Using casa's ephemerides for Ceres. Note these can be in error by a
few arcminutes. Set useJPL=True for highest accuracy.
J2000 Position: 02:42:12.97, +010:15:42.228
Angular diameter = 0.342199 arcsec
Out[2]:
{'angularDiameter': 0.34219936014504132,
'directionRadians': [0.70780169751840638, 0.17910097545067771]}