handy functions to manipulate the FITS C* WCS fields.

New version introduced by Dr. David J. Asher of BSGC
uses distance method for matching rather than triangle
matches for creating WCS solutions.

Enable the new method by defining USE_DISTANCE_METHOD as 1
in the header file wcs.h.
Diagnostic trace output can be controlled by enabling
various flags defined in findregd.h and setwcsfitsd.h

The primary caveat to using this method is that the CDELT1,2
image scale parameters must be fairly well known, but this
is generally true in our case (and these seem to need to be
fairly accurate for the triangle method also, ironically).
The result is a faster and more often successful matching
algorithm.

Dr. Asher has also introduced a higher-level astrometric fit,
using a 12, 20, or 26 parameter solution equation derived from
the Digital Sky Survey astrometric fit formulas.

The formula described by the DSS follows:

	xi  = a1*x + a2*y + a3 + a4*(x*x) + a5*x*y + a6*y
	    + a7*(x*x+y*y) + a8*(x*x*x) + a9*(x*x)*y + a10*x*(y*y)
	    + a11*(y*y*y) + a12*x*(x*x+y*y) + a13*x*(x*x+y*y)*(x*x+y*y)
	
	eta = b1*x + b2*y + b3 + b4*(x*x) + b5*x*y + b6*y
	    + b7*(x*x+y*y) + b8*(x*x*x) + b9*(x*x)*y + b10*x*(y*y)
	    + b11*(y*y*y) + b12*x*(x*x+y*y) + b13*x*(x*x+y*y)*(x*x+y*y)
	
where a1...a13 are assigned to keywords AMDX1...AMDX13
and b1...b13 are assigned to keywords AMDY1...AMDY13.

More detail can be found by reviewing the DSS documentation,
available online in PDF format at:

http://archive.stsci.edu/dss/booklet_n.pdf
http://archive.stsci.edu/dss/booklet_s.pdf

In particular, refer to pages 13-16 of booklet_n.pdf
and/or pages 10-12 of booklet_s.pdf

Further information about Dr. Asher's implementation can be
found in the directory "notes".




