| | |
- POINTER(...)
- addressof(...)
- addressof(C instance) -> integer
Return the address of the C instance internal buffer
- alignment(...)
- alignment(C type) -> integer
alignment(C instance) -> integer
Return the alignment requirements of a C instance
- byref(...)
- byref(C instance[, offset=0]) -> byref-object
Return a pointer lookalike to a C instance, only usable
as function argument
- ephem_open(ephem_name=None)
- This function opens a JPL planetary ephemeris file and sets initial
values. This function must be called prior to calls to the other JPL
ephemeris functions.
Parameters
----------
ephem_name : string
Name (including path if necessary) of direct-access JPL
ephemeris file.
Returns
-------
jd_begin : float
Beginning Julian date of the ephemeris file.
jd_end : float
Ending Julian date of the ephemeris file.
de_number : integer
DE number of the ephemeris file opened.
References
----------
.. [R1] Standish, E.M. and Newhall, X X (1988). "The JPL Export
Planetary Ephemeris"; JPL document dated 17 June 1988.
- get_errno(...)
- planet_ephemeris(tjd, target, center)
- This function accesses the JPL planetary ephemeris to give the
position and velocity of the target object with respect to the
center object.
Parameters
----------
tjd : tuple of floats, of length 2
Julian date split into two parts. 'tjd' may be split any way
(although the first element is usually the "integer" part, and
the second element is the "fractional" part). Julian date is in
the TDB or "T_eph" time scale.
target : {0, ..., 13}
Number of 'target' point.
center : {0, ..., 13}
Number of 'center' (origin) point.
The numbering convention for 'target' and'center' is:
= 0 ... Mercury
= 1 ... Venus
= 2 ... Earth
= 3 ... Mars
= 4 ... Jupiter
= 5 ... Saturn
= 6 ... Uranus
= 7 ... Neptune
= 8 ... Pluto
= 9 ... Moon
= 10 ... Sun
= 11 ... Solar system bary.
= 12 ... Earth-Moon bary.
= 13 ... Nutations (long int. and obliq.)
(If nutations are desired, set 'target' = 13;
'center' will be ignored on that call.)
Returns
-------
position : tuple of floats, of length 3
Position vector array of target relative to center, measured in
AU.
velocity : tuple of floats, of length 3
Velocity vector array of target relative to center, measured in
AU/day.
References
----------
.. [R1] Standish, E.M. and Newhall, X X (1988). "The JPL Export
Planetary Ephemeris"; JPL document dated 17 June 1988.
- pointer(...)
- resize(...)
- Resize the memory buffer of a ctypes instance
- set_conversion_mode(...)
- set_conversion_mode(encoding, errors) -> (previous-encoding, previous-errors)
Set the encoding and error handling ctypes uses when converting
between unicode and strings. Returns the previous values.
- set_errno(...)
- sizeof(...)
- sizeof(C type) -> integer
sizeof(C instance) -> integer
Return the size in bytes of a C instance
- split(tt)
- This function breaks up a float number into a double integer part
and a fractional part.
Parameters
----------
tt : float
Input number.
Returns
-------
fr : tuple of floats, of length 2
Output tuple;
fr[0] contains integer part,
fr[1] contains fractional part.
For negative input numbers,
fr[0] contains the next more negative integer;
fr[1] contains a positive fraction.
References
----------
.. [R1] Standish, E.M. and Newhall, X X (1988). "The JPL Export
Planetary Ephemeris"; JPL document dated 17 June 1988.
- state(jed, target)
- This function reads and interpolates the JPL planetary ephemeris
file.
Parameters
----------
jed : tuple of floats, of length 2
Julian date (TDB) at which interpolation is wanted. Any
combination of jed[0]+jed[1] which falls within the time span on
the file is a permissible epoch. See Note [N1]_ below.
target : {0, ..., 10}
The requested body to get data for from the ephemeris file.
The designation of the astronomical bodies is:
= 0 ... Mercury
= 1 ... Venus
= 2 ... Earth-Moon barycenter
= 3 ... Mars
= 4 ... Jupiter
= 5 ... Saturn
= 6 ... Uranus
= 7 ... Neptune
= 8 ... Pluto
= 9 ... geocentric Moon
= 10 ... Sun
Returns
-------
target_pos : tuple of floats, of length 3
The barycentric position vector array of the requested object,
in AU.
target_vel : tuple of floats, of length 3
The barycentric velocity vector array of the requested object,
in AU/Day.
Both vectors are referenced to the Earth mean equator and equinox of
epoch.
Notes
-----
.. [N1] For ease in programming, the user may put the entire epoch
in jed[0] and set jed[1] = 0. For maximum interpolation
accuracy set jed[0] = the most recent midnight at or before
interpolation epoch, and set jed[1] = fractional part of a day
elapsed between jed[0] and epoch. As an alternative, it may
prove convenient to set jed[0] = some fixed epoch, such as start
of the integration and jed[1] = elapsed interval between then
and epoch.
References
----------
.. [R1] Standish, E.M. and Newhall, X X (1988). "The JPL Export
Planetary Ephemeris"; JPL document dated 17 June 1988.
|