DESCRIPTION:This routine calculates gaussian smoothing and moment arrays for a given gaussian psf width parameter sigma. The normalization is to a value of about 512 in the center. The routine bombs and RETURNs (-1) if a ridiculously large sigma (>12) is asked for.
RETURNS:
SIGNATURE: int atSetFSigma(double sigma)
DESCRIPTION: Given the array of pixel values, the x and y sizes of the array, the integer x and y positions of the object, and the sky value, returns the interpolated center, filter value, and Gaussian weighted moments in the struct GAUSSMOM *ps.
RETURNS:
SIGNATURE: int atFindFocMom(const U16 **p, int xsz, int ysz, int x, int y, int sky, GAUSSMOM *ps )
DESCRIPTION:this routine iterates to find the optimum sigma for smoothing for object finding (and, though not QUITE optimum for astrometry, is trivially different from the correct value and I suggest we use it) by finding the sigma value for which the focus moment 2*r^2 - 2 weighted by that gaussian vanishes. It returns the found value or -1.0 if any invocation of atFindFocMom fails. It will populate a struct GAUSSMOM if one is offered, or will use an internal one for its calculations if one is not the argument is NULL).
RETURNS:
SIGNATURE: int atSigmaFind(const U16 **p, int xsz, int ysz, int x, int y, int sky, GAUSSMOM *ps, double *sig)