
Miscellaneous notes . . .


How many image stars do we want to allow?  MAXNSTARS hardwired as 25 in
setwcsfits.c.  Also the selection is made using brightness (excluding
BURNEDOUT stars).  We check residuals of the final fit, but never check
coverage, either e.g. in setwcsfits.c where the clamping to MAXNSTARS
brightest is done, or later after finding the solution.


020911:  substantially increase MAXNSTARS (eventually should malloc & make it
the lower of # img *s found & # cat *s found, but keep as const for time
being).  During spiral searching, use MAXISTARS.  Also for nailing it, use
MAXISTARS to get 5-param wcs solution.  However, then use MAXNSTARS for
improved astrometry (12-param solution).  It may be best to continue to use
findRegistration only for finding match + doing 5-param fit & have a separate
function e.g. findAstrom to do the more accurate astrometric fit.  There
should be very little overlap between findAstrom & findRegistration e.g.
calculating xi, eta of catalogue stars takes very little cpu time.  Note that
findRegistration is called by tryOneLoc.  To avoid duplicating the code in
tryOneLoc that gets the catalogue stars, findAstrom should also be called
within tryOneLoc.


Existing version of nailIt in setwcsfits.c calls tryOneLoc with verbose=0.
Occasionally the precisely centred call to tryOneLoc can fail even though the
off centre one succeeded, as there's a bit of "luck" as to whether you
succeed.  Maybe better if nailIt calls tryOneLoc with verbose=1, to make it
explicit (when wcs run with verbose option) that a new area (with a freshly
chosen set of GSC stars) is being tried, then if the "Fit residual" message
doesn't appear, you know the nailIt fit was unsuccessful, and the result from
the successful fit in the spiral search is used.
................ simply include extra param verbose in nailIt


  With the similar triangle method, there is no guarantee that all the
matches are genuine (though earlier ones in the arrays have a good chance of
being), at the point in findRegistration where triangle voting is completed,
but before residual checking.  Indeed the same image or catalogue star may
appear in more than one candidate pair, as can be seen by doing
     #define TOPVOTES_TRACE
which also shows, in 1st column of output, no. of votes that each pair has.
You may well see a sudden drop in no. of votes when you change from genuine
to false matches.  The hope is that the residual checking below will kill
false matches (as well as omitting matches that are genuine but with poor
residuals).  False matches can, however, spoil the fit so much that some
genuine matches get thrown out with the false ones, as can be seen by doing
     #define THRESH_TRACE
  With the new version, we'll hope to do fairly robust checking as we go
along, so that no member of a matched pair is seriously off position (don't
know how likely it is to get a set of just e.g. 4 image stars closely fitting
4 catalogue stars which in reality aren't the same stars).


New ip.cfg parameter REJECTDIST for higher order astrometric fits.  Keep
MAXRESID so that ip.cfg still works with previous wcs.


NOUTLL, NHIORD, FTOL in source code not cfg.
Convergence problems with order=5, sometimes need change FTOL.

