ssd: Python wrapper to ephememerides code
F. Pierfederici (fpierfed@lsst.org)



Introduction
The ssd module computes ephemerides (i.e. predicted positions) and relative 
positional error ellipses given an orbit, a date-time and a position on Earth.



Build
ssd depends on JPL SSD, Python, numpy and f2py. In particular what is needed
is

1. A working installation of JPL SSD (including libephem).
2. A working installation of Python 2.4 or newer.
3. The numpy Python module.
4. The SVN version of f2py (included in numpy).

In order to build the module use the standard distutils commands:
    shell> python setup.py install

The ssd distribution includes unit-tests in a file called test.py



Usage
The ssd module exports one function:
ephemerides(orbitElements, orbitEpoch, absMag, gMag, times, obsCode, covariance)

Given one orbit (described by its orbital elements), a list of times, and a
position on Earth (specified by an observatory code), compute the predictied
position (i.e. ephemerides) of that orbit at each of the input times. Return
positions, predicted magnitudes and positional uncertainties.
    
INPUT (all angles in degrees)
  orbitElements: numpy.array containing the orbital elements
    (dimension <= 6) in COMETARY format (q, e, i, node, peri, tp).
    All angles in degrees.
  orbitEpoch: epoch of the orbit (UTC MJD).
  obsCode: MPC observatory code.
  times: list of ephemerides times (UTC MJD).
  absMag: absolute H magnitude.
  gMag: magnitude g parameter (default 0.150).
  covariance: optional square root covariance matrix in diagonal form as
    21-element numpy.array.
    
OUTPUT
  numpy.array of numpy.arrays of the form
    [RA, Dec, mag, t, RAErr, DecERR, err1, err2, PA].
  RA: Right Ascension (deg).
  Dec: Declination (deg).
  t: ephemerides time (UTC MJD).
  mag: apparent magnitude (if available, None otherwise).
  RAErr: RA 3-sigma uncertainty (arcsec).
  DecErr: Dec 3-sigma uncertainty (arcsec).
  err1: semi-major axis of the 3-sigma positional error ellipse (arcsec).
  err1: semi-major axis of the 3-sigma positional error ellipse (arcsec).
  PA: position angle of the 3-sigma positional error ellipse (deg).

Remember: all angles in degrees and all times in UTC MJD.

