
2006.04.08 : relphot contemplations

relastro will perform the astrometry equivalent to relphot.  For
region, it loads in the average objects, detections, and image
parameters.  The goal is to determine improved astrometric positions
of objects in the images and to determine improved astrometric
parameters for the images.  Just like relphot, this is an iterative
process in which the object postions are improved in one step, the
image parameters are improved in the next, then back to the images.

Relastro needs to deal with outlier objects in a robust way.  There
are a few reasons why objects should have poor astrometric solutions,
and these can be flagged up front: saturation and too many bad pixels.
For detections which come from psphot, we can use the quality
parameter to exclude objects which have excessively high bad pixel
counts.  For detections from sextractor or other analysis tools,
this information is missing.  In this case, we can use the distance
from the image boundaries as a trigger.

An open question to be addressed is the issue of external calibration
sources.  Unlike photometry, external astrometric measurements do not
need to have an unknown filter transformation applied.  They can thus
be included as part of the solution automatically.  It is not clear,
however, how to include *proper-motion* data in the analysis.  If I
introduce, for example, USNO objects with proper motions, the
information provided consists in practice of a velocity vector and
errors.  How does this get folded into the fit?  One answer is to
construct additional artificial datapoints for each entry with the
proper errors and epochs.  Seems like something of a hack.  

We may want to allow for different errors / weightings for the
different external sources.

After the initial iterations, we will can solve for proper-motion and
parallax for (all?) objects

- calculate the parallax normal vector for each image
- calculate the atmospheric / orbital motion effects for each image

